[
  {
    "path": ".github/workflows/linux-clang.yml",
    "content": "name: Ubuntu (clang)\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n    \njobs:\n  build:\n    strategy:\n      matrix:\n        mode: [ Debug, Release ]\n    runs-on: ubuntu-22.04\n    \n    steps:\n    - name: check out\n      uses: actions/checkout@v3\n\n    - name: Install Dependencies\n      run: |\n        sudo apt-get update \n        sudo apt-get install curl libssl-dev libcurl4-openssl-dev libmxml-dev libapr1-dev libaprutil1-dev\n              \n    - name: configure cmake\n      run: CXX=clang++ CC=clang cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.mode }}\n      \n    - name: build project\n      run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.mode }}\n\n  \n"
  },
  {
    "path": ".github/workflows/linux-gcc.yml",
    "content": "name: Ubuntu (gcc)\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n    \njobs:\n  ubuntu_gcc:\n    strategy:\n      matrix:\n        mode: [ Debug, Release ]\n    runs-on: ubuntu-20.04\n    \n    steps:\n    - name: check out\n      uses: actions/checkout@v3\n\n    - name: Install Dependencies\n      run: |\n        sudo apt-get update\n        sudo apt-get install curl libssl-dev libcurl4-openssl-dev libmxml-dev libapr1-dev libaprutil1-dev\n\n    - name: checkout gcc version\n      run: gcc --version\n\n    - name: configure cmake\n      run: CXX=g++ CC=gcc cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.mode }}\n      \n    - name: build project\n      run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.mode }}\n"
  },
  {
    "path": ".github/workflows/windows.yml",
    "content": "name: Windows Server 2022\n\non: \n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n    \njobs:\n  build:\n    runs-on: windows-latest\n    \n    strategy: \n      matrix:\n        mode: [Debug, Release]\n        arch: [x64, Win32]\n    \n    env: \n      CXX: cl.exe\n      CC: cl.exe\n    \n    steps:\n      - name: check out\n        uses: actions/checkout@v3\n        \n      - name: generate project\n        run: cmake -B ${{ github.workspace }}\\build -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -A${{ matrix.arch }}\n        \n      - name: build project\n        run: cmake --build ${{ github.workspace }}\\build --config ${{ matrix.mode }}\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: c\r\n\r\ncompiler:\r\n  - gcc\r\n\r\ninstall:\r\n  - sudo apt-get update\r\n  - sudo apt-get install libapr1-dev libaprutil1-dev curl\r\n  - wget --quiet https://github.com/michaelrsweet/mxml/releases/download/release-2.9/mxml-2.9.tar.gz\r\n  - tar zxf mxml-2.9.tar.gz\r\n  - cd mxml-2.9\r\n  - ./configure && make && sudo make install\r\n  - cd -\r\n  - pip install --user cpp-coveralls\r\n\r\nscript:\r\n  - cmake -DCMAKE_BUILD_TYPE=Coverage .\r\n  - make\r\n  - ./build/Coverage/bin/oss_c_sdk_test\r\n\r\nafter_success:\r\n\r\nenv:\r\n  global:\r\n    - secure: kvjsFXirn2+Nys0TO0eViDHTlhz0ow5AuWuQeEzJAJnLbJfqupWng0o3i4vGF7bPpxWgbrIFJro/Pwk15F1gvUGaKjXbPWn5hae3G3ZqDwdNkDYy8Hs8VnjvqlaZ4dbpqDQOFA7+49jUuzVPdHFWJgLEleE53RADfuESN/rd0Uo6C1mZEEmyEhmj2pyHSKr08UWLbbuoLuVeaF1rfLxLRAU/Ki0S1AnnFirJcsbMSICexwQ96G+bdQTdqHass6JfQfOYklnKVSrMbk/0MuV5LmeQ3A1j1AF3iRzZ4KT4FmNXwk0hoocz+la8M3B7zaUu2wuea8LV5mZ6G5bN5p2fYHXlpZaoxstMl3HUwiQH5ETX0W6bzB1rjWl2CteKR3xt2wW1qj5XDvjqBUrPNV0yibpfMdkVfLnvic16+0qZua2cjsn93d0AyNnS6cFCGAH3PGI7+3Mmg4T1S43z9XjXjHmOCT0EQ/kfGI0m+3p8TYqqQMandWbphpXZYPdHBeSv4tMMFn1p7bjwn5fxvUKCou/t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douRLjyPjhLUS+QEeDangEth7bXlACBQxPMlJsjBrXuQxykT+TtqVexOWQtVe9nuJQ=\r\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# ChangeLog - Aliyun OSS SDK for C\r\n## 版本号：3.11.2 日期：2024-09-14\r\n### 变更内容\r\n- 修复：潜在的空指针访问问题\r\n \r\n## 版本号：3.11.1 日期：2024-07-26\r\n### 变更内容\r\n- 修复：delete objects 接口解析响应体时可能出现异常的问题\r\n \r\n## 版本号：3.11.0 日期：2024-05-29\r\n### 变更内容\r\n- 添加：支持版本签名4\r\n \r\n## 版本号：3.10.1 日期：2023-12-05\r\n### 变更内容\r\n- 添加：支持windows x64 构建\r\n- 添加：增加对象名的合法性检查\r\n- 添加：优化curl实例的重用\r\n\r\n\r\n## 版本号：3.10.0 日期：2020-08-12\r\n### 变更内容\r\n- 添加：支持ip:port 形式的 endpoint参数\r\n- 添加：支持冷归档接口\r\n- 添加：增加endpoint的参数检查\r\n- 修复：网络参数在断点续传场景下不生效\r\n\r\n## 版本号：3.9.2 日期：2020-06-19\r\n### 变更内容\r\n- 添加：增加endpoint的合法性检查 \r\n- 添加：增加ssl证书校验开关 和 CA证书设置路径，默认开启ssl证书校验 \r\n- 添加：支持 生成签名URL时，不对/ 转义成%2F\r\n\r\n## 版本号：3.9.1 日期：2019-11-22\r\n### 变更内容\r\n- 添加：bucket名字的合法性检查 \r\n\r\n## 版本号：3.9.0 日期：2019-09-09\r\n### 变更内容\r\n- 添加：支持x-oss-sign-origin-only 签名子资源\r\n\r\n## 版本号：3.8.0 日期：2019-08-09\r\n### 变更内容\r\n- 添加：支持object tagging功能\r\n- 修复：oss_upload_part_copy源文件名没有url编码的问题\r\n\r\n## 版本号：3.7.1 日期：2019-04-05\r\n### 变更内容\r\n- 修复：断点续传下载进度条更新不正确的问题\r\n\r\n## 版本号：3.7.0 日期：2019-02-23\r\n### 变更内容\r\n- 添加：支持oss_get_object_meta\r\n- 添加：支持oss_put_object_acl，oss_get_object_acl\r\n- 添加：支持windows x64 平台\r\n- 优化: 完善测试代码 \r\n- 添加：支持windows 下 使用cmake 方式构建\r\n- 添加：添加curl debug 日志信息\r\n- 添加：支持select object\r\n\r\n## 版本号：3.6.0 日期：2018-04-19\r\n### 变更内容\r\n- 添加：create_bucket支持指定存储类型，支持oss_restore_object\r\n- 添加：支持symlink，oss_put_symlink和oss_get_symlink\r\n- 添加：存储空间设置logging，lifecycle，website，referer，cors\r\n- 添加：支持oss_list_bucket，oss_get_bucket_location\r\n- 添加：支持oss_get_bucket_location，oss_get_bucket_info\r\n\r\n## 版本号：3.5.2 日期：2017-11-14\r\n### 变更内容\r\n- 修复：oss_resumable_upload_file、oss_resumable_download_file不支持STS鉴权方式的问题\r\n\r\n## 版本号：3.5.1 日期：2017-08-11\r\n### 变更内容\r\n- 修复：`apr_file_info_get`在特定文件系统下报`70008 APR_INCOMPLETE`错误的问题\r\n- 修复：`oss_delete_objects_by_prefix`在中的`params->next_marker`使用释放后的内存的问题\r\n- 修复：Windows的`minixml`库升级到2.9\r\n\r\n## 版本号：3.5.0 日期：2017-08-01\r\n### 变更内容\r\n- 添加：支持并发断点续传下载`oss_resumable_download_file`\r\n- 修复：`aos_should_retry`重试判读错误的问题\r\n\r\n## 版本号：3.4.3 日期：2017-04-26\r\n### 变更内容\r\n- 修复：添加宏`ULLONG_MAX`的定义\r\n- 修复：示例工程的CMakeLists中加入`oss_resumable_sample.c`\r\n- 修复：`oss_open_checkpoint_file`错误打印日志的问题\r\n\r\n## 版本号：3.4.2 日期：2017-04-23\r\n### 变更内容\r\n- 修复：解决分片上传ContentType被覆盖的问题\r\n\r\n## 版本号：3.4.1 日期：2017-04-07\r\n### 变更内容\r\n- 添加：list_object使用示例`oss_list_object_sample.c`\r\n- 修复：CMakeLists中加入`oss_resumable.h`\r\n\r\n## 版本号：3.4.0 日期：2017-02-22\r\n### 变更内容\r\n- 添加：支持并发断点续传上传`oss_resumable_upload_file`\r\n- 修复：`oss_gen_signed_url`支持临时用户签名\r\n- 修复：初始化默认不打开`fd 2`，退出时不关闭`fd 2`\r\n- 修复：修复key为`xxx/./yyy/`，`./async_test/test`报`SignatureDoesNotMatch`的问题\r\n\r\n## 版本号：3.3.0 日期：2016-12-28\r\n### 变更内容\r\n - 添加：支持代理Proxy\r\n - 修复：oss_get_object_to_file先下载到本地临时文件，成功后修改文件名称\r\n - 修复：去除Visual Studio编译警告aos_util.c(512) C4146\r\n - 修复：URL上传下载添加CRC校验\r\n\r\n## 版本号：3.2.1 日期：2016-11-21\r\n### 变更内容\r\n- 解决oss_copy_object源文件名没有url编码的问题\r\n\r\n## 版本号：3.2.0 日期：2016-11-14\r\n### 变更内容\r\n - 支持上传、下载[CRC](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/oss_c_sdk_test/test_oss_crc.c)检验\r\n - 支持[上传回调](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/oss_c_sdk_test/test_oss_callback.c)功能\r\n - 支持[进度条](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/oss_c_sdk_test/test_oss_progress.c)功能\r\n\r\n## 版本号：3.1.0 日期：2016-08-10\r\n### 变更内容\r\n - 支持[RTMP](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/oss_c_sdk_test/test_oss_live.c)功能\r\n - 支持[图片服务](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/oss_c_sdk_test/test_oss_image.c)功能\r\n\r\n## 版本号：3.0.0 日期：2016-05-24\r\n### 变更内容\r\n - Windows和Linux版本合并\r\n \r\n## 版本号：2.1.0 日期：2016-03-28\r\n### 变更内容\r\n - 完善示例程序\r\n - header长度由限制为1K升级为最长8K\r\n - 解决部分单词拼写错误\r\n\r\n## 版本号：2.0.0 日期：2016-03-08\r\n### 变更内容\r\n - complete multipart接口支持覆盖原有head\r\n - 重构示例程序和组织方式\r\n - 开放params参数，允许用户自定义设置\r\n - 允许params和headers参数为空，简化使用\r\n - 支持https\r\n - 支持ip\r\n - 新增部分测试\r\n - 新增oss_put_bucket_acl接口\r\n - 新增目录相关示例\r\n - 新增signed url相关示例\r\n - 完善接口注释\r\n - 删除无用的port配置参数\r\n - 调整oss_init_multipart_upload接口参数顺序\r\n - 优化配置参数名称，使其与官方网站保持一致\r\n - 解决endpoint不能含有http等前缀的问题\r\n - 解决用户无法设置content-type的问题\r\n - 解决无法自动根据file name和key设置content-type的问题\r\n - 解决list upload parts为空时coredump的问题\r\n - 解决oss_upload_file接口在断点续传时可能会coredump的问题\r\n - 解决部分单词拼写错误\r\n - 解决所有警告\r\n - 解决部分头文件宏保护无效的问题\r\n - 解决oss_head_object_by_url接口不生效的问题\r\n\r\n## 版本号：1.0.0 日期：2015-12-16\r\n### 变更内容\r\n - 调整OSS C SDK依赖的XML第三方库，使用minixml替换libxml减小OSS C SDK的大小\r\n - 修改编译方式为CMAKE，同时提供嵌入式环境的Makefile.embeded，减少automake重复编译的问题\r\n - 新增oss_upload_file接口，封装multipart upload相关的接口，使用multipart方式上传文件\r\n - 新增oss_delete_objects_by_prefix接口，删除指定prefix的object\r\n - 新增OSS C SDK根据object name或者filename自动添加content_type\r\n - 完善OSS C SDK demo的调用示例，方便用户快速入门\r\n\r\n## 版本号：0.0.7 日期：2015-11-11\r\n### 变更内容\r\n - OSS C SDK修复sts_token超过http header最大限制的问题\r\n\r\n## 版本号：0.0.6 日期：2015-10-29\r\n### 变更内容\r\n - OSS C SDK签名时请求头支持x-oss-date，允许用户指定签名时间，解决系统时间偏差导致签名出错的问题\r\n - OSS C SDK支持CNAME方式访问OSS，CNAME方式请求时指定is_oss_domain值为0\r\n - 新增OSS C SDK demo,提供简单的接口调用示例，方便用户快速入门\r\n - OSS C SDK sample示例中去除对utf8第三方库的依赖\r\n\r\n## 版本号：0.0.5 日期：2015-09-10\r\n### 变更内容\r\n - 调整OSS C SDK获取GMT时间的方式，解决LOCALE变化可能导致签名出错的问题\r\n - aos_status_t结构体增加req_id字段，方便定位请求出错问题\r\n\r\n## 版本号：0.0.4 日期：2015-07-27\r\n### 变更内容\r\n - 增加生命周期相关的接口oss_put_bucket_lifecycle、oss_get_bucket_lifecycle以及oss_delete_bucket_lifecycle\r\n - OSS C SDK支持长连接，默认使用连接池支持keep alive功能\r\n - oss_list_object增加子目录的输出\r\n\r\n## 版本号：0.0.3 日期：2015-07-08\r\n### 变更内容\r\n - 增加oss_append_object_from_buffer接口，支持追加上传buffer中的内容到object\r\n - 增加oss_append_object_from_file接口，支持追加上传文件中的内容到object\r\n\r\n## 版本号：0.0.2 日期：2015-06-10\r\n### 变更内容\r\n - 增加oss_upload_part_copy，支持Upload Part Copy方式拷贝\r\n - 增加sts服务临时授权方式访问OSS\r\n\r\n## 版本号：0.0.1 日期：2015-05-28\r\n### 变更内容\r\n - 基于OSS API文档，提供OSS bucket、object以及multipart相关的常见操作API\r\n - 提供基于CuTest的sample\r\n\r\n\r\n\r\n\r\n"
  },
  {
    "path": "CMakeLists.txt",
    "content": "PROJECT(oss_c_sdk)\n\nCMAKE_MINIMUM_REQUIRED(VERSION 2.6)  \n\nset(CMAKE_VERSION 3.0.0)\n\n# default C / CXX flags\nif(CMAKE_HOST_WIN32)\n    \nelse()\n    set(CMAKE_C_FLAGS \" -g -ggdb -O0 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE\")\n    set(CMAKE_CXX_FLAGS \" -g -ggdb -O0 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE\")\n\n    set(CMAKE_C_FLAGS_DEBUG \" -g -ggdb -O0 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE\")\n    set(CMAKE_CXX_FLAGS_DEBUG \" -g -ggdb -O0 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE\")\n\n    set(CMAKE_C_FLAGS_RELEASE \" -O3 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE\")\n    set(CMAKE_CXX_FLAGS_RELEASE \" -O3 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE\")\n\n    set(CMAKE_C_FLAGS_MINSIZEREF \" -Os -Wall  -fpic -fPIC -D_LARGEFILE64_SOURCE\")\n    set(CMAKE_CXX_FLAGS_MINSIZEREF \" -Os -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE\")\n\n    set(CMAKE_C_FLAGS_RELWITHDEBINFO \" -O2 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE\")\n    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO \" -O2 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE\")\n\n    set(CMAKE_C_FLAGS_COVERAGE \" ${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage\")\n    set(CMAKE_CXX_FLAGS_COVERAGE \" ${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage\")\nendif()\n\nset(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/build/${CMAKE_BUILD_TYPE}/lib)\nset(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/build/${CMAKE_BUILD_TYPE}/bin)\nset(CMAKE_C_OUTPUT_EXTENSION_REPLACE 1)\nset(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1)\n\n\n# find dependency librarys\nif(CMAKE_HOST_WIN32)\n    set(EXTRA_INCLUDE_PATH ${CMAKE_SOURCE_DIR}/third_party/include)\n    if (CMAKE_CL_64)\n        set(EXTRA_LIB_PATH ${CMAKE_SOURCE_DIR}/third_party/lib/x64/)\n    else()\n        set(EXTRA_LIB_PATH ${CMAKE_SOURCE_DIR}/third_party/lib/Win32/)\n    endif()\n    find_path(APR_INCLUDE_DIR NAMES apr.h PATH_SUFFIXES apr PATHS ${EXTRA_INCLUDE_PATH})\n    find_library(APR_LIBRARY NAMES libapr-1 PATHS ${EXTRA_LIB_PATH})\n\n    find_path(APR_UTIL_INCLUDE_DIR NAMES apu.h PATH_SUFFIXES aprutil PATHS ${EXTRA_INCLUDE_PATH})\n    find_library(APR_UTIL_LIBRARY NAMES libaprutil-1 PATHS ${EXTRA_LIB_PATH})\n\n    find_path(MINIXML_INCLUDE_DIR NAMES mxml.h PATH_SUFFIXES mxml PATHS ${EXTRA_INCLUDE_PATH})\n    find_library(MINIXML_LIBRARY NAMES mxml1 PATHS ${EXTRA_LIB_PATH})\n\n    find_path(CURL_INCLUDE_DIR NAMES curl/curl.h PATHS ${EXTRA_INCLUDE_PATH})\n    find_library(CURL_LIBRARY NAMES libcurl PATHS ${EXTRA_LIB_PATH})\n\nelse()\n\tFIND_PROGRAM(APR_CONFIG_BIN NAMES apr-config apr-1-config PATHS /usr/bin /usr/local/bin /usr/local/apr/bin/)\n\tFIND_PROGRAM(APU_CONFIG_BIN NAMES apu-config apu-1-config PATHS /usr/bin /usr/local/bin /usr/local/apr/bin/)\n\n\tIF (APR_CONFIG_BIN)\n\t\tEXECUTE_PROCESS(\n\t\t\tCOMMAND ${APR_CONFIG_BIN} --includedir\n\t\t\tOUTPUT_VARIABLE APR_INCLUDE_DIR\n\t\t\tOUTPUT_STRIP_TRAILING_WHITESPACE\n\t\t)\n\t\tEXECUTE_PROCESS(\n\t\t\tCOMMAND ${APR_CONFIG_BIN} --cflags\n\t\t\tOUTPUT_VARIABLE APR_C_FLAGS\n\t\t\tOUTPUT_STRIP_TRAILING_WHITESPACE\n\t\t)\n\t\tEXECUTE_PROCESS(\n\t\t\tCOMMAND ${APR_CONFIG_BIN} --link-ld\n\t\t\tOUTPUT_VARIABLE APR_LIBRARIES\n\t\t\tOUTPUT_STRIP_TRAILING_WHITESPACE\n\t\t)\n\tELSE()\n\t\tMESSAGE(FATAL_ERROR \"Could not find apr-config/apr-1-config\")\n\tENDIF()\n\n\tIF (APU_CONFIG_BIN)\n\t\tEXECUTE_PROCESS(\n\t\t\tCOMMAND ${APU_CONFIG_BIN} --includedir\n\t\t\tOUTPUT_VARIABLE APR_UTIL_INCLUDE_DIR\n\t\t\tOUTPUT_STRIP_TRAILING_WHITESPACE\n\t\t)\n\t\tEXECUTE_PROCESS(\n\t\t\tCOMMAND ${APU_CONFIG_BIN} --cflags\n\t\t\tOUTPUT_VARIABLE APU_C_FLAGS\n\t\t\tOUTPUT_STRIP_TRAILING_WHITESPACE\n\t\t)\n\t\tEXECUTE_PROCESS(\n\t\t\tCOMMAND ${APU_CONFIG_BIN} --link-ld\n\t\t\tOUTPUT_VARIABLE APU_LIBRARIES\n\t\t\tOUTPUT_STRIP_TRAILING_WHITESPACE\n\t\t)\n\tELSE()\n\t\tMESSAGE(FATAL_ERROR \"Could not find apu-config/apu-1-config\")\n\tENDIF()\n\n\t#curl-config\n\tFIND_PROGRAM(CURL_CONFIG_BIN NAMES curl-config)\n  \n\tIF (CURL_CONFIG_BIN)\n\t\tEXECUTE_PROCESS(\n\t\t\tCOMMAND ${CURL_CONFIG_BIN} --libs\n\t\t\tOUTPUT_VARIABLE CURL_LIBRARIES\n\t\t\tOUTPUT_STRIP_TRAILING_WHITESPACE\n\t\t\t)\n\tELSE()\n\t\tMESSAGE(FATAL_ERROR \"Could not find curl-config\")\n\tENDIF()\nendif()\n  \n# Compile and link lib_oss_c_sdk\ninclude_directories(${APR_INCLUDE_DIR})\ninclude_directories(${APR_UTIL_INCLUDE_DIR})\ninclude_directories(${MINIXML_INCLUDE_DIR})\ninclude_directories(${CURL_INCLUDE_DIR})\n\naux_source_directory(oss_c_sdk SRC_LIST)\n\n# build & install\nif(CMAKE_HOST_WIN32)\n    add_library(${CMAKE_PROJECT_NAME} STATIC ${SRC_LIST})\n    INSTALL(TARGETS ${CMAKE_PROJECT_NAME} ARCHIVE DESTINATION lib)\nelse()\n    add_library(${CMAKE_PROJECT_NAME} SHARED ${SRC_LIST})\n    add_library(${CMAKE_PROJECT_NAME}_static STATIC ${SRC_LIST})\n    \n\tset_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES VERSION ${CMAKE_VERSION}  SOVERSION ${CMAKE_VERSION})\n\n    INSTALL(TARGETS ${CMAKE_PROJECT_NAME} LIBRARY DESTINATION lib)\n    INSTALL(TARGETS ${CMAKE_PROJECT_NAME}_static ARCHIVE DESTINATION lib)\nendif()\n\nINSTALL(FILES\n  oss_c_sdk/aos_buf.h\n  oss_c_sdk/aos_define.h\n  oss_c_sdk/aos_fstack.h\n  oss_c_sdk/aos_http_io.h\n  oss_c_sdk/aos_list.h\n  oss_c_sdk/aos_log.h\n  oss_c_sdk/aos_status.h\n  oss_c_sdk/aos_string.h\n  oss_c_sdk/aos_transport.h\n  oss_c_sdk/aos_util.h\n  oss_c_sdk/aos_crc64.h\n  oss_c_sdk/oss_api.h\n  oss_c_sdk/oss_auth.h\n  oss_c_sdk/oss_define.h\n  oss_c_sdk/oss_resumable.h\n  oss_c_sdk/oss_util.h\n  oss_c_sdk/oss_xml.h\n  DESTINATION include/oss_c_sdk)\n\nadd_subdirectory(oss_c_sdk_sample)\nadd_subdirectory(oss_c_sdk_test)\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2016 Aliyun\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README-CN.md",
    "content": "# Aliyun OSS SDK for C\r\n\r\n[![GitHub version](https://badge.fury.io/gh/aliyun%2Faliyun-oss-c-sdk.svg)](https://badge.fury.io/gh/aliyun%2Faliyun-oss-c-sdk)\r\n[![Build Status](https://travis-ci.org/aliyun/aliyun-oss-c-sdk.svg?branch=master)](https://travis-ci.org/aliyun/aliyun-oss-c-sdk)\r\n[![Coverage Status](https://coveralls.io/repos/github/aliyun/aliyun-oss-c-sdk/badge.svg?branch=master)](https://coveralls.io/github/aliyun/aliyun-oss-c-sdk?branch=master)\r\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)\r\n\r\n## [README of English](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/README.md)\r\n\r\n## 关于\r\n阿里云对象存储（Object Storage Service，简称OSS），是阿里云对外提供的海量、安全、低成本、高可靠的云存储服务。用户可以通过调用API，在任何应用、任何时间、任何地点上传和下载数据，也可以通过用户Web控制台对数据进行简单的管理。OSS适合存放任意文件类型，适合各种网站、开发企业及开发者使用。OSS C SDK提供了一系列接口方便用户使用OSS。\r\n\r\n## 版本\r\n - 当前版本：3.11.2\r\n\r\n## 安装方法\r\n### 环境依赖\r\nOSS C SDK使用curl进行网络操作，无论是作为客户端还是服务器端，都需要依赖curl。\r\nOSS C SDK使用apr/apr-util库解决内存管理以及跨平台问题，使用minixml库解析请求返回的xml，\r\nOSS C SDK并没有带上这几个外部库，您需要确认这些库已经安装，并且将它们的头文件目录和库文件目录都加入到了项目中。\r\n\r\n#### 第三方库下载以及安装\r\n\r\n##### libcurl （建议 7.32.0 及以上版本）\r\n\r\n  请从[这里](http://curl.haxx.se/download.html)下载，并参考[libcurl 安装指南](http://curl.haxx.se/docs/install.html)安装。典型的安装方式如下：\r\n```shell\r\n    ./configure\r\n    make\r\n    make install\r\n```\r\n\r\n注意：\r\n - 执行./configure时默认是配置安装目录为/usr/local/，如果需要指定安装目录，请使用 ./configure --prefix=/your/install/path/\r\n\r\n##### apr （建议 1.5.2 及以上版本）\r\n\r\n  请从[这里](https://apr.apache.org/download.cgi)下载，典型的安装方式如下：\r\n ```shell\r\n    ./configure\r\n    make\r\n    make install\r\n```\r\n\r\n注意：\r\n - 执行./configure时默认是配置安装目录为/usr/local/，如果需要指定安装目录，请使用 ./configure --prefix=/your/install/path/\r\n\r\n##### apr-util （建议 1.5.4 及以上版本）\r\n\r\n  请从[这里](https://apr.apache.org/download.cgi)下载，安装时需要注意指定--with-apr选项，典型的安装方式如下：\r\n```shell\r\n    ./configure --with-apr=/your/apr/install/path\r\n    make\r\n    make install\r\n```\r\n\r\n注意：\r\n - 执行./configure时默认是配置安装目录为/usr/local/，如果需要指定安装目录，请使用 ./configure --prefix=/your/install/path/\r\n - 需要通过--with-apr指定apr安装目录，如果apr安装到系统目录下需要指定--with-apr=/usr/local/apr/\r\n\r\n##### minixml （建议 2.8 及以上版本）\r\n\r\n  请从[这里](http://michaelrsweet.github.io/mxml/)下载，典型的安装方式如下:\r\n```shell\r\n    ./configure\r\n    make\r\n    make install\r\n```\r\n\r\n\r\n注意：\r\n - 执行./configure时默认是配置安装目录为/usr/local/，如果需要指定安装目录，请使用 ./configure --prefix=/your/install/path/\r\n\r\n##### CMake (建议2.6.0及以上版本)\r\n\r\n  请从[这里](https://cmake.org/download)下载，典型的安装方式如下：\r\n```shell\r\n    ./configure\r\n    make\r\n    make install\r\n```\r\n\r\n注意：\r\n - 执行./configure时默认是配置安装目录为/usr/local/，如果需要指定安装目录，请使用 ./configure --prefix=/your/install/path/\r\n\r\n#### OSS C SDK的安装\r\n\r\n  安装时请在cmake命令中指定第三方库头文件以及库文件的路径，典型的编译命令如下：\r\n```shell\r\n    cmake .\r\n    make\r\n    make install\r\n```\r\n\r\n注意：\r\n - 执行cmake . 时默认会到/usr/local/下面去寻找curl，apr，apr-util，mxml的头文件和库文件。\r\n - 默认编译是Debug类型，可以指定以下几种编译类型： Debug, Release, RelWithDebInfo和MinSizeRel，如果要使用release类型编译，则执行cmake . -DCMAKE_BUILD_TYPE=Release\r\n - 如果您在安装curl，apr，apr-util，mxml时指定了安装目录，则需要在执行cmake时指定这些库的路径，比如：\r\n```shell\r\n   cmake . -DCURL_INCLUDE_DIR=/usr/local/include/curl/ -DCURL_LIBRARY=/usr/local/lib/libcurl.a -DAPR_INCLUDE_DIR=/usr/local/include/apr-1/ -DAPR_LIBRARY=/usr/local/lib/libapr-1.a -DAPR_UTIL_INCLUDE_DIR=/usr/local/apr/include/apr-1 -DAPR_UTIL_LIBRARY=/usr/local/apr/lib/libaprutil-1.a -DMINIXML_INCLUDE_DIR=/usr/local/include -DMINIXML_LIBRARY=/usr/local/lib/libmxml.a\r\n```\r\n - 如果要指定安装目录，则需要在cmake时增加： -DCMAKE_INSTALL_PREFIX=/your/install/path/usr/local/\r\n\r\n## License\r\n- MIT\r\n \r\n## 联系我们\r\n- [阿里云OSS官方网站](http://oss.aliyun.com)\r\n- [阿里云OSS官方论坛](http://bbs.aliyun.com)\r\n- [阿里云OSS官方文档中心](http://www.aliyun.com/product/oss#Docs)\r\n- 阿里云官方技术支持：[提交工单](https://workorder.console.aliyun.com/#/ticket/createIndex)\r\n"
  },
  {
    "path": "README.md",
    "content": "﻿# Alibaba Cloud OSS SDK for C\r\n\r\n[![GitHub Version](https://badge.fury.io/gh/aliyun%2Faliyun-oss-c-sdk.svg)](https://badge.fury.io/gh/aliyun%2Faliyun-oss-c-sdk)\r\n[![Build Status](https://travis-ci.org/aliyun/aliyun-oss-c-sdk.svg?branch=master)](https://travis-ci.org/aliyun/aliyun-oss-c-sdk)\r\n[![Coverage Status](https://coveralls.io/repos/github/aliyun/aliyun-oss-c-sdk/badge.svg?branch=master)](https://coveralls.io/github/aliyun/aliyun-oss-c-sdk?branch=master)\r\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)\r\n\r\n## [README of Chinese](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/README-CN.md)\r\n\r\n## About\r\nAlibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring massive capacity, security, a low cost, and high reliability. You can upload and download data on any application anytime and anywhere by calling APIs, and perform simple management of data through the web console. The OSS can store any type of files and therefore applies to various websites, development enterprises and developers. The OSS C SDK provides a variety of interfaces for convenient use of the OSS. \r\n\r\n## Version\r\n - Current version: 3.11.2\r\n\r\n## Install OSS C SDK\r\n### Environment dependency\r\nThe OSS C SDK adopts cURL for network operations on both clients and servers.\r\nOSS C SDK uses the APR and APR-Util libraries for memory management and cross-platform operations, and uses the Mini-XML library for parsing XML returned by a request.\r\nThese external libraries are not included in the OSS C SDK. You need to install these libraries and add their header file directories and the library file directories to the project.\r\n\r\n#### Download and install third-party libraries\r\n\r\n##### libcurl (Version 7.32.0 or above is recommended)\r\n\r\n  Download from [here](http://curl.haxx.se/download.html) and install it by referring to [libcurl Installation Guide](http://curl.haxx.se/docs/install.html). A typical installation approach is as follows:\r\n```shell\r\n    ./configure\r\n    make\r\n    make install\r\n```\r\n\r\nNotes:\r\n - When you run the ./configure command, the default installation directory is /usr/local/. To specify another installation directory, use ./configure --prefix=/your/install/path/.\r\n\r\n##### APR (Version 1.5.2 or above is recommended)\r\n\r\n  Download from [here](https://apr.apache.org/download.cgi). A typical installation method is as follows:\r\n ```shell\r\n    ./configure\r\n    make\r\n    make install\r\n```\r\n\r\nNotes:\r\n - When you run the ./configure command, the default installation directory is /usr/local/. To specify another installation directory, use ./configure --prefix=/your/install/path/.\r\n\r\n##### APR-Util (Version 1.5.4 or above is recommended)\r\n\r\n  Download from [here](https://apr.apache.org/download.cgi). The --with-apr option must be specified during installation. A typical installation method is as follows:\r\n```shell\r\n    ./configure --with-apr=/your/apr/install/path\r\n    make\r\n    make install\r\n```\r\n\r\nNotes:\r\n - When you run the ./configure command, the default installation directory is /usr/local/. To specify another installation directory, use ./configure --prefix=/your/install/path/.\r\n - You need to specify the APR installation directory through --with-apr. To install APR under a system directory, specify --with-apr=/usr/local/apr/.\r\n\r\n##### Mini-XML (Version 2.8 or above is recommended)\r\n\r\n  Download from [here](http://michaelrsweet.github.io/mxml/). A typical installation method is as follows:\r\n```shell\r\n    ./configure\r\n    make\r\n    make install\r\n```\r\n\r\n\r\nNotes:\r\n - When you run the ./configure command, the default installation directory is /usr/local/. To specify another installation directory, use ./configure --prefix=/your/install/path/.\r\n\r\n##### CMake (Version 2.6.0 or above is recommended)\r\n\r\n  Download from [here](https://cmake.org/download). A typical installation method is as follows:\r\n```shell\r\n    ./configure\r\n    make\r\n    make install\r\n```\r\n\r\nNotes:\r\n - When you run the ./configure command, the default installation directory is /usr/local/. To specify another installation directory, use ./configure --prefix=/your/install/path/.\r\n\r\n#### Install OSS C SDK\r\n\r\n  Specify the third-party library header file and library file paths in the cmake command during installation. A typical compilation command is as follows: \r\n```shell\r\n    cmake .\r\n    make\r\n    make install\r\n```\r\n\r\nNotes:\r\n - When you run the cmake command, the header files and library files of cURL, APR, APR-Util and Mini-XML will be searched in the directory /usr/local/ by default.\r\n - The default compilation is of the Debug type and you can specify the following types of compilation: Debug, Release, RelWithDebInfo and MinSizeRel. To use the Release compilation type, run the command cmake . -DCMAKE_BUILD_TYPE=Release.\r\n - If You have specified installation directories for cURL, APR, APR-Util and Mini-XML, you need to specify the paths of these libraries when running CMake. For example, \r\n```shell\r\n   cmake . -DCURL_INCLUDE_DIR=/usr/local/include/curl/ -DCURL_LIBRARY=/usr/local/lib/libcurl.a -DAPR_INCLUDE_DIR=/usr/local/include/apr-1/ -DAPR_LIBRARY=/usr/local/lib/libapr-1.a -DAPR_UTIL_INCLUDE_DIR=/usr/local/apr/include/apr-1 -DAPR_UTIL_LIBRARY=/usr/local/apr/lib/libaprutil-1.a -DMINIXML_INCLUDE_DIR=/usr/local/include -DMINIXML_LIBRARY=/usr/local/lib/libmxml.a\r\n```\r\n - To specify an installation directory, add the following when running CMake: -DCMAKE_INSTALL_PREFIX=/your/install/path/usr/local/。\r\n\r\n## License\r\n- MIT\r\n \r\n## Contact us\r\n- [Alibaba Cloud OSS official website](http://oss.aliyun.com).\r\n- [Alibaba Cloud OSS official forum](http://bbs.aliyun.com).\r\n- [Alibaba Cloud OSS official documentation center](http://www.aliyun.com/product/oss#Docs).\r\n- Alibaba Cloud official technical support: [Submit a ticket](https://workorder.console.aliyun.com/#/ticket/createIndex).\r\n"
  },
  {
    "path": "oss_c_sdk/aos_buf.c",
    "content": "#include \"aos_buf.h\"\n#include \"aos_log.h\"\n#include <apr_file_io.h>\n\naos_buf_t *aos_create_buf(aos_pool_t *p, int size)\n{\n    aos_buf_t* b;\n\n    b = aos_palloc(p, sizeof(aos_buf_t) + size);\n    if (b == NULL) {\n        return NULL;\n    }\n\n    b->pos = (uint8_t *)b + sizeof(aos_buf_t);\n    b->start = b->pos;\n    b->last = b->start;\n    b->end = b->last + size;\n    aos_list_init(&b->node);\n\n    return b;\n}\n\naos_buf_t *aos_buf_pack(aos_pool_t *p, const void *data, int size)\n{\n    aos_buf_t* b;\n\n    b = aos_palloc(p, sizeof(aos_buf_t));\n    if (b == NULL) {\n        return NULL;\n    }\n\n    b->pos = (uint8_t *)data;\n    b->start = b->pos;\n    b->last = b->start + size;\n    b->end = b->last;\n    aos_list_init(&b->node);\n\n    return b;\n}\n\nint64_t aos_buf_list_len(aos_list_t *list)\n{\n    aos_buf_t *b;\n    int64_t len = 0;\n\n    aos_list_for_each_entry(aos_buf_t, b, list, node) {\n        len += aos_buf_size(b);\n    }\n\n    return len;\n}\n\nchar *aos_buf_list_content(aos_pool_t *p, aos_list_t *list)\n{\n    int64_t body_len;\n    char *buf;\n    int64_t pos = 0;\n    int64_t size = 0;\n    aos_buf_t *content;\n\n    body_len = aos_buf_list_len(list);\n    buf = aos_pcalloc(p, (size_t)(body_len + 1));\n    buf[body_len] = '\\0';\n    aos_list_for_each_entry(aos_buf_t, content, list, node) {\n        size = aos_buf_size(content);\n        memcpy(buf + pos, content->pos, (size_t)(size));\n        pos += size;\n    }\n    return buf;\n}\n\naos_file_buf_t *aos_create_file_buf(aos_pool_t *p)\n{\n    return (aos_file_buf_t*)aos_pcalloc(p, sizeof(aos_file_buf_t));\n}\n\nint aos_open_file_for_read(aos_pool_t *p, const char *path, aos_file_buf_t *fb)\n{\n    int s;\n    char buf[256];\n    apr_finfo_t finfo;\n\n    if ((s = apr_file_open(&fb->file, path, APR_READ, APR_UREAD | APR_GREAD, p)) != APR_SUCCESS) {\n        aos_error_log(\"apr_file_open failure, path:%s, code:%d %s.\", (path ? path : \"\"), s, apr_strerror(s, buf, sizeof(buf)));\n        //assert(fb->file == NULL);\n        return AOSE_OPEN_FILE_ERROR;\n    }\n\n    if ((s = apr_file_info_get(&finfo, APR_FINFO_SIZE, fb->file)) != APR_SUCCESS) {\n        apr_file_close(fb->file);\n        aos_error_log(\"apr_file_info_get failure, path:%s, code:%d %s.\", (path ? path : \"\"),  s, apr_strerror(s, buf, sizeof(buf)));\n        return AOSE_FILE_INFO_ERROR;\n    }\n    fb->file_pos = 0;\n    fb->file_last = finfo.size;\n    fb->owner = 1;\n\n    return AOSE_OK;\n}\n\nint aos_open_file_for_all_read(aos_pool_t *p, const char *path, aos_file_buf_t *fb)\n{\n    return aos_open_file_for_read(p, path, fb);\n}\n\nint aos_open_file_for_range_read(aos_pool_t *p, const char *path, \n    int64_t file_pos, int64_t file_last, aos_file_buf_t *fb)\n{\n    int s;\n\n    s = aos_open_file_for_read(p, path, fb);\n    if (s == AOSE_OK) {\n        if (file_pos > fb->file_pos) {\n            if (file_pos > fb->file_last) {\n                aos_warn_log(\"read range beyond file size, read start:%\" APR_INT64_T_FMT \", file size:%\" APR_INT64_T_FMT \"\\n\", \n                    file_pos, fb->file_last);\n                file_pos = fb->file_last;\n            }\n            fb->file_pos = file_pos;\n        }\n        if (file_last < fb->file_last) {\n            fb->file_last = file_last;\n        }\n        apr_file_seek(fb->file, APR_SET, (apr_off_t *)&fb->file_pos);\n    }\n\n    return s;\n}\n\nint aos_open_file_for_write(aos_pool_t *p, const char *path, aos_file_buf_t *fb)\n{\n    int s;\n    char buf[256];\n\n    if ((s = apr_file_open(&fb->file, path, APR_CREATE | APR_WRITE | APR_TRUNCATE,\n                APR_UREAD | APR_UWRITE | APR_GREAD, p)) != APR_SUCCESS) {\n        aos_error_log(\"apr_file_open failure, path:%s, code:%d %s.\", (path ? path : \"\"), s, apr_strerror(s, buf, sizeof(buf)));\n        //assert(fb->file == NULL);\n        return AOSE_OPEN_FILE_ERROR;\n    }\n    fb->owner = 1;\n\n    return AOSE_OK;\n}\n\nint aos_open_file_for_write_notrunc(aos_pool_t *p, const char *path, aos_file_buf_t *fb)\n{    \n    int s;\n    char buf[256];\n\n    if ((s = apr_file_open(&fb->file, path, APR_CREATE | APR_WRITE,\n                APR_UREAD | APR_UWRITE | APR_GREAD, p)) != APR_SUCCESS) {\n        aos_error_log(\"apr_file_open failure, path:%s, code:%d %s.\", (path ? path : \"\"), s, apr_strerror(s, buf, sizeof(buf)));\n        //assert(fb->file == NULL);\n        return AOSE_OPEN_FILE_ERROR;\n    }\n    fb->owner = 1;\n\n    return AOSE_OK;\n}\n\nvoid aos_buf_append_string(aos_pool_t *p, aos_buf_t *b, const char *str, int len)\n{\n    int size;\n    int nsize;\n    int remain;\n    char *buf;\n\n    if (len <= 0) return;\n\n    remain = b->end - b->last;\n\n    if (remain > len + 128) {\n        memcpy(b->last, str, len);\n        b->last += len;\n    } else {\n        size = aos_buf_size(b);\n        nsize = (size + len) * 2;\n        buf = aos_palloc(p, nsize);\n        memcpy(buf, b->pos, size);\n        memcpy(buf+size, str, len);\n        b->start = (uint8_t *)buf;\n        b->end = (uint8_t *)buf + nsize;\n        b->pos = (uint8_t *)buf;\n        b->last = (uint8_t *)buf + size + len;\n    }\n}\n"
  },
  {
    "path": "oss_c_sdk/aos_buf.h",
    "content": "#ifndef LIBAOS_BUF_H\n#define LIBAOS_BUF_H\n\n#include \"aos_define.h\"\n#include \"aos_list.h\"\n\nAOS_CPP_START\n\ntypedef struct {\n    aos_list_t node;\n    uint8_t *pos;\n    uint8_t *last;\n    uint8_t *start;\n    uint8_t *end;\n} aos_buf_t;\n\ntypedef struct {\n    aos_list_t node;\n    int64_t file_pos;\n    int64_t file_last;\n    apr_file_t *file;\n    uint32_t owner:1;\n} aos_file_buf_t;\n\naos_buf_t *aos_create_buf(aos_pool_t *p, int size);\n#define aos_buf_size(b) (b->last - b->pos)\n\naos_file_buf_t *aos_create_file_buf(aos_pool_t *p);\n\naos_buf_t *aos_buf_pack(aos_pool_t *p, const void *data, int size);\n\nint64_t aos_buf_list_len(aos_list_t *list);\n\nchar *aos_buf_list_content(aos_pool_t *p, aos_list_t *list);\n\nvoid aos_buf_append_string(aos_pool_t *p, aos_buf_t *b, const char *str, int len);\n\n/**\n * @param fb file_pos, file_last equal file_size.\n * @return AOSE_OK success, other failure.\n */ \nint aos_open_file_for_read(aos_pool_t *p, const char *path, aos_file_buf_t *fb);\n\nint aos_open_file_for_all_read(aos_pool_t *p, const char *path, aos_file_buf_t *fb);\n\nint aos_open_file_for_range_read(aos_pool_t *p, const char *path, \n                                 int64_t file_pos, int64_t file_last, \n                                 aos_file_buf_t *fb);\n\n/**\n * create the file if not there, truncate if file exists. \n * @param fb not check file_pos, file_last.\n * @return AOSE_OK success, other failure.\n */\nint aos_open_file_for_write(aos_pool_t *p, const char *path, aos_file_buf_t *fb);\n\n/**\n * create the file if not there.\n * @param fb not check file_pos, file_last.\n * @return AOSE_OK success, other failure.\n */\nint aos_open_file_for_write_notrunc(aos_pool_t *p, const char *path, aos_file_buf_t *fb);\n\nAOS_CPP_END\n\n#endif\n\n"
  },
  {
    "path": "oss_c_sdk/aos_crc64.c",
    "content": "/* aos_crc64.c -- compute CRC-64\n * Copyright (C) 2013 Mark Adler\n * Version 1.4  16 Dec 2013  Mark Adler\n */\n\n/*\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the author be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n\n  Mark Adler\n  madler@alumni.caltech.edu\n */\n\n/* Compute CRC-64 in the manner of xz, using the ECMA-182 polynomial,\n   bit-reversed, with one's complement pre and post processing.  Provide a\n   means to combine separately computed CRC-64's. */\n\n/* Version history:\n   1.0  13 Dec 2013  First version\n   1.1  13 Dec 2013  Fix comments in test code\n   1.2  14 Dec 2013  Determine endianess at run time\n   1.3  15 Dec 2013  Add eight-byte processing for big endian as well\n                     Make use of the pthread library optional\n   1.4  16 Dec 2013  Make once variable volatile for limited thread protection\n */\n\n#include \"aos_crc64.h\"\n\n/* 64-bit CRC polynomial with these coefficients, but reversed:\n    64, 62, 57, 55, 54, 53, 52, 47, 46, 45, 40, 39, 38, 37, 35, 33, 32,\n    31, 29, 27, 24, 23, 22, 21, 19, 17, 13, 12, 10, 9, 7, 4, 1, 0 */\n#define POLY UINT64_C(0xc96c5795d7870f42)\n\n/* Tables for CRC calculation -- filled in by initialization functions that are\n   called once.  These could be replaced by constant tables generated in the\n   same way.  There are two tables, one for each endianess.  Since these are\n   static, i.e. local, one should be compiled out of existence if the compiler\n   can evaluate the endianess check in crc64() at compile time. */\nstatic uint64_t crc64_little_table[8][256];\nstatic uint64_t crc64_big_table[8][256];\n\n/* Fill in the CRC-64 constants table. */\nstatic void crc64_init(uint64_t table[][256])\n{\n    unsigned n, k;\n    uint64_t crc;\n\n    /* generate CRC-64's for all single byte sequences */\n    for (n = 0; n < 256; n++) {\n        crc = n;\n        for (k = 0; k < 8; k++)\n            crc = crc & 1 ? POLY ^ (crc >> 1) : crc >> 1;\n        table[0][n] = crc;\n    }\n\n    /* generate CRC-64's for those followed by 1 to 7 zeros */\n    for (n = 0; n < 256; n++) {\n        crc = table[0][n];\n        for (k = 1; k < 8; k++) {\n            crc = table[0][crc & 0xff] ^ (crc >> 8);\n            table[k][n] = crc;\n        }\n    }\n}\n\n/* This function is called once to initialize the CRC-64 table for use on a\n   little-endian architecture. */\nstatic void crc64_little_init(void)\n{\n    crc64_init(crc64_little_table);\n}\n\n/* Reverse the bytes in a 64-bit word. */\nstatic APR_INLINE uint64_t rev8(uint64_t a)\n{\n    uint64_t m;\n\n    m = UINT64_C(0xff00ff00ff00ff);\n    a = ((a >> 8) & m) | (a & m) << 8;\n    m = UINT64_C(0xffff0000ffff);\n    a = ((a >> 16) & m) | (a & m) << 16;\n    return a >> 32 | a << 32;\n}\n\n/* This function is called once to initialize the CRC-64 table for use on a\n   big-endian architecture. */\nstatic void crc64_big_init(void)\n{\n    unsigned k, n;\n\n    crc64_init(crc64_big_table);\n    for (k = 0; k < 8; k++)\n        for (n = 0; n < 256; n++)\n            crc64_big_table[k][n] = rev8(crc64_big_table[k][n]);\n}\n\n/* Run the init() function exactly once.  If pthread.h is not included, then\n   this macro will use a simple static state variable for the purpose, which is\n   not thread-safe.  The init function must be of the type void init(void). */\n#ifdef PTHREAD_ONCE_INIT\n#  define ONCE(init) \\\n    do { \\\n        static pthread_once_t once = PTHREAD_ONCE_INIT; \\\n        pthread_once(&once, init); \\\n    } while (0)\n#else\n#  define ONCE(init) \\\n    do { \\\n        static volatile int once = 1; \\\n        if (once) { \\\n            if (once++ == 1) { \\\n                init(); \\\n                once = 0; \\\n            } \\\n            else \\\n                while (once) \\\n                    ; \\\n        } \\\n    } while (0)\n#endif\n\n/* Calculate a CRC-64 eight bytes at a time on a little-endian architecture. */\nstatic APR_INLINE uint64_t crc64_little(uint64_t crc, void *buf, size_t len)\n{\n    unsigned char *next = buf;\n\n    ONCE(crc64_little_init);\n    crc = ~crc;\n    while (len && ((uintptr_t)next & 7) != 0) {\n        crc = crc64_little_table[0][(crc ^ *next++) & 0xff] ^ (crc >> 8);\n        len--;\n    }\n    while (len >= 8) {\n        crc ^= *(uint64_t *)next;\n        crc = crc64_little_table[7][crc & 0xff] ^\n              crc64_little_table[6][(crc >> 8) & 0xff] ^\n              crc64_little_table[5][(crc >> 16) & 0xff] ^\n              crc64_little_table[4][(crc >> 24) & 0xff] ^\n              crc64_little_table[3][(crc >> 32) & 0xff] ^\n              crc64_little_table[2][(crc >> 40) & 0xff] ^\n              crc64_little_table[1][(crc >> 48) & 0xff] ^\n              crc64_little_table[0][crc >> 56];\n        next += 8;\n        len -= 8;\n    }\n    while (len) {\n        crc = crc64_little_table[0][(crc ^ *next++) & 0xff] ^ (crc >> 8);\n        len--;\n    }\n    return ~crc;\n}\n\n/* Calculate a CRC-64 eight bytes at a time on a big-endian architecture. */\nstatic APR_INLINE uint64_t crc64_big(uint64_t crc, void *buf, size_t len)\n{\n    unsigned char *next = buf;\n\n    ONCE(crc64_big_init);\n    crc = ~rev8(crc);\n    while (len && ((uintptr_t)next & 7) != 0) {\n        crc = crc64_big_table[0][(crc >> 56) ^ *next++] ^ (crc << 8);\n        len--;\n    }\n    while (len >= 8) {\n        crc ^= *(uint64_t *)next;\n        crc = crc64_big_table[0][crc & 0xff] ^\n              crc64_big_table[1][(crc >> 8) & 0xff] ^\n              crc64_big_table[2][(crc >> 16) & 0xff] ^\n              crc64_big_table[3][(crc >> 24) & 0xff] ^\n              crc64_big_table[4][(crc >> 32) & 0xff] ^\n              crc64_big_table[5][(crc >> 40) & 0xff] ^\n              crc64_big_table[6][(crc >> 48) & 0xff] ^\n              crc64_big_table[7][crc >> 56];\n        next += 8;\n        len -= 8;\n    }\n    while (len) {\n        crc = crc64_big_table[0][(crc >> 56) ^ *next++] ^ (crc << 8);\n        len--;\n    }\n    return ~rev8(crc);\n}\n\n/* Return the CRC-64 of buf[0..len-1] with initial crc, processing eight bytes\n   at a time.  This selects one of two routines depending on the endianess of\n   the architecture.  A good optimizing compiler will determine the endianess\n   at compile time if it can, and get rid of the unused code and table.  If the\n   endianess can be changed at run time, then this code will handle that as\n   well, initializing and using two tables, if called upon to do so. */\nuint64_t aos_crc64(uint64_t crc, void *buf, size_t len)\n{\n    uint64_t n = 1;\n\n    return *(char *)&n ? crc64_little(crc, buf, len) :\n                         crc64_big(crc, buf, len);\n}\n\nuint64_t aos_crc64_test(uint64_t crc, void *buf, size_t len, int little)\n{\n    return little ? crc64_little(crc, buf, len): crc64_big(crc, buf, len);\n}\n\n#define GF2_DIM 64      /* dimension of GF(2) vectors (length of CRC) */\n\nstatic uint64_t gf2_matrix_times(uint64_t *mat, uint64_t vec)\n{\n    uint64_t sum;\n\n    sum = 0;\n    while (vec) {\n        if (vec & 1)\n            sum ^= *mat;\n        vec >>= 1;\n        mat++;\n    }\n    return sum;\n}\n\nstatic void gf2_matrix_square(uint64_t *square, uint64_t *mat)\n{\n    unsigned n;\n\n    for (n = 0; n < GF2_DIM; n++)\n        square[n] = gf2_matrix_times(mat, mat[n]);\n}\n\n/* Return the CRC-64 of two sequential blocks, where crc1 is the CRC-64 of the\n   first block, crc2 is the CRC-64 of the second block, and len2 is the length\n   of the second block. */\nuint64_t aos_crc64_combine(uint64_t crc1, uint64_t crc2, uintmax_t len2)\n{\n    unsigned n;\n    uint64_t row;\n    uint64_t even[GF2_DIM];     /* even-power-of-two zeros operator */\n    uint64_t odd[GF2_DIM];      /* odd-power-of-two zeros operator */\n\n    /* degenerate case */\n    if (len2 == 0)\n        return crc1;\n\n    /* put operator for one zero bit in odd */\n    odd[0] = POLY;              /* CRC-64 polynomial */\n    row = 1;\n    for (n = 1; n < GF2_DIM; n++) {\n        odd[n] = row;\n        row <<= 1;\n    }\n\n    /* put operator for two zero bits in even */\n    gf2_matrix_square(even, odd);\n\n    /* put operator for four zero bits in odd */\n    gf2_matrix_square(odd, even);\n\n    /* apply len2 zeros to crc1 (first square will put the operator for one\n       zero byte, eight zero bits, in even) */\n    do {\n        /* apply zeros operator for this bit of len2 */\n        gf2_matrix_square(even, odd);\n        if (len2 & 1)\n            crc1 = gf2_matrix_times(even, crc1);\n        len2 >>= 1;\n\n        /* if no more bits set, then done */\n        if (len2 == 0)\n            break;\n\n        /* another iteration of the loop with odd and even swapped */\n        gf2_matrix_square(odd, even);\n        if (len2 & 1)\n            crc1 = gf2_matrix_times(odd, crc1);\n        len2 >>= 1;\n\n        /* if no more bits set, then done */\n    } while (len2 != 0);\n\n    /* return combined crc */\n    crc1 ^= crc2;\n    return crc1;\n}\n\n/*CRC32*/\nstatic const uint32_t crc32Table[256] = {\n    0x00000000,0x77073096,0xEE0E612C,0x990951BA,0x076DC419,0x706AF48F,0xE963A535,\n    0x9E6495A3,0x0EDB8832,0x79DCB8A4,0xE0D5E91E,0x97D2D988,0x09B64C2B,0x7EB17CBD,\n    0xE7B82D07,0x90BF1D91,0x1DB71064,0x6AB020F2,0xF3B97148,0x84BE41DE,0x1ADAD47D,\n    0x6DDDE4EB,0xF4D4B551,0x83D385C7,0x136C9856,0x646BA8C0,0xFD62F97A,0x8A65C9EC,\n    0x14015C4F,0x63066CD9,0xFA0F3D63,0x8D080DF5,0x3B6E20C8,0x4C69105E,0xD56041E4,\n    0xA2677172,0x3C03E4D1,0x4B04D447,0xD20D85FD,0xA50AB56B,0x35B5A8FA,0x42B2986C,\n    0xDBBBC9D6,0xACBCF940,0x32D86CE3,0x45DF5C75,0xDCD60DCF,0xABD13D59,0x26D930AC,\n    0x51DE003A,0xC8D75180,0xBFD06116,0x21B4F4B5,0x56B3C423,0xCFBA9599,0xB8BDA50F,\n    0x2802B89E,0x5F058808,0xC60CD9B2,0xB10BE924,0x2F6F7C87,0x58684C11,0xC1611DAB,\n    0xB6662D3D,0x76DC4190,0x01DB7106,0x98D220BC,0xEFD5102A,0x71B18589,0x06B6B51F,\n    0x9FBFE4A5,0xE8B8D433,0x7807C9A2,0x0F00F934,0x9609A88E,0xE10E9818,0x7F6A0DBB,\n    0x086D3D2D,0x91646C97,0xE6635C01,0x6B6B51F4,0x1C6C6162,0x856530D8,0xF262004E,\n    0x6C0695ED,0x1B01A57B,0x8208F4C1,0xF50FC457,0x65B0D9C6,0x12B7E950,0x8BBEB8EA,\n    0xFCB9887C,0x62DD1DDF,0x15DA2D49,0x8CD37CF3,0xFBD44C65,0x4DB26158,0x3AB551CE,\n    0xA3BC0074,0xD4BB30E2,0x4ADFA541,0x3DD895D7,0xA4D1C46D,0xD3D6F4FB,0x4369E96A,\n    0x346ED9FC,0xAD678846,0xDA60B8D0,0x44042D73,0x33031DE5,0xAA0A4C5F,0xDD0D7CC9,\n    0x5005713C,0x270241AA,0xBE0B1010,0xC90C2086,0x5768B525,0x206F85B3,0xB966D409,\n    0xCE61E49F,0x5EDEF90E,0x29D9C998,0xB0D09822,0xC7D7A8B4,0x59B33D17,0x2EB40D81,\n    0xB7BD5C3B,0xC0BA6CAD,0xEDB88320,0x9ABFB3B6,0x03B6E20C,0x74B1D29A,0xEAD54739,\n    0x9DD277AF,0x04DB2615,0x73DC1683,0xE3630B12,0x94643B84,0x0D6D6A3E,0x7A6A5AA8,\n    0xE40ECF0B,0x9309FF9D,0x0A00AE27,0x7D079EB1,0xF00F9344,0x8708A3D2,0x1E01F268,\n    0x6906C2FE,0xF762575D,0x806567CB,0x196C3671,0x6E6B06E7,0xFED41B76,0x89D32BE0,\n    0x10DA7A5A,0x67DD4ACC,0xF9B9DF6F,0x8EBEEFF9,0x17B7BE43,0x60B08ED5,0xD6D6A3E8,\n    0xA1D1937E,0x38D8C2C4,0x4FDFF252,0xD1BB67F1,0xA6BC5767,0x3FB506DD,0x48B2364B,\n    0xD80D2BDA,0xAF0A1B4C,0x36034AF6,0x41047A60,0xDF60EFC3,0xA867DF55,0x316E8EEF,\n    0x4669BE79,0xCB61B38C,0xBC66831A,0x256FD2A0,0x5268E236,0xCC0C7795,0xBB0B4703,\n    0x220216B9,0x5505262F,0xC5BA3BBE,0xB2BD0B28,0x2BB45A92,0x5CB36A04,0xC2D7FFA7,\n    0xB5D0CF31,0x2CD99E8B,0x5BDEAE1D,0x9B64C2B0,0xEC63F226,0x756AA39C,0x026D930A,\n    0x9C0906A9,0xEB0E363F,0x72076785,0x05005713,0x95BF4A82,0xE2B87A14,0x7BB12BAE,\n    0x0CB61B38,0x92D28E9B,0xE5D5BE0D,0x7CDCEFB7,0x0BDBDF21,0x86D3D2D4,0xF1D4E242,\n    0x68DDB3F8,0x1FDA836E,0x81BE16CD,0xF6B9265B,0x6FB077E1,0x18B74777,0x88085AE6,\n    0xFF0F6A70,0x66063BCA,0x11010B5C,0x8F659EFF,0xF862AE69,0x616BFFD3,0x166CCF45,\n    0xA00AE278,0xD70DD2EE,0x4E048354,0x3903B3C2,0xA7672661,0xD06016F7,0x4969474D,\n    0x3E6E77DB,0xAED16A4A,0xD9D65ADC,0x40DF0B66,0x37D83BF0,0xA9BCAE53,0xDEBB9EC5,\n    0x47B2CF7F,0x30B5FFE9,0xBDBDF21C,0xCABAC28A,0x53B39330,0x24B4A3A6,0xBAD03605,\n    0xCDD70693,0x54DE5729,0x23D967BF,0xB3667A2E,0xC4614AB8,0x5D681B02,0x2A6F2B94,\n    0xB40BBE37,0xC30C8EA1,0x5A05DF1B,0x2D02EF8D\n};\n\nuint32_t aos_crc32(uint32_t crc, const void *buf, size_t bufLen) \n{\n    uint32_t crc32;\n    unsigned char *byteBuf;\n    size_t i;\n\n    /** accumulate crc32 for buffer **/\n    crc32 = crc ^ 0xFFFFFFFF;\n    byteBuf = (unsigned char*)buf;\n    for (i = 0; i < bufLen; i++) {\n        crc32 = (crc32 >> 8) ^ crc32Table[(crc32 ^ byteBuf[i]) & 0xFF];\n    }\n    return crc32 ^ 0xFFFFFFFF;\n}\n"
  },
  {
    "path": "oss_c_sdk/aos_crc64.h",
    "content": "#ifndef LIBAOS_CRC_H\n#define LIBAOS_CRC_H\n\n#include \"aos_define.h\"\n\nAOS_CPP_START\n\nuint64_t aos_crc64(uint64_t crc, void *buf, size_t len);\nuint64_t aos_crc64_combine(uint64_t crc1, uint64_t crc2, uintmax_t len2);\nuint32_t aos_crc32(uint32_t crc, const void *buf, size_t bufLen);\nuint64_t aos_crc64_test(uint64_t crc, void *buf, size_t len, int little);\n\nAOS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/aos_define.h",
    "content": "#ifndef LIBAOS_DEFINE_H\n#define LIBAOS_DEFINE_H\n\n#include <stdint.h>\n#include <stdlib.h>\n#include <assert.h>\n#include <string.h>\n#include <ctype.h>\n#include <time.h>\n\n#include <apr_portable.h>\n#include <apr_time.h>\n#include <apr_strings.h>\n#include <apr_pools.h>\n#include <apr_tables.h>\n#include <apr_file_io.h>\n\n#include <curl/curl.h>\n\n#ifdef __cplusplus\n# define AOS_CPP_START extern \"C\" {\n# define AOS_CPP_END }\n#else\n# define AOS_CPP_START\n# define AOS_CPP_END\n#endif\n\ntypedef enum {\n    HTTP_GET,\n    HTTP_HEAD,\n    HTTP_PUT,\n    HTTP_POST,\n    HTTP_DELETE\n} http_method_e;\n\ntypedef enum {\n    AOSE_OK = 0,\n    AOSE_OUT_MEMORY = -1000,\n    AOSE_OVER_MEMORY = -999,\n    AOSE_FAILED_CONNECT = -998,\n    AOSE_ABORT_CALLBACK = -997,\n    AOSE_INTERNAL_ERROR = -996,\n    AOSE_REQUEST_TIMEOUT = -995,\n    AOSE_INVALID_ARGUMENT = -994,\n    AOSE_INVALID_OPERATION = -993,\n    AOSE_CONNECTION_FAILED = -992,\n    AOSE_FAILED_INITIALIZE = -991,\n    AOSE_NAME_LOOKUP_ERROR = -990,\n    AOSE_FAILED_VERIFICATION = -989,\n    AOSE_WRITE_BODY_ERROR = -988,\n    AOSE_READ_BODY_ERROR = -987,\n    AOSE_SERVICE_ERROR = -986,\n    AOSE_OPEN_FILE_ERROR = -985,\n    AOSE_FILE_SEEK_ERROR = -984,\n    AOSE_FILE_INFO_ERROR = -983,\n    AOSE_FILE_READ_ERROR = -982,\n    AOSE_FILE_WRITE_ERROR = -981,\n    AOSE_XML_PARSE_ERROR = -980,\n    AOSE_UTF8_ENCODE_ERROR = -979,\n    AOSE_CRC_INCONSISTENT_ERROR = -978,\n    AOSE_FILE_FLUSH_ERROR = -977,\n    AOSE_FILE_TRUNC_ERROR = -976,\n    AOSE_SELECT_OBJECT_CRC_ERROR = -975,\n    AOSE_UNKNOWN_ERROR = -100\n} aos_error_code_e;\n\ntypedef apr_pool_t aos_pool_t;\ntypedef apr_table_t aos_table_t;\ntypedef apr_table_entry_t aos_table_entry_t;\ntypedef apr_array_header_t aos_array_header_t;\n\n#define aos_table_elts(t) apr_table_elts(t)\n#define aos_is_empty_table(t) apr_is_empty_table(t)\n#define aos_table_make(p, n) apr_table_make(p, n)\n#define aos_table_add_int(t, key, value) do {       \\\n        char value_str[64];                             \\\n        apr_snprintf(value_str, sizeof(value_str), \"%d\", value);\\\n        apr_table_add(t, key, value_str);               \\\n    } while(0)\n\n#define aos_table_add_int64(t, key, value) do {       \\\n        char value_str[64];                             \\\n        apr_snprintf(value_str, sizeof(value_str), \"%\" APR_INT64_T_FMT, value);\\\n        apr_table_add(t, key, value_str);               \\\n    } while(0)\n\n#define aos_table_set_int64(t, key, value) do {       \\\n        char value_str[64];                             \\\n        apr_snprintf(value_str, sizeof(value_str), \"%\" APR_INT64_T_FMT, value);\\\n        apr_table_set(t, key, value_str);               \\\n    } while(0)\n\n#define aos_pool_create(n, p) apr_pool_create(n, p)\n#define aos_pool_destroy(p) apr_pool_destroy(p)\n#define aos_palloc(p, s) apr_palloc(p, s)\n#define aos_pcalloc(p, s) apr_pcalloc(p, s)\n\n#define AOS_INIT_WINSOCK 1\n#define AOS_MD5_STRING_LEN 32\n#define AOS_MAX_URI_LEN 2048\n#define AOS_MAX_HEADER_LEN 8192\n#define AOS_MAX_QUERY_ARG_LEN 1024\n#define AOS_MAX_GMT_TIME_LEN 128\n#define AOS_MAX_SHORT_TIME_LEN 10\n\n#define AOS_MAX_XML_NODE_VALUE_LEN 1024\n#define AOS_MAX_INT64_STRING_LEN 64\n#define AOS_MAX_UINT64_STRING_LEN 64\n\n#define AOS_CONNECT_TIMEOUT 10\n#define AOS_DNS_CACHE_TIMOUT 60\n#define AOS_MIN_SPEED_LIMIT 1024\n#define AOS_MIN_SPEED_TIME 15\n#define AOS_MAX_MEMORY_SIZE 1024*1024*1024L\n#define AOS_MAX_PART_SIZE 512*1024*1024L\n#define AOS_DEFAULT_PART_SIZE 1024*1024L\n\n#define AOS_REQUEST_STACK_SIZE 32\n\n#define aos_abs(value)       (((value) >= 0) ? (value) : - (value))\n#define aos_max(val1, val2)  (((val1) < (val2)) ? (val2) : (val1))\n#define aos_min(val1, val2)  (((val1) > (val2)) ? (val2) : (val1))\n\n#define LF     (char) 10\n#define CR     (char) 13\n#define CRLF   \"\\x0d\\x0a\"\n\n#define AOS_VERSION    \"3.11.2\"\n#define AOS_VER        \"aliyun-sdk-c/\" AOS_VERSION\n\n#define AOS_HTTP_PREFIX   \"http://\"\n#define AOS_HTTPS_PREFIX  \"https://\"\n#define AOS_RTMP_PREFIX   \"rtmp://\"\n\n#define AOS_TEMP_FILE_SUFFIX  \".tmp\"\n\n#define AOS_FALSE     0\n#define AOS_TRUE      1\n\n# ifndef WIN32\n# ifndef __LONG_LONG_MAX__\n# define __LONG_LONG_MAX__ 9223372036854775807LL\n# endif\n# ifndef LLONG_MIN\n#  define LLONG_MIN (-LLONG_MAX-1)\n# endif\n# ifndef LLONG_MAX\n#  define LLONG_MAX __LONG_LONG_MAX__\n# endif\n# ifndef ULLONG_MAX\n#  define ULLONG_MAX (LLONG_MAX * 2ULL + 1)\n# endif\n# endif\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/aos_fstack.c",
    "content": "#include \"aos_fstack.h\"\n\naos_array_header_t *aos_fstack_create(aos_pool_t *p, int size)\n{\n    return apr_array_make(p, size, sizeof(aos_fstack_item_t));\n}\n\nvoid aos_fstack_push(aos_array_header_t *fstack, void *data, aos_func_u func, int order)\n{\n    aos_fstack_item_t *item;\n\n    item = (aos_fstack_item_t*)apr_array_push(fstack);\n    item->data = data;\n    item->func = func;\n    item->order = order;\n}\n\naos_fstack_item_t *aos_fstack_pop(aos_array_header_t *fstack)\n{\n    aos_fstack_item_t *item;    \n    \n    item = (aos_fstack_item_t*)apr_array_pop(fstack);\n    if (item == NULL) {\n        return NULL;\n    }\n\n    switch (item->order) {\n        case 1:\n            item->func.func1(item->data);\n            break;\n        case 2:\n            item->func.func2();\n            break;\n        case 3:\n            item->func.func3(item->data);\n            break;\n        case 4:\n            item->func.func4();\n            break;\n        default:\n            break;\n    }\n    \n    return item;\n}\n\nvoid aos_fstack_destory(aos_array_header_t *fstack)\n{\n    while (aos_fstack_pop(fstack) != NULL);\n}\n"
  },
  {
    "path": "oss_c_sdk/aos_fstack.h",
    "content": "#ifndef LIBAOS_FSTACK_H\n#define LIBAOS_FSTACK_H\n\n#include \"aos_define.h\"\n\nAOS_CPP_START\n\ntypedef void (*aos_func1_pt)(void*);\ntypedef void (*aos_func2_pt)();\ntypedef int (*aos_func3_pt)(void*);\ntypedef int (*aos_func4_pt)();\n\ntypedef union aos_func_u {\n    aos_func1_pt func1;\n    aos_func2_pt func2;\n    aos_func3_pt func3;\n    aos_func4_pt func4;\n} aos_func_u;\n\ntypedef struct aos_fstack_item_t {\n    void *data;\n    aos_func_u func;\n    int order;\n} aos_fstack_item_t;\n\naos_array_header_t *aos_fstack_create(aos_pool_t *p, int size);\n\naos_fstack_item_t *aos_fstack_pop(aos_array_header_t *fstack);\n\nvoid aos_fstack_destory(aos_array_header_t *fstack);\n\nvoid aos_fstack_push(aos_array_header_t *fstack, void *data, aos_func_u func, int order);\n\nAOS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/aos_http_io.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_http_io.h\"\n#include \"aos_define.h\"\n#include <apr_thread_mutex.h>\n#include <apr_file_io.h>\n\naos_pool_t *aos_global_pool = NULL;\napr_file_t *aos_stderr_file = NULL;\n\naos_http_request_options_t *aos_default_http_request_options = NULL;\naos_http_transport_options_t *aos_default_http_transport_options = NULL;\n\naos_http_transport_create_pt aos_http_transport_create = aos_curl_http_transport_create;\naos_http_transport_perform_pt aos_http_transport_perform = aos_curl_http_transport_perform;\n\nstatic apr_thread_mutex_t* requestStackMutexG = NULL;\nstatic CURL *requestStackG[AOS_REQUEST_STACK_SIZE];\nstatic int requestStackCountG;\nstatic char aos_user_agent[256];\n\n\nstatic aos_http_transport_options_t *aos_http_transport_options_create(aos_pool_t *p);\n\nCURL *aos_request_get()\n{\n    CURL *request = NULL;\n    \n    apr_thread_mutex_lock(requestStackMutexG);\n    if (requestStackCountG > 0) {\n        request = requestStackG[--requestStackCountG];\n    }\n    apr_thread_mutex_unlock(requestStackMutexG);\n\n    // If we got one, deinitialize it for re-use\n    if (request) {\n        curl_easy_reset(request);\n    }\n    else {\n        request = curl_easy_init();\n    }\n\n    return request;\n}\n\nvoid request_release(CURL *request)\n{\n    apr_thread_mutex_lock(requestStackMutexG);\n\n    // If the request stack is full, destroy this one\n    // else put this one at the front of the request stack; we do this because\n    // we want the most-recently-used curl handle to be re-used on the next\n    // request, to maximize our chances of re-using a TCP connection before it\n    // times out\n    if (requestStackCountG == AOS_REQUEST_STACK_SIZE) {\n        apr_thread_mutex_unlock(requestStackMutexG);\n        curl_easy_cleanup(request);\n    }\n    else {\n        requestStackG[requestStackCountG++] = request;\n        apr_thread_mutex_unlock(requestStackMutexG);\n    }\n}\n\nvoid request_release2(aos_curl_http_transport_t* t)\n{\n    CURL* request = t->curl;\n    CURLcode code = t->curl_code;\n    apr_thread_mutex_lock(requestStackMutexG);\n\n    // If the request stack is full, destroy this one\n    // else put this one at the front of the request stack; we do this because\n    // we want the most-recently-used curl handle to be re-used on the next\n    // request, to maximize our chances of re-using a TCP connection before it\n    // times out\n    if (requestStackCountG == AOS_REQUEST_STACK_SIZE || code != CURLE_OK) {\n        apr_thread_mutex_unlock(requestStackMutexG);\n        curl_easy_cleanup(request);\n    }\n    else {\n        requestStackG[requestStackCountG++] = request;\n        apr_thread_mutex_unlock(requestStackMutexG);\n    }\n}\n\nvoid aos_set_default_request_options(aos_http_request_options_t *op)\n{\n    aos_default_http_request_options = op;\n}\n\nvoid aos_set_default_transport_options(aos_http_transport_options_t *op)\n{\n    aos_default_http_transport_options = op;\n}\n\naos_http_request_options_t *aos_http_request_options_create(aos_pool_t *p)\n{\n    aos_http_request_options_t *options;\n    \n    options = (aos_http_request_options_t *)aos_pcalloc(p, sizeof(aos_http_request_options_t));\n    options->speed_limit = AOS_MIN_SPEED_LIMIT;\n    options->speed_time = AOS_MIN_SPEED_TIME;\n    options->connect_timeout = AOS_CONNECT_TIMEOUT;\n    options->dns_cache_timeout = AOS_DNS_CACHE_TIMOUT;\n    options->max_memory_size = AOS_MAX_MEMORY_SIZE;\n    options->enable_crc = AOS_TRUE;\n    options->proxy_auth = NULL;\n    options->proxy_host = NULL;\n    options->verify_ssl = AOS_TRUE;\n    options->ca_file = NULL;\n    options->ca_path = NULL;\n    options->verify_object_strict = AOS_TRUE;\n\n    return options;\n}\n\naos_http_transport_options_t *aos_http_transport_options_create(aos_pool_t *p)\n{\n    return (aos_http_transport_options_t *)aos_pcalloc(p, sizeof(aos_http_transport_options_t));\n}\n\naos_http_controller_t *aos_http_controller_create(aos_pool_t *p, int owner)\n{\n    int s;\n    aos_http_controller_t *ctl;\n\n    if(p == NULL) {\n        if ((s = aos_pool_create(&p, NULL)) != APR_SUCCESS) {\n            aos_fatal_log(\"aos_pool_create failure.\");\n            return NULL;\n        }\n    }\n\n    ctl = (aos_http_controller_t *)aos_pcalloc(p, sizeof(aos_http_controller_ex_t));\n    ctl->pool = p;\n    ctl->owner = owner;\n    ctl->options = aos_default_http_request_options;\n\n    return ctl;\n}\n\naos_http_request_t *aos_http_request_create(aos_pool_t *p)\n{\n    aos_http_request_t *req;\n\n    req = (aos_http_request_t *)aos_pcalloc(p, sizeof(aos_http_request_t));\n    req->method = HTTP_GET;\n    req->headers = aos_table_make(p, 5);\n    req->query_params = aos_table_make(p, 3);\n    aos_list_init(&req->body);\n    req->type = BODY_IN_MEMORY;\n    req->body_len = 0;\n    req->pool = p;\n    req->read_body = aos_read_http_body_memory;\n    req->normalize_url = 0;\n    return req;\n}\n\naos_http_response_t *aos_http_response_create(aos_pool_t *p)\n{\n    aos_http_response_t *resp;\n\n    resp = (aos_http_response_t *)aos_pcalloc(p, sizeof(aos_http_response_t));\n    resp->status = -1;\n    resp->headers = aos_table_make(p, 10);\n    aos_list_init(&resp->body);\n    resp->type = BODY_IN_MEMORY;\n    resp->body_len = 0;\n    resp->pool = p;\n    resp->write_body = aos_write_http_body_memory;\n\n    return resp;\n}\n\nint aos_read_http_body_memory(aos_http_request_t *req, char *buffer, int len)\n{\n    int wsize;\n    int bytes = 0;\n    aos_buf_t *b;\n    aos_buf_t *n;\n    \n    aos_list_for_each_entry_safe(aos_buf_t, b, n, &req->body, node) {\n        wsize = aos_buf_size(b);\n        if (wsize == 0) {\n            aos_list_del(&b->node);\n            continue;\n        }\n        wsize = aos_min(len - bytes, wsize);\n        if (wsize == 0) {\n            break;\n        }\n        memcpy(buffer + bytes, b->pos, wsize);\n        b->pos += wsize;\n        bytes += wsize;\n        if (b->pos == b->last) {\n            aos_list_del(&b->node);\n        }\n    }\n\n    return bytes;\n}\n\nint aos_read_http_body_file(aos_http_request_t *req, char *buffer, int len)\n{\n    int s;\n    char buf[256];\n    apr_size_t nbytes = len;\n    apr_size_t bytes_left;\n    \n    if (req->file_buf == NULL || req->file_buf->file == NULL) {\n        aos_error_log(\"request body arg invalid file_buf NULL.\");\n        return AOSE_INVALID_ARGUMENT;\n    }\n\n    if (req->file_buf->file_pos >= req->file_buf->file_last) {\n        aos_debug_log(\"file read finish.\");\n        return 0;\n    }\n\n    bytes_left = (apr_size_t)(req->file_buf->file_last - req->file_buf->file_pos);\n    if (nbytes > bytes_left) {\n        nbytes = bytes_left;\n    }\n\n    s = apr_file_read(req->file_buf->file, buffer, &nbytes);\n    if (s != APR_SUCCESS && s != APR_EOF) {\n        aos_error_log(\"apr_file_read filure, file:%s, code:%d %s.\", req->file_path, s, apr_strerror(s, buf, sizeof(buf)));\n        return AOSE_FILE_READ_ERROR;\n    }\n    req->file_buf->file_pos += nbytes;\n    return nbytes;\n}\n\nint aos_write_http_body_memory(aos_http_response_t *resp, const char *buffer, int len)\n{\n    aos_buf_t *b;\n\n    b = aos_create_buf(resp->pool, len);\n    memcpy(b->pos, buffer, len);\n    b->last += len;\n    aos_list_add_tail(&b->node, &resp->body);\n    resp->body_len += len;\n\n    return len;\n}\n\nint aos_write_http_body_file(aos_http_response_t *resp, const char *buffer, int len)\n{\n    int elen;\n    int s;\n    char buf[256];\n    apr_size_t nbytes = len;\n    \n    if (resp->file_buf == NULL) {\n        resp->file_buf = aos_create_file_buf(resp->pool);\n    }\n    \n    if (resp->file_buf->file == NULL) {\n        if (resp->file_path == NULL) {\n            aos_error_log(\"resp body file arg NULL.\");\n            return AOSE_INVALID_ARGUMENT;\n        }\n        aos_trace_log(\"open file %s.\", resp->file_path);\n        if ((elen = aos_open_file_for_write(resp->pool, resp->file_path, resp->file_buf)) != AOSE_OK) {\n            return elen;\n        }\n    }\n\n    assert(resp->file_buf->file != NULL);\n    if ((s = apr_file_write(resp->file_buf->file, buffer, &nbytes)) != APR_SUCCESS) {\n        aos_error_log(\"apr_file_write fialure, file:%s, code:%d %s.\", resp->file_path, s, apr_strerror(s, buf, sizeof(buf)));\n        return AOSE_FILE_WRITE_ERROR;\n    }\n    \n    resp->file_buf->file_last += nbytes;\n    resp->body_len += nbytes;\n\n    return nbytes;\n}\n\nint aos_http_io_initialize(const char *user_agent_info, int flags)\n{\n    CURLcode ecode;\n    int s;\n    char buf[256];\n    aos_http_request_options_t *req_options;\n    aos_http_transport_options_t *trans_options;\n\n    if ((ecode = curl_global_init(CURL_GLOBAL_ALL &\n           ~((flags & AOS_INIT_WINSOCK) ? 0: CURL_GLOBAL_WIN32))) != CURLE_OK) \n    {\n        aos_error_log(\"curl_global_init failure, code:%d %s.\\n\", ecode, curl_easy_strerror(ecode));\n        return AOSE_INTERNAL_ERROR;\n    }\n\n    if ((s = apr_initialize()) != APR_SUCCESS) {\n        aos_error_log(\"apr_initialize failue.\\n\");\n        return AOSE_INTERNAL_ERROR;\n    }\n\n    if (!user_agent_info || !*user_agent_info) {\n        user_agent_info = \"Unknown\";\n    }\n\n    if ((s = aos_pool_create(&aos_global_pool, NULL)) != APR_SUCCESS) {\n        aos_error_log(\"aos_pool_create failure, code:%d %s.\\n\", s, apr_strerror(s, buf, sizeof(buf)));\n        return AOSE_INTERNAL_ERROR;\n    }\n\n    if ((s = apr_thread_mutex_create(&requestStackMutexG, APR_THREAD_MUTEX_DEFAULT, aos_global_pool)) != APR_SUCCESS) {\n        aos_error_log(\"apr_thread_mutex_create failure, code:%d %s.\\n\", s, apr_strerror(s, buf, sizeof(buf)));\n        return AOSE_INTERNAL_ERROR;\n    }\n    requestStackCountG = 0;\n\n    apr_snprintf(aos_user_agent, sizeof(aos_user_agent)-1, \"%s(Compatible %s)\", \n                 AOS_VER, user_agent_info);\n\n    req_options = aos_http_request_options_create(aos_global_pool);\n    trans_options = aos_http_transport_options_create(aos_global_pool);\n    trans_options->user_agent = aos_user_agent;\n\n    aos_set_default_request_options(req_options);\n    aos_set_default_transport_options(trans_options);\n\n    return AOSE_OK;\n}\n\nvoid aos_http_io_deinitialize()\n{\n    apr_thread_mutex_destroy(requestStackMutexG);\n\n    while (requestStackCountG--) {\n        curl_easy_cleanup(requestStackG[requestStackCountG]);\n    }\n\n    if (aos_stderr_file != NULL) {\n        apr_file_close(aos_stderr_file);\n        aos_stderr_file = NULL;\n    }\n    if (aos_global_pool != NULL) {\n        aos_pool_destroy(aos_global_pool);\n        aos_global_pool = NULL;\n    }\n    apr_terminate();\n}\n\nint aos_http_send_request(aos_http_controller_t *ctl, aos_http_request_t *req, aos_http_response_t *resp)\n{\n    aos_http_transport_t *t;\n\n    t = aos_http_transport_create(ctl->pool);\n    t->req = req;\n    t->resp = resp;\n    t->controller = (aos_http_controller_ex_t *)ctl;\n    \n    return aos_http_transport_perform(t);\n}\n\n"
  },
  {
    "path": "oss_c_sdk/aos_http_io.h",
    "content": "#ifndef LIBAOS_HTTP_IO_H\n#define LIBAOS_HTTP_IO_H\n\n#include \"aos_transport.h\"\n#include \"oss_define.h\"\n\nAOS_CPP_START\n\naos_http_controller_t *aos_http_controller_create(aos_pool_t *p, int owner);\n\n/* http io error message*/\nstatic APR_INLINE const char *aos_http_controller_get_reason(aos_http_controller_t *ctl)\n{\n    aos_http_controller_ex_t *ctle = (aos_http_controller_ex_t *)ctl;\n    return ctle->reason;\n}\nCURL *aos_request_get();\nvoid request_release(CURL *request);\nvoid request_release2(aos_curl_http_transport_t* t);\n\nint aos_http_io_initialize(const char *user_agent_info, int flag);\nvoid aos_http_io_deinitialize();\n\nint aos_http_send_request(aos_http_controller_t *ctl, aos_http_request_t *req, aos_http_response_t *resp);\n\nvoid aos_set_default_request_options(aos_http_request_options_t *op);\nvoid aos_set_default_transport_options(aos_http_transport_options_t *op);\n\naos_http_request_options_t *aos_http_request_options_create(aos_pool_t *p);\n\naos_http_request_t *aos_http_request_create(aos_pool_t *p);\naos_http_response_t *aos_http_response_create(aos_pool_t *p);\n\nint aos_read_http_body_memory(aos_http_request_t *req, char *buffer, int len);\nint aos_write_http_body_memory(aos_http_response_t *resp, const char *buffer, int len);\n\nint aos_read_http_body_file(aos_http_request_t *req, char *buffer, int len);\nint aos_write_http_body_file(aos_http_response_t *resp, const char *buffer, int len);\n\ntypedef aos_http_transport_t *(*aos_http_transport_create_pt)(aos_pool_t *p);\ntypedef int (*aos_http_transport_perform_pt)(aos_http_transport_t *t);\n\nextern aos_pool_t *aos_global_pool;\nextern apr_file_t *aos_stderr_file;\n\nextern aos_http_request_options_t *aos_default_http_request_options;\nextern aos_http_transport_options_t *aos_default_http_transport_options;\n\nextern aos_http_transport_create_pt aos_http_transport_create;\nextern aos_http_transport_perform_pt aos_http_transport_perform;\n\nAOS_CPP_END\n\n#endif\n\n"
  },
  {
    "path": "oss_c_sdk/aos_list.h",
    "content": "#ifndef LIBAOS_LIST_H\n#define LIBAOS_LIST_H\n\n#include <apr_general.h>\n\n// from kernel list\ntypedef struct aos_list_s aos_list_t;\n\nstruct aos_list_s {\n    aos_list_t *next, *prev;\n};\n\n#define aos_list_head_init(name) {&(name), &(name)}\n\n#define aos_list_init(ptr) do {                  \\\n        (ptr)->next = (ptr);                    \\\n        (ptr)->prev = (ptr);                    \\\n    } while (0)\n\nstatic APR_INLINE void __aos_list_add(aos_list_t *list, aos_list_t *prev, aos_list_t *next)\n{\n    next->prev = list;\n    list->next = next;\n    list->prev = prev;\n    prev->next = list;\n}\n\n// list head to add it before\nstatic APR_INLINE void aos_list_add_tail(aos_list_t *list, aos_list_t *head)\n{\n    __aos_list_add(list, head->prev, head);\n}\n\nstatic APR_INLINE void __aos_list_del(aos_list_t *prev, aos_list_t *next)\n{\n    next->prev = prev;\n    prev->next = next;\n}\n\n// deletes entry from list\nstatic APR_INLINE void aos_list_del(aos_list_t *entry)\n{\n    __aos_list_del(entry->prev, entry->next);\n    aos_list_init(entry);\n}\n\n// tests whether a list is empty\nstatic APR_INLINE int aos_list_empty(const aos_list_t *head)\n{\n    return (head->next == head);\n}\n\n// move list to new_list\nstatic APR_INLINE void aos_list_movelist(aos_list_t *list, aos_list_t *new_list)\n{\n    if (!aos_list_empty(list)) {\n        new_list->prev = list->prev;\n        new_list->next = list->next;\n        new_list->prev->next = new_list;\n        new_list->next->prev = new_list;\n        aos_list_init(list);\n    } else {\n        aos_list_init(new_list);\n    }\n}\n\n// get last\n#define aos_list_get_last(list, type, member)                           \\\n    aos_list_empty(list) ? NULL : aos_list_entry((list)->prev, type, member)\n\n// get first\n#define aos_list_get_first(list, type, member)                          \\\n    aos_list_empty(list) ? NULL : aos_list_entry((list)->next, type, member)\n\n#define aos_list_entry(ptr, type, member) \\\n    (type *)( (char *)ptr - APR_OFFSETOF(type, member) )\n\n// traversing\n#define aos_list_for_each_entry(postp, pos, head, member)                      \\\n    for (pos = aos_list_entry((head)->next, postp, member);      \\\n         &pos->member != (head);                                        \\\n         pos = aos_list_entry(pos->member.next, postp, member))\n\n#define aos_list_for_each_entry_reverse(postp, pos, head, member)              \\\n    for (pos = aos_list_entry((head)->prev, postp, member);      \\\n         &pos->member != (head);                                        \\\n         pos = aos_list_entry(pos->member.prev, postp, member))\n\n#define aos_list_for_each_entry_safe(postp, pos, n, head, member)              \\\n    for (pos = aos_list_entry((head)->next, postp, member),      \\\n                 n = aos_list_entry(pos->member.next, postp, member); \\\n         &pos->member != (head);                                        \\\n         pos = n, n = aos_list_entry(n->member.next, postp, member))\n\n#define aos_list_for_each_entry_safe_reverse(postp, pos, n, head, member)      \\\n    for (pos = aos_list_entry((head)->prev, postp, member),      \\\n                 n = aos_list_entry(pos->member.prev, postp, member); \\\n         &pos->member != (head);                                        \\\n         pos = n, n = aos_list_entry(n->member.prev, postp, member))\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/aos_log.c",
    "content": "#include \"aos_log.h\"\n#include \"apr_portable.h\"\n\naos_log_print_pt  aos_log_print = aos_log_print_default;\naos_log_format_pt aos_log_format = aos_log_format_default;\naos_log_level_e   aos_log_level = AOS_LOG_WARN;\n\nextern apr_file_t *aos_stderr_file;\n\nvoid aos_log_set_print(aos_log_print_pt p)\n{\n    aos_log_print = p;\n}\n\nvoid aos_log_set_format(aos_log_format_pt p)\n{\n    aos_log_format = p;\n}\n\nvoid aos_log_set_level(aos_log_level_e level)\n{   \n    aos_log_level = level;\n}\n\nvoid aos_log_set_output(apr_file_t *output)\n{\n    aos_stderr_file = output;\n}\n\nvoid aos_log_print_default(const char *message, int len)\n{\n    if (aos_stderr_file == NULL) {\n        fprintf(stderr, \"%s\", message);\n    } else {\n        apr_size_t bnytes = len;\n        apr_file_write(aos_stderr_file, message, &bnytes);\n    }\n}\n\nvoid aos_log_format_default(int level,\n                            const char *file,\n                            int line,\n                            const char *function,\n                            const char *fmt, ...)\n{\n    int len;\n    apr_time_t t;\n    int s;\n    apr_time_exp_t tm;\n    va_list args;\n    char buffer[4096];\n\n    t = apr_time_now();\n    if ((s = apr_time_exp_lt(&tm, t)) != APR_SUCCESS) {\n        return;\n    }\n    \n    len = apr_snprintf(buffer, 4090, \"[%04d-%02d-%02d %02d:%02d:%02d.%03d] %\" APR_INT64_T_FMT \" %s:%d \",\n                   tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,\n                   tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_usec/1000,\n                   (int64_t)apr_os_thread_current(), file, line);\n    \n    va_start(args, fmt);\n    len += vsnprintf(buffer + len, 4090 - len, fmt, args);\n    va_end(args);\n\n    while (buffer[len -1] == '\\n') len--;\n    buffer[len++] = '\\n';\n    buffer[len] = '\\0';\n\n    aos_log_print(buffer, len);\n}\n\n"
  },
  {
    "path": "oss_c_sdk/aos_log.h",
    "content": "#ifndef LIBAOS_LOG_H\n#define LIBAOS_LOG_H\n\n#include \"aos_define.h\"\n\nAOS_CPP_START\n\ntypedef void (*aos_log_print_pt)(const char *message, int len);\n\ntypedef void (*aos_log_format_pt)(int level,\n                                  const char *file,\n                                  int line,\n                                  const char *function,\n                                  const char *fmt, ...)\n        __attribute__ ((__format__ (__printf__, 5, 6)));\n\nvoid aos_log_set_print(aos_log_print_pt p);\nvoid aos_log_set_format(aos_log_format_pt p);\n\ntypedef enum {\n    AOS_LOG_OFF = 1,\n    AOS_LOG_FATAL,\n    AOS_LOG_ERROR,\n    AOS_LOG_WARN,\n    AOS_LOG_INFO,\n    AOS_LOG_DEBUG,\n    AOS_LOG_TRACE,\n    AOS_LOG_ALL\n} aos_log_level_e;\n\n#ifdef WIN32\n#define aos_fatal_log(format, ...) if(aos_log_level>=AOS_LOG_FATAL) \\\n        aos_log_format(AOS_LOG_FATAL, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)\n#define aos_error_log(format, ...) if(aos_log_level>=AOS_LOG_ERROR) \\\n        aos_log_format(AOS_LOG_ERROR, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)\n#define aos_warn_log(format, ...) if(aos_log_level>=AOS_LOG_WARN)   \\\n        aos_log_format(AOS_LOG_WARN, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)\n#define aos_info_log(format, ...) if(aos_log_level>=AOS_LOG_INFO)   \\\n        aos_log_format(AOS_LOG_INFO, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)\n#define aos_debug_log(format, ...) if(aos_log_level>=AOS_LOG_DEBUG) \\\n        aos_log_format(AOS_LOG_DEBUG, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)\n#define aos_trace_log(format, ...) if(aos_log_level>=AOS_LOG_TRACE) \\\n        aos_log_format(AOS_LOG_TRACE, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)\n#else\n#define aos_fatal_log(format, args...) if(aos_log_level>=AOS_LOG_FATAL) \\\n        aos_log_format(AOS_LOG_FATAL, __FILE__, __LINE__, __FUNCTION__, format, ## args)\n#define aos_error_log(format, args...) if(aos_log_level>=AOS_LOG_ERROR) \\\n        aos_log_format(AOS_LOG_ERROR, __FILE__, __LINE__, __FUNCTION__, format, ## args)\n#define aos_warn_log(format, args...) if(aos_log_level>=AOS_LOG_WARN)   \\\n        aos_log_format(AOS_LOG_WARN, __FILE__, __LINE__, __FUNCTION__, format, ## args)\n#define aos_info_log(format, args...) if(aos_log_level>=AOS_LOG_INFO)   \\\n        aos_log_format(AOS_LOG_INFO, __FILE__, __LINE__, __FUNCTION__, format, ## args)\n#define aos_debug_log(format, args...) if(aos_log_level>=AOS_LOG_DEBUG) \\\n        aos_log_format(AOS_LOG_DEBUG, __FILE__, __LINE__, __FUNCTION__, format, ## args)\n#define aos_trace_log(format, args...) if(aos_log_level>=AOS_LOG_TRACE) \\\n        aos_log_format(AOS_LOG_TRACE, __FILE__, __LINE__, __FUNCTION__, format, ## args)\n#endif\n\nvoid aos_log_set_level(aos_log_level_e level);\n\nvoid aos_log_set_output(apr_file_t *output);\n\nvoid aos_log_print_default(const char *message, int len);\n\nvoid aos_log_format_default(int level,\n                            const char *file,\n                            int line,\n                            const char *function,\n                            const char *fmt, ...)\n        __attribute__ ((__format__ (__printf__, 5, 6)));\n\nextern aos_log_level_e aos_log_level;\nextern aos_log_format_pt aos_log_format;\nextern aos_log_format_pt aos_log_format;\n\nAOS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/aos_status.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_status.h\"\n\nconst char AOS_XML_PARSE_ERROR_CODE[] = \"ParseXmlError\";\nconst char AOS_OPEN_FILE_ERROR_CODE[] = \"OpenFileFail\";\nconst char AOS_WRITE_FILE_ERROR_CODE[] = \"WriteFileFail\";\nconst char AOS_RENAME_FILE_ERROR_CODE[] = \"RenameFileFail\";\nconst char AOS_HTTP_IO_ERROR_CODE[] = \"HttpIoError\";\nconst char AOS_UNKNOWN_ERROR_CODE[] = \"UnknownError\";\nconst char AOS_CLIENT_ERROR_CODE[] = \"ClientError\";\nconst char AOS_SERVER_ERROR_CODE[] = \"ServerError\";\nconst char AOS_UTF8_ENCODE_ERROR_CODE[] = \"Utf8EncodeFail\";\nconst char AOS_URL_ENCODE_ERROR_CODE[] = \"UrlEncodeFail\";\nconst char AOS_INCONSISTENT_ERROR_CODE[] = \"InconsistentError\";\nconst char AOS_CREATE_QUEUE_ERROR_CODE[] = \"CreateQueueFail\";\nconst char AOS_CREATE_THREAD_POOL_ERROR_CODE[] = \"CreateThreadPoolFail\";\nconst char AOS_EMPTY_STRING_ERROR[] = \"EmptyStringError\";\nconst char AOS_SELECT_OBJECT_ERROR[] = \"SelectObjectError\";\nconst char AOS_SELECT_OBJECT_CRC_ERROR[] = \"SelectObjectCRCError\";\nconst char AOS_CREATE_SELECT_OBJECT_META_ERROR[] = \"CreateSelectObjectMetaError\";\nconst char AOS_BUCKET_NAME_INVALID_ERROR[] = \"BucketNameInvalidError\";\nconst char AOS_OBJECT_NAME_INVALID_ERROR[] = \"ObjectNameInvalidError\";\n\naos_status_t *aos_status_create(aos_pool_t *p)\n{\n    return (aos_status_t *)aos_pcalloc(p, sizeof(aos_status_t));\n}\n\naos_status_t *aos_status_dup(aos_pool_t *p, aos_status_t *src)\n{\n    aos_status_t *dst = aos_status_create(p);\n    dst->code = src->code;\n    dst->error_code = apr_pstrdup(p, src->error_code);\n    dst->error_msg = apr_pstrdup(p, src->error_msg);\n    return dst;\n}\n\nint aos_should_retry(aos_status_t *s) \n{\n    // HTTP Error\n    if (s == NULL || s->code / 100 == 2) {\n        return AOS_FALSE;\n    }\n\n    // OSS Error\n    if (s->code / 100 == 5) {\n        return AOS_TRUE;\n    }\n\n    // Curl Error\n    if (s->code != AOSE_OK) {\n        if (s->code == AOSE_CONNECTION_FAILED || s->code == AOSE_REQUEST_TIMEOUT || \n            s->code == AOSE_FAILED_CONNECT || s->code == AOSE_SERVICE_ERROR) {\n            return AOS_TRUE;\n        }\n    }\n\n    return AOS_FALSE;\n}\n\naos_status_t *aos_status_parse_from_body(aos_pool_t *p, aos_list_t *bc, int code, aos_status_t *s)\n{\n    int res;\n    mxml_node_t *root, *node;\n    mxml_node_t *code_node, *message_node;\n    const char *node_content;\n\n    if (s == NULL) {\n        s = aos_status_create(p);\n    }\n    s->code = code;\n\n    if (aos_http_is_ok(code)) {\n        return s;\n    }\n\n    if (aos_list_empty(bc)) {\n        s->error_code = (char *)AOS_UNKNOWN_ERROR_CODE;\n        return s;\n    }\n\n    if ((res = aos_parse_xml_body(bc, &root)) != AOSE_OK) {\n        s->error_code = (char *)AOS_UNKNOWN_ERROR_CODE;\n        return s;\n    }\n\n    node = mxmlFindElement(root, root, \"Error\",NULL, NULL,MXML_DESCEND);\n    if (NULL == node) {\n        char *xml_content = aos_buf_list_content(p, bc);\n        aos_error_log(\"Xml format invalid, root node name is not Error.\\n\");\n        aos_error_log(\"Xml Content:%s\\n\", xml_content);\n        s->error_code = (char *)AOS_UNKNOWN_ERROR_CODE;\n        mxmlDelete(root);\n        return s;\n    }\n\n    code_node = mxmlFindElement(node, root, \"Code\",NULL, NULL,MXML_DESCEND);\n    if (NULL != code_node) {\n        node_content = mxmlGetOpaque(code_node);\n        if (node_content != NULL) {\n            s->error_code = apr_pstrdup(p, (char *)node_content);\n        }\n    }\n\n    message_node = mxmlFindElement(node, root, \"Message\",NULL, NULL,MXML_DESCEND);\n    if (NULL != message_node) {\n        node_content = mxmlGetOpaque(message_node);\n        if (node_content != NULL) {\n            s->error_msg = apr_pstrdup(p, node_content);\n        }\n    }\n\n    mxmlDelete(root);\n\n    return s;\n}\n"
  },
  {
    "path": "oss_c_sdk/aos_status.h",
    "content": "#ifndef LIBAOS_STATUS_H\n#define LIBAOS_STATUS_H\n\n#include \"aos_define.h\"\n#include \"aos_list.h\"\n\nAOS_CPP_START\n\ntypedef struct aos_status_s aos_status_t;\n\nstruct aos_status_s {\n    int code; // > 0 http code\n    char *error_code; // can't modify\n    char *error_msg; // can't modify\n    char *req_id;   // can't modify\n};\n\nstatic APR_INLINE int aos_status_is_ok(aos_status_t *s)\n{\n    return s->code > 0 && s->code / 100 == 2;\n}\n\nstatic APR_INLINE int aos_http_is_ok(int st)\n{\n    return st / 100 == 2;\n}\n\n#define aos_status_set(s, c, ec, es)                                    \\\n    (s)->code = c; (s)->error_code = (char *)ec; (s)->error_msg = (char *)es\n\n/**\n * @brief determine whether the request should be retried\n * @param[in]   s             the return status of api, such as oss_put_object_from_buffer\n * @return      int           AOS_FALSE indicates no retries, AOS_TRUE retry\n */\nint aos_should_retry(aos_status_t *s);\n\naos_status_t *aos_status_create(aos_pool_t *p);\n\naos_status_t *aos_status_dup(aos_pool_t *p, aos_status_t *src);\n\naos_status_t *aos_status_parse_from_body(aos_pool_t *p, aos_list_t *bc, int code, aos_status_t *s);\n\nextern const char AOS_XML_PARSE_ERROR_CODE[];\nextern const char AOS_OPEN_FILE_ERROR_CODE[];\nextern const char AOS_WRITE_FILE_ERROR_CODE[];\nextern const char AOS_RENAME_FILE_ERROR_CODE[];\nextern const char AOS_HTTP_IO_ERROR_CODE[];\nextern const char AOS_UNKNOWN_ERROR_CODE[];\nextern const char AOS_CLIENT_ERROR_CODE[];\nextern const char AOS_SERVER_ERROR_CODE[];\nextern const char AOS_UTF8_ENCODE_ERROR_CODE[];\nextern const char AOS_URL_ENCODE_ERROR_CODE[];\nextern const char AOS_INCONSISTENT_ERROR_CODE[];\nextern const char AOS_CREATE_QUEUE_ERROR_CODE[];\nextern const char AOS_CREATE_THREAD_POOL_ERROR_CODE[];\nextern const char AOS_EMPTY_STRING_ERROR[];\nextern const char AOS_SELECT_OBJECT_ERROR[];\nextern const char AOS_SELECT_OBJECT_CRC_ERROR[];\nextern const char AOS_CREATE_SELECT_OBJECT_META_ERROR[];\nextern const char AOS_BUCKET_NAME_INVALID_ERROR[];\nextern const char AOS_OBJECT_NAME_INVALID_ERROR[];\n\nAOS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/aos_string.c",
    "content": "#include \"aos_string.h\"\n\ntypedef int (*aos_is_char_pt)(char c);\n\nstatic void aos_strip_str_func(aos_string_t *str, aos_is_char_pt func);\n\nchar *aos_pstrdup(aos_pool_t *p, const aos_string_t *s)\n{\n    return apr_pstrndup(p, s->data, s->len);\n}\n\nstatic void aos_strip_str_func(aos_string_t *str, aos_is_char_pt func)\n{\n    char *data = str->data;\n    int len = str->len;\n    int offset = 0;\n\n    if (len == 0) return;\n    \n    while (len > 0 && func(data[len - 1])) {\n        --len;\n    }\n    \n    for (; offset < len && func(data[offset]); ++offset) {\n        // empty;\n    }\n\n    str->data = data + offset;\n    str->len = len - offset;\n}\n\nvoid aos_unquote_str(aos_string_t *str)\n{\n    aos_strip_str_func(str, aos_is_quote);\n}\n\nvoid aos_strip_space(aos_string_t *str)\n{\n    aos_strip_str_func(str, aos_is_space);\n}\n\nvoid aos_trip_space_and_cntrl(aos_string_t *str)\n{\n    aos_strip_str_func(str, aos_is_space_or_cntrl);\n}\n\nint aos_ends_with(const aos_string_t *str, const aos_string_t *suffix)\n{\n    if (!str || !suffix) {\n        return 0;\n    }\n\n    return (str->len >= suffix->len) && strncmp(str->data + str->len - suffix->len, suffix->data, suffix->len) == 0;\n}\n"
  },
  {
    "path": "oss_c_sdk/aos_string.h",
    "content": "#ifndef LIBAOS_STRING_H\n#define LIBAOS_STRING_H\n\n#include \"aos_define.h\"\n\nAOS_CPP_START\n\ntypedef struct {\n    int len;\n    char *data;\n} aos_string_t;\n\n#define aos_string(str)     { sizeof(str) - 1, (char *) str }\n#define aos_null_string     { 0, NULL }\n#define aos_str_set(str, text)                                  \\\n    (str)->len = strlen(text); (str)->data = (char *) text\n#define aos_str_null(str)   (str)->len = 0; (str)->data = NULL\n\n#define aos_tolower(c)      (char) ((c >= 'A' && c <= 'Z') ? (c | 0x20) : c)\n#define aos_toupper(c)      (char) ((c >= 'a' && c <= 'z') ? (c & ~0x20) : c)\n\nstatic APR_INLINE int aos_string_is_empty(const aos_string_t *str)\n{\n    if (NULL == str || str->len == 0  || NULL == str->data || 0 == strcmp(str->data, \"\")) {\n        return AOS_TRUE;\n    } else {\n        return AOS_FALSE;\n    } \n}\n\nstatic APR_INLINE void aos_string_tolower(aos_string_t *str)\n{\n    int i = 0;\n    while (i < str->len) {\n        str->data[i] = aos_tolower(str->data[i]);\n        ++i;\n    }\n}\n\nstatic APR_INLINE char *aos_strlchr(char *p, char *last, char c)\n{\n    while (p < last) {\n        if (*p == c) {\n            return p;\n        }\n        p++;\n    }\n    return NULL;\n}\n\nstatic APR_INLINE int aos_is_quote(char c)\n{\n    return c == '\\\"';\n}\n\nstatic APR_INLINE int aos_is_space(char c)\n{\n    return ((c == ' ') || (c == '\\t'));\n}\n\nstatic APR_INLINE int aos_is_space_or_cntrl(char c)\n{\n    return c <= ' ';\n}\n\nstatic APR_INLINE int aos_is_null_string(aos_string_t *str)\n{\n    if (str == NULL || str->data == NULL || str->len == 0) {\n        return AOS_TRUE;\n    }\n    return AOS_FALSE;\n}\n\nvoid aos_strip_space(aos_string_t *str);\nvoid aos_trip_space_and_cntrl(aos_string_t *str);\nvoid aos_unquote_str(aos_string_t *str);\n\nchar *aos_pstrdup(aos_pool_t *p, const aos_string_t *s);\n\nint aos_ends_with(const aos_string_t *str, const aos_string_t *suffix);\n\nAOS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/aos_transport.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_http_io.h\"\n#include \"aos_transport.h\"\n#include \"aos_crc64.h\"\n#include \"aos_status.h\"\n\nstatic int aos_curl_code_to_status(CURLcode code);\nstatic void aos_init_curl_headers(aos_curl_http_transport_t *t);\nstatic void aos_transport_cleanup(aos_http_transport_t *t);\nstatic int aos_init_curl_url(aos_curl_http_transport_t *t);\nstatic void aos_curl_transport_headers_done(aos_curl_http_transport_t *t);\nstatic int aos_curl_transport_setup(aos_curl_http_transport_t *t);\nstatic void aos_curl_transport_finish(aos_curl_http_transport_t *t);\nstatic void aos_move_transport_state(aos_curl_http_transport_t *t, aos_transport_state_e s);\n\nstatic size_t aos_curl_default_header_callback(char *buffer, size_t size, size_t nitems, void *userdata);\nstatic size_t aos_curl_default_write_callback(char *ptr, size_t size, size_t nmemb, void *userdata);\nstatic size_t aos_curl_default_read_callback(char *buffer, size_t size, size_t nitems, void *instream);\n\nstatic int aos_curl_debug_callback(void *handle, curl_infotype type, char *data, size_t size, void *userp)\n{\n    switch (type) {\n    default: \n        break;\n    case CURLINFO_TEXT:\n        aos_debug_log(\"curl:%pp=> Info: %.*s\", handle, (int)size, data);\n        break;\n    case CURLINFO_HEADER_OUT:\n        aos_debug_log(\"curl:%pp=> Send header: %.*s\", handle, (int)size, data);\n        break;\n    case CURLINFO_HEADER_IN:\n        aos_debug_log(\"curl:%pp=> Recv header: %.*s\", handle, (int)size, data);\n        break;\n    }\n    return 0;\n}\nstatic void aos_init_curl_headers(aos_curl_http_transport_t *t)\n{\n    int pos;\n    char *header;\n    const aos_array_header_t *tarr;\n    const aos_table_entry_t *telts;\n    union aos_func_u func;\n\n    if (t->req->method == HTTP_PUT || t->req->method == HTTP_POST) {\n        header = apr_psprintf(t->pool, \"Content-Length: %\" APR_INT64_T_FMT, t->req->body_len);\n        t->headers = curl_slist_append(t->headers, header);\n    }\n\n    tarr = aos_table_elts(t->req->headers);\n    telts = (aos_table_entry_t*)tarr->elts;\n    for (pos = 0; pos < tarr->nelts; ++pos) {\n        header = apr_psprintf(t->pool, \"%s: %s\", telts[pos].key, telts[pos].val);\n        t->headers = curl_slist_append(t->headers, header);\n    }\n    \n    func.func1 = (aos_func1_pt)curl_slist_free_all;\n    aos_fstack_push(t->cleanup, t->headers, func, 1);\n}\n\nstatic int aos_init_curl_url(aos_curl_http_transport_t *t)\n{\n    int rs;\n    const char *proto;\n    aos_string_t querystr;\n    char uristr[3*AOS_MAX_URI_LEN+1];\n\n    uristr[0] = '\\0';\n    aos_str_null(&querystr);\n    \n    if ((rs = aos_url_encode(uristr, t->req->uri, AOS_MAX_URI_LEN)) != AOSE_OK) {\n        t->controller->error_code = rs;\n        t->controller->reason = \"uri invalid argument.\";\n        return rs;\n    }\n\n    if ((rs = aos_query_params_to_string(t->pool, t->req->query_params, &querystr)) != AOSE_OK) {\n        t->controller->error_code = rs;\n        t->controller->reason = \"query params invalid argument.\";\n        return rs;\n    }\n\n    proto = strlen(t->req->proto) != 0 ? t->req->proto : AOS_HTTP_PREFIX;\n    if (querystr.len == 0) {\n        t->url = apr_psprintf(t->pool, \"%s%s/%s\",\n                              proto,\n                              t->req->host,\n                              uristr);\n    } else {\n        t->url = apr_psprintf(t->pool, \"%s%s/%s%.*s\",\n                              proto,\n                              t->req->host,\n                              uristr,\n                              querystr.len,\n                              querystr.data);\n    }\n    aos_debug_log(\"url:%s.\", t->url);\n\n    return AOSE_OK;\n}\n\nstatic void aos_transport_cleanup(aos_http_transport_t *t)\n{\n    int s;\n    char buf[256];\n\n    if (t->req->file_buf != NULL && t->req->file_buf->owner) {\n        aos_trace_log(\"close request body file.\");\n        if ((s = apr_file_close(t->req->file_buf->file)) != APR_SUCCESS) {\n            aos_warn_log(\"apr_file_close failure, %s.\", apr_strerror(s, buf, sizeof(buf)));\n        }\n        t->req->file_buf = NULL;\n    }\n    \n    if (t->resp->file_buf != NULL && t->resp->file_buf->owner) {\n        aos_trace_log(\"close response body file.\");\n        if ((s = apr_file_close(t->resp->file_buf->file)) != APR_SUCCESS) {\n            aos_warn_log(\"apr_file_close failure, %s.\", apr_strerror(s, buf, sizeof(buf)));\n        }\n        t->resp->file_buf = NULL;\n    }\n}\n\naos_http_transport_t *aos_curl_http_transport_create(aos_pool_t *p)\n{\n    aos_func_u func;\n    aos_curl_http_transport_t *t;\n\n    t = (aos_curl_http_transport_t *)aos_pcalloc(p, sizeof(aos_curl_http_transport_t));\n\n    t->pool = p;\n    t->options = aos_default_http_transport_options;\n    t->cleanup = aos_fstack_create(p, 5);\n\n    func.func1 = (aos_func1_pt)aos_transport_cleanup;\n    aos_fstack_push(t->cleanup, t, func, 1);\n    \n    t->curl = aos_request_get();\n    func.func1 = (aos_func1_pt)request_release2;\n    aos_fstack_push(t->cleanup, t, func, 1);\n\n    t->header_callback = aos_curl_default_header_callback;\n    t->read_callback = aos_curl_default_read_callback;\n    t->write_callback = aos_curl_default_write_callback;\n\n    return (aos_http_transport_t *)t;\n}\n\nstatic void aos_move_transport_state(aos_curl_http_transport_t *t, aos_transport_state_e s)\n{\n    if (t->state < s) {\n        t->state = s;\n    }\n}\n\nvoid aos_curl_response_headers_parse(aos_pool_t *p, aos_table_t *headers, char *buffer, int len)\n{\n    char *pos;\n    aos_string_t str;\n    aos_string_t key;\n    aos_string_t value;\n    \n    str.data = buffer;\n    str.len = len;\n\n    aos_trip_space_and_cntrl(&str);\n\n    pos = aos_strlchr(str.data, str.data + str.len, ':');\n    if (pos == NULL) {\n        return;\n    }\n    key.data = str.data;\n    key.len = pos - str.data;\n\n    pos += 1;\n    value.len = str.data + str.len - pos;\n    value.data = pos;\n    aos_strip_space(&value);\n\n    apr_table_addn(headers, aos_pstrdup(p, &key), aos_pstrdup(p, &value));\n}\n\nsize_t aos_curl_default_header_callback(char *buffer, size_t size, size_t nitems, void *userdata)\n{\n    int len;\n    aos_curl_http_transport_t *t;\n\n    t = (aos_curl_http_transport_t *)(userdata);\n    len = size * nitems;\n\n    if (t->controller->first_byte_time == 0) {\n        t->controller->first_byte_time = apr_time_now();\n    }\n\n    aos_curl_response_headers_parse(t->pool, t->resp->headers, buffer, len);\n\n    aos_move_transport_state(t, TRANS_STATE_HEADER);\n\n    return len;\n}\n\nstatic void aos_curl_transport_headers_done(aos_curl_http_transport_t *t)\n{\n    long http_code;\n    CURLcode code;\n    const char *value;\n\n    if (t->controller->error_code != AOSE_OK) {\n        aos_debug_log(\"has error %d.\", t->controller->error_code);\n        return;\n    }\n    \n    if (t->resp->status > 0) {\n        aos_trace_log(\"http response status %d.\", t->resp->status);\n        return;\n    }\n\n    t->resp->status = 0;\n    if ((code = curl_easy_getinfo(t->curl, CURLINFO_RESPONSE_CODE, &http_code)) != CURLE_OK) {\n        t->controller->reason = apr_pstrdup(t->pool, curl_easy_strerror(code));\n        t->controller->error_code = AOSE_INTERNAL_ERROR;\n        aos_error_log(\"get response status fail, curl code:%d, reason:%s\", code, t->controller->reason);\n        return;\n    } else {\n        t->resp->status = http_code;\n    }\n\n    value = apr_table_get(t->resp->headers, \"Content-Length\");\n    if (value != NULL) {\n        t->resp->content_length = aos_atoi64(value);\n    }\n}\n\nsize_t aos_curl_default_write_callback(char *ptr, size_t size, size_t nmemb, void *userdata)\n{\n    int len;\n    int bytes;\n    aos_curl_http_transport_t *t;\n\n    t = (aos_curl_http_transport_t *)(userdata);\n    len = size * nmemb;\n\n    if (t->controller->first_byte_time == 0) {\n        t->controller->first_byte_time = apr_time_now();\n    }\n    \n    aos_curl_transport_headers_done(t);\n\n    if (t->controller->error_code != AOSE_OK) {\n        aos_debug_log(\"write callback abort\");\n        return 0;\n    }\n\n    // On HTTP error, we expect to parse an HTTP error response    \n    if (t->resp->status < 200 || t->resp->status > 299) {\n        bytes = aos_write_http_body_memory(t->resp, ptr, len);\n        assert(bytes == len);\n        aos_move_transport_state(t, TRANS_STATE_BODY_IN);\n        return bytes;\n    }\n\n    if (t->resp->type == BODY_IN_MEMORY && t->resp->body_len >= (int64_t)t->controller->options->max_memory_size) {\n        t->controller->reason = apr_psprintf(t->pool,\n             \"receive body too big, current body size: %\" APR_INT64_T_FMT \", max memory size: %\" APR_INT64_T_FMT,\n              t->resp->body_len, t->controller->options->max_memory_size);\n        t->controller->error_code = AOSE_OVER_MEMORY;\n        aos_error_log(\"error reason:%s, \", t->controller->reason);\n        return 0;\n    }\n\n    if ((bytes = t->resp->write_body(t->resp, ptr, len)) < 0) {\n        aos_debug_log(\"write body failure, %d.\", bytes);\n        if (bytes == AOSE_SELECT_OBJECT_CRC_ERROR) {\n            t->controller->error_code = AOSE_SELECT_OBJECT_CRC_ERROR;\n            t->controller->reason = (char *)AOS_SELECT_OBJECT_CRC_ERROR;\n        } else {\n            t->controller->error_code = AOSE_WRITE_BODY_ERROR;\n            t->controller->reason = \"write body failure.\";\n        }\n        return 0;\n    }\n\n    if (bytes >= 0) {\n        // progress callback\n        if (NULL != t->resp->progress_callback) {\n            t->resp->progress_callback(t->resp->body_len, t->resp->content_length);\n        }\n\n        // crc\n        if (t->controller->options->enable_crc) {\n            t->resp->crc64 = aos_crc64(t->resp->crc64, ptr, bytes);\n        }\n    }\n    \n    aos_move_transport_state(t, TRANS_STATE_BODY_IN);\n    \n    return bytes;\n}\n\nsize_t aos_curl_default_read_callback(char *buffer, size_t size, size_t nitems, void *instream)\n{\n    int len;\n    int bytes;\n    aos_curl_http_transport_t *t;\n    \n    t = (aos_curl_http_transport_t *)(instream);\n    len = size * nitems;\n\n    if (t->controller->error_code != AOSE_OK) {\n        aos_debug_log(\"abort read callback.\");\n        return CURL_READFUNC_ABORT;\n    }\n\n    if ((bytes = t->req->read_body(t->req, buffer, len)) < 0) {\n        aos_debug_log(\"read body failure, %d.\", bytes);\n        t->controller->error_code = AOSE_READ_BODY_ERROR;\n        t->controller->reason = \"read body failure.\";\n        return CURL_READFUNC_ABORT;\n    }\n    \n    if (bytes >= 0) {\n        // progress callback\n        t->req->consumed_bytes += bytes;\n        if (NULL != t->req->progress_callback) {\n            t->req->progress_callback(t->req->consumed_bytes, t->req->body_len);\n        }\n\n        // crc\n        if (t->controller->options->enable_crc) {\n            t->req->crc64 = aos_crc64(t->req->crc64, buffer, bytes);\n        }\n    }\n\n    aos_move_transport_state(t, TRANS_STATE_BODY_OUT);\n\n    return bytes;\n}\n\nstatic int aos_curl_code_to_status(CURLcode code)\n{\n    switch (code) {\n        case CURLE_OUT_OF_MEMORY:\n            return AOSE_OUT_MEMORY;\n        case CURLE_COULDNT_RESOLVE_PROXY:\n        case CURLE_COULDNT_RESOLVE_HOST:\n            return AOSE_NAME_LOOKUP_ERROR;\n        case CURLE_COULDNT_CONNECT:\n            return AOSE_FAILED_CONNECT;\n        case CURLE_WRITE_ERROR:\n        case CURLE_OPERATION_TIMEDOUT:\n            return AOSE_CONNECTION_FAILED;\n        case CURLE_PARTIAL_FILE:\n            return AOSE_OK;\n        case CURLE_SSL_CACERT:\n            return AOSE_FAILED_VERIFICATION;\n        default:\n            return AOSE_INTERNAL_ERROR;\n    }\n}\n\nstatic void aos_curl_transport_finish(aos_curl_http_transport_t *t)\n{\n    aos_curl_transport_headers_done(t);\n    \n    if (t->cleanup != NULL) {\n        aos_fstack_destory(t->cleanup);\n        t->cleanup = NULL;\n    }\n}\n\nint aos_curl_transport_setup(aos_curl_http_transport_t *t)\n{\n\n#define curl_easy_setopt_safe(opt, val)  curl_easy_setopt(t->curl, opt, val)\n\n    curl_easy_setopt_safe(CURLOPT_PRIVATE, t);\n\n    curl_easy_setopt_safe(CURLOPT_HEADERDATA, t);\n    curl_easy_setopt_safe(CURLOPT_HEADERFUNCTION, t->header_callback);\n    \n    curl_easy_setopt_safe(CURLOPT_READDATA, t);\n    curl_easy_setopt_safe(CURLOPT_READFUNCTION, t->read_callback);\n    \n    curl_easy_setopt_safe(CURLOPT_WRITEDATA, t);    \n    curl_easy_setopt_safe(CURLOPT_WRITEFUNCTION, t->write_callback);\n\n    curl_easy_setopt_safe(CURLOPT_FILETIME, 1);\n    curl_easy_setopt_safe(CURLOPT_NOSIGNAL, 1);\n    curl_easy_setopt_safe(CURLOPT_NOPROGRESS, 1);\n    curl_easy_setopt_safe(CURLOPT_TCP_NODELAY, 1);\n    curl_easy_setopt_safe(CURLOPT_NETRC, CURL_NETRC_IGNORED);\n\n    // transport options\n    curl_easy_setopt_safe(CURLOPT_USERAGENT, t->options->user_agent);\n\n    // ssl\n    if (t->controller->options->verify_ssl) {\n        curl_easy_setopt_safe(CURLOPT_SSL_VERIFYPEER, 1);\n        curl_easy_setopt_safe(CURLOPT_SSL_VERIFYHOST, 2);\n    }\n    else {\n        curl_easy_setopt_safe(CURLOPT_SSL_VERIFYPEER, 0);\n        curl_easy_setopt_safe(CURLOPT_SSL_VERIFYHOST, 0);\n    }\n\n    if (t->controller->options->ca_path != NULL)\r\n    {\r\n        curl_easy_setopt_safe(CURLOPT_CAPATH, t->controller->options->ca_path);\r\n    }\r\n\r\n    if (t->controller->options->ca_file != NULL)\r\n    {\r\n        curl_easy_setopt_safe(CURLOPT_CAINFO, t->controller->options->ca_file);\r\n    }\n\n    // request options\n    curl_easy_setopt_safe(CURLOPT_DNS_CACHE_TIMEOUT, t->controller->options->dns_cache_timeout);\n    curl_easy_setopt_safe(CURLOPT_CONNECTTIMEOUT, t->controller->options->connect_timeout);\n    curl_easy_setopt_safe(CURLOPT_LOW_SPEED_LIMIT, t->controller->options->speed_limit);\n    curl_easy_setopt_safe(CURLOPT_LOW_SPEED_TIME, t->controller->options->speed_time);\n\n    aos_init_curl_headers(t);\n    curl_easy_setopt_safe(CURLOPT_HTTPHEADER, t->headers);\n\n    if (t->controller->options->proxy_host != NULL) {\n        // proxy\n        curl_easy_setopt_safe(CURLOPT_PROXYTYPE, CURLPROXY_HTTP);\n        curl_easy_setopt_safe(CURLOPT_PROXY, t->controller->options->proxy_host);\n        // authorize\n        if (t->controller->options->proxy_auth != NULL) {\n            curl_easy_setopt_safe(CURLOPT_PROXYAUTH, CURLAUTH_BASIC);\n            curl_easy_setopt_safe(CURLOPT_PROXYUSERPWD, t->controller->options->proxy_auth);\n        }\n    }\n\n    if (NULL == t->req->signed_url) {\n        if (aos_init_curl_url(t) != AOSE_OK) {\n            return t->controller->error_code;\n        }\n    }\n    else {\n        t->url = t->req->signed_url; \n    }\n    curl_easy_setopt_safe(CURLOPT_URL, t->url);\n\n    switch (t->req->method) {\n        case HTTP_HEAD:\n            curl_easy_setopt_safe(CURLOPT_NOBODY, 1);\n            break;\n        case HTTP_PUT:\n            curl_easy_setopt_safe(CURLOPT_UPLOAD, 1);\n            break;\n        case HTTP_POST:\n            curl_easy_setopt_safe(CURLOPT_POST, 1);\n            break;\n        case HTTP_DELETE:\n            curl_easy_setopt_safe(CURLOPT_CUSTOMREQUEST, \"DELETE\");\n            break;\n        default: // HTTP_GET\n            break;\n    }\n\n    if (aos_log_level >= AOS_LOG_DEBUG) {\n        curl_easy_setopt_safe(CURLOPT_VERBOSE, 1L);   \n        curl_easy_setopt_safe(CURLOPT_DEBUGFUNCTION, aos_curl_debug_callback);\n    }\n    \n#undef curl_easy_setopt_safe\n    \n    t->state = TRANS_STATE_INIT;\n    \n    return AOSE_OK;\n}\n\nint aos_curl_http_transport_perform(aos_http_transport_t *t_)\n{\n    int ecode;\n    CURLcode code;\n    aos_curl_http_transport_t *t = (aos_curl_http_transport_t *)(t_);\n    ecode = aos_curl_transport_setup(t);\n    if (ecode != AOSE_OK) {\n        return ecode;\n    }\n\n    t->controller->start_time = apr_time_now();\n    code = curl_easy_perform(t->curl);\n    t->controller->finish_time = apr_time_now();\n    aos_move_transport_state(t, TRANS_STATE_DONE);\n    t->curl_code = code;\n    if ((code != CURLE_OK) && (t->controller->error_code == AOSE_OK)) {\n        ecode = aos_curl_code_to_status(code);\n        if (ecode != AOSE_OK) {\n            t->controller->error_code = ecode;\n            t->controller->reason = apr_pstrdup(t->pool, curl_easy_strerror(code));\n            aos_error_log(\"transport failure curl code:%d error:%s\", code, t->controller->reason);\n        }\n    }\n    \n    aos_curl_transport_finish(t);\n    \n    return t->controller->error_code;\n}\n"
  },
  {
    "path": "oss_c_sdk/aos_transport.h",
    "content": "#ifndef LIBAOS_TRANSPORT_H\n#define LIBAOS_TRANSPORT_H\n\n#include \"aos_define.h\"\n#include \"aos_buf.h\"\n\n\nAOS_CPP_START\n\ntypedef struct aos_http_request_s aos_http_request_t;\ntypedef struct aos_http_response_s aos_http_response_t;\ntypedef struct aos_http_transport_s aos_http_transport_t;\ntypedef struct aos_http_controller_s aos_http_controller_t;\n\ntypedef struct aos_http_request_options_s aos_http_request_options_t;\ntypedef struct aos_http_transport_options_s aos_http_transport_options_t;\ntypedef struct aos_curl_http_transport_s aos_curl_http_transport_t;\n\ntypedef int (*aos_read_http_body_pt)(aos_http_request_t *req, char *buffer, int len);\ntypedef int (*aos_write_http_body_pt)(aos_http_response_t *resp, const char *buffer, int len);\n\ntypedef void (*oss_progress_callback)(int64_t consumed_bytes, int64_t total_bytes);\n\nvoid aos_curl_response_headers_parse(aos_pool_t *p, aos_table_t *headers, char *buffer, int len);\naos_http_transport_t *aos_curl_http_transport_create(aos_pool_t *p);\nint aos_curl_http_transport_perform(aos_http_transport_t *t);\n\nstruct aos_http_request_options_s {\n    int speed_limit;\n    int speed_time;\n    int dns_cache_timeout;\n    int connect_timeout;\n    int64_t max_memory_size;\n    int enable_crc;\n    char *proxy_host;\n    char *proxy_auth;\n    int verify_ssl;\n    char *ca_path;\n    char *ca_file;\n    int verify_object_strict;\n};\n\nstruct aos_http_transport_options_s {\n    char *user_agent;\n    char *cacerts_path;\n    uint32_t ssl_verification_disabled:1;\n};\n\n#define AOS_HTTP_BASE_CONTROLLER_DEFINE         \\\n    aos_http_request_options_t *options;        \\\n    aos_pool_t *pool;                           \\\n    int64_t start_time;                         \\\n    int64_t first_byte_time;                    \\\n    int64_t finish_time;                        \\\n    uint32_t owner:1;                           \\\n    void *user_data;\n\nstruct aos_http_controller_s {\n    AOS_HTTP_BASE_CONTROLLER_DEFINE\n};\n\ntypedef struct aos_http_controller_ex_s {\n    AOS_HTTP_BASE_CONTROLLER_DEFINE\n    // private\n    int error_code;\n    char *reason; // can't modify\n} aos_http_controller_ex_t;\n\ntypedef enum {\n    BODY_IN_MEMORY = 0,\n    BODY_IN_FILE,\n    BODY_IN_CALLBACK\n} aos_http_body_type_e;\n\nstruct aos_http_request_s {\n    char *host;\n    char *proto;\n    char *signed_url;\n    \n    http_method_e method;\n    char *uri;\n    char *resource;\n    aos_table_t *headers;\n    aos_table_t *query_params;\n    \n    aos_list_t body;\n    int64_t body_len;\n    char *file_path;\n    aos_file_buf_t *file_buf;\n\n    aos_pool_t *pool;\n    void *user_data;\n    aos_read_http_body_pt read_body;\n\n    aos_http_body_type_e type;\n\n    oss_progress_callback progress_callback;\n    uint64_t crc64;\n    int64_t  consumed_bytes;\n\n    int normalize_url;\n};\n\nstruct aos_http_response_s {\n    int status;\n    aos_table_t *headers;\n\n    aos_list_t body;\n    int64_t body_len;\n    char *file_path;\n    aos_file_buf_t* file_buf;\n    int64_t content_length;\n\n    aos_pool_t *pool;\n    void *user_data;\n    aos_write_http_body_pt write_body;\n\n    aos_http_body_type_e type;\n\n    oss_progress_callback progress_callback;\n    uint64_t crc64;\n};\n\ntypedef enum {\n    TRANS_STATE_INIT,\n    TRANS_STATE_HEADER,\n    TRANS_STATE_BODY_IN,\n    TRANS_STATE_BODY_OUT,\n    TRANS_STATE_ABORT,\n    TRANS_STATE_DONE\n} aos_transport_state_e;\n\n#define AOS_HTTP_BASE_TRANSPORT_DEFINE           \\\n    aos_http_request_t *req;                     \\\n    aos_http_response_t *resp;                   \\\n    aos_pool_t *pool;                            \\\n    aos_transport_state_e state;                 \\\n    aos_array_header_t *cleanup;                 \\\n    aos_http_transport_options_t *options;       \\\n    aos_http_controller_ex_t *controller;\n    \nstruct aos_http_transport_s {\n    AOS_HTTP_BASE_TRANSPORT_DEFINE\n};\n\nstruct aos_curl_http_transport_s {\n    AOS_HTTP_BASE_TRANSPORT_DEFINE\n    CURL *curl;\n    CURLcode curl_code;\n    char *url;\n    struct curl_slist *headers;\n    curl_read_callback header_callback;\n    curl_read_callback read_callback;\n    curl_write_callback write_callback;\n};\n\nAOS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/aos_util.c",
    "content": "#include \"aos_util.h\"\n#include \"aos_log.h\"\n\nstatic const char *g_s_wday[] = {\n    \"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"\n};\n\nstatic const char *g_s_mon[] = {\n    \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"\n};\n\nstatic const char g_s_gmt_format[] = \"%s, %.2d %s %.4d %.2d:%.2d:%.2d GMT\";\n\nstatic const char g_s_ios8601_format[] = \"%.4d%.2d%.2dT%.2d%.2d%.2dZ\";\n\nint aos_parse_xml_body(aos_list_t *bc, mxml_node_t **root)\n{\n    aos_buf_t *b;\n    size_t len;\n\n    *root = NULL;\n    len = (size_t)aos_buf_list_len(bc);\n\n    {\n        int nsize = 0;\n        char *buffer = (char*)malloc(sizeof(char)*(len+1));\n        memset(buffer, 0, len + 1);\n        aos_list_for_each_entry(aos_buf_t, b, bc, node) {\n            memcpy(buffer + nsize, (char *)b->pos, aos_buf_size(b));\n            nsize += aos_buf_size(b);\n        }\n        *root = mxmlLoadString(NULL, buffer, MXML_OPAQUE_CALLBACK);\n        free(buffer);\n        if (NULL == *root) {\n           return AOSE_INTERNAL_ERROR; \n        }\n    }\n\n    return AOSE_OK;\n}\n\nint aos_convert_to_gmt_time(char* date, const char* format, apr_time_exp_t *tm)\n{\n    int size = apr_snprintf(date, AOS_MAX_GMT_TIME_LEN, format, \n        g_s_wday[tm->tm_wday], tm->tm_mday, g_s_mon[tm->tm_mon], 1900 + tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec);\n    if (size >= 0 && size < AOS_MAX_GMT_TIME_LEN) {\n        return AOSE_OK;\n    } else {\n        return AOSE_INTERNAL_ERROR;\n    }\n}\n\nint aos_get_gmt_str_time(char datestr[AOS_MAX_GMT_TIME_LEN])\n{\n    int s;\n    apr_time_t now;\n    char buf[128];\n    apr_time_exp_t result;\n\n    now = apr_time_now();\n    if ((s = apr_time_exp_gmt(&result, now)) != APR_SUCCESS) {\n        aos_error_log(\"apr_time_exp_gmt fialure, code:%d %s.\", s, apr_strerror(s, buf, sizeof(buf)));\n        return AOSE_INTERNAL_ERROR;\n    }\n    \n    if ((s = aos_convert_to_gmt_time(datestr, g_s_gmt_format, &result))\n        != AOSE_OK) {\n        aos_error_log(\"aos_convert_to_GMT failure, code:%d.\", s);\n    }\n\n    return s;\n}\n\nint aos_convert_to_iso8601_time(char* date, const char* format, apr_time_exp_t* tm)\n{\n    int size = apr_snprintf(date, AOS_MAX_GMT_TIME_LEN, format,\n       1900 + tm->tm_year, 1 + tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);\n    if (size >= 0 && size < AOS_MAX_GMT_TIME_LEN) {\n        return AOSE_OK;\n    }\n    else {\n        return AOSE_INTERNAL_ERROR;\n    }\n}\n\nint aos_get_iso8601_str_time(char datestr[AOS_MAX_GMT_TIME_LEN])\n{\n    int s;\n    apr_time_t now;\n    char buf[128];\n    apr_time_exp_t result;\n\n    now = apr_time_now();\n    if ((s = apr_time_exp_gmt(&result, now)) != APR_SUCCESS) {\n        aos_error_log(\"apr_time_exp_gmt fialure, code:%d %s.\", s, apr_strerror(s, buf, sizeof(buf)));\n        return AOSE_INTERNAL_ERROR;\n    }\n\n    if ((s = aos_convert_to_iso8601_time(datestr, g_s_ios8601_format, &result))\n        != AOSE_OK) {\n        aos_error_log(\"aos_convert_to_iso8601_time failure, code:%d.\", s);\n    }\n\n    return s;\n}\n\nint aos_get_iso8601_str_time_ex(char datestr[AOS_MAX_GMT_TIME_LEN], apr_time_t now)\n{\n    int s;\n    char buf[128];\n    apr_time_exp_t result;\n\n    if ((s = apr_time_exp_gmt(&result, now)) != APR_SUCCESS) {\n        aos_error_log(\"apr_time_exp_gmt fialure, code:%d %s.\", s, apr_strerror(s, buf, sizeof(buf)));\n        return AOSE_INTERNAL_ERROR;\n    }\n\n    if ((s = aos_convert_to_iso8601_time(datestr, g_s_ios8601_format, &result))\n        != AOSE_OK) {\n        aos_error_log(\"aos_convert_to_iso8601_time failure, code:%d.\", s);\n    }\n\n    return s;\n}\n\nint aos_get_gmt_time_date(const char *gmt, char datestr[AOS_MAX_SHORT_TIME_LEN])\n{\n    char week[4];\n    char month[4];\n    apr_time_exp_t t;\n    int i;\n    if (!gmt) {\n        return 0;\n    }\n    memset(week,0,4);\n    memset(month,0,4);\n\n    sscanf(gmt,\"%3s, %2d %3s %4d %2d:%2d:%2d GMT\",\n        week, &t.tm_mday, month, &t.tm_year,\n        &t.tm_hour, &t.tm_min, &t.tm_sec);\n\n    for (i = 0; i < 12; i++) {\n        if (apr_strnatcmp(g_s_mon[i], (char const *)month) == 0) {\n            t.tm_mon = i + 1;\n            break;\n        }\n    }\n    apr_snprintf(datestr, AOS_MAX_SHORT_TIME_LEN, \"%.4d%.2d%.2d\",\n       t.tm_year, t.tm_mon, t.tm_mday);\n\n    return 0;\n}\n\n\nint aos_url_encode(char *dest, const char *src, int maxSrcSize)\n{\n    static const char *hex = \"0123456789ABCDEF\";\n\n    int len = 0;\n    unsigned char c;\n\n    while (*src) {\n        if (++len > maxSrcSize) {\n            *dest = 0;\n            return AOSE_INVALID_ARGUMENT;\n        }\n        c = *src;\n        if (isalnum(c) || (c == '-') || (c == '_') || (c == '.') || (c == '~')) {\n            *dest++ = c;\n        } else if (*src == ' ') {\n            *dest++ = '%';\n            *dest++ = '2';\n            *dest++ = '0';\n        } else {\n            *dest++ = '%';\n            *dest++ = hex[c >> 4];\n            *dest++ = hex[c & 15];\n        }\n        src++;\n    }\n\n    *dest = 0;\n\n    return AOSE_OK;\n}\n\nint aos_url_encode_ex(char *dest, const char *src, int maxSrcSize, int slash)\n{\n    static const char *hex = \"0123456789ABCDEF\";\n\n    int len = 0;\n    unsigned char c;\n\n    while (*src) {\n        if (++len > maxSrcSize) {\n            *dest = 0;\n            return AOSE_INVALID_ARGUMENT;\n        }\n        c = *src;\n        if (isalnum(c) || (c == '-') || (c == '_') || (c == '.') || (c == '~')) {\n            *dest++ = c;\n        }\n        else if (*src == ' ') {\n            *dest++ = '%';\n            *dest++ = '2';\n            *dest++ = '0';\n        }\n        else if (c == '/' && slash) {\n            *dest++ = c;\n        }\n        else {\n            *dest++ = '%';\n            *dest++ = hex[c >> 4];\n            *dest++ = hex[c & 15];\n        }\n        src++;\n    }\n\n    *dest = 0;\n\n    return AOSE_OK;\n}\n\nint aos_encode_hex(char* dest, const void* src, int srclen, int* len)\n{\n    static const char hex_table[] = \"0123456789abcdef\";\n    const unsigned char* in = src;\n    int size;\n\n    if (!src) {\n        return AOSE_INVALID_ARGUMENT;\n    }\n\n    if (dest) {\n        for (size = 0; size < srclen; size++) {\n            *dest++ = hex_table[in[size] >> 4];\n            *dest++ = hex_table[in[size] & 0xf];\n        }\n        *dest = '\\0';\n    }\n\n    if (len) {\n        *len = srclen * 2 + 1;\n    }\n\n    return AOSE_OK;\n}\n\nint aos_query_params_to_string(aos_pool_t *p, aos_table_t *query_params, aos_string_t *querystr)\n{\n    int rs;\n    int pos;\n    int len;\n    char sep = '?';\n    char ebuf[AOS_MAX_QUERY_ARG_LEN*3+1];\n    char abuf[AOS_MAX_QUERY_ARG_LEN*6+128];\n    int max_len;\n    const aos_array_header_t *tarr;\n    const aos_table_entry_t *telts;\n    aos_buf_t *querybuf;\n\n    if (apr_is_empty_table(query_params)) {\n        return AOSE_OK;\n    }\n\n    max_len = sizeof(abuf)-1;\n    querybuf = aos_create_buf(p, 256);\n    aos_str_null(querystr);\n\n    tarr = aos_table_elts(query_params);\n    telts = (aos_table_entry_t*)tarr->elts;\n    \n    for (pos = 0; pos < tarr->nelts; ++pos) {\n        if ((rs = aos_url_encode(ebuf, telts[pos].key, AOS_MAX_QUERY_ARG_LEN)) != AOSE_OK) {\n            aos_error_log(\"query params args too big, key:%s.\", telts[pos].key);\n            return AOSE_INVALID_ARGUMENT;\n        }\n        len = apr_snprintf(abuf, max_len, \"%c%s\", sep, ebuf);\n        if (telts[pos].val != NULL && *telts[pos].val != '\\0') {\n            if ((rs = aos_url_encode(ebuf, telts[pos].val, AOS_MAX_QUERY_ARG_LEN)) != AOSE_OK) {\n                aos_error_log(\"query params args too big, value:%s.\", telts[pos].val);\n                return AOSE_INVALID_ARGUMENT;\n            }\n            len += apr_snprintf(abuf+len, max_len-len, \"=%s\", ebuf);\n            if (len >= AOS_MAX_QUERY_ARG_LEN) {\n                aos_error_log(\"query params args too big, %s.\", abuf);\n                return AOSE_INVALID_ARGUMENT;\n            }\n        }\n        aos_buf_append_string(p, querybuf, abuf, len);\n        sep = '&';\n    }\n\n    // result\n    querystr->data = (char *)querybuf->pos;\n    querystr->len = aos_buf_size(querybuf);\n    \n    return AOSE_OK;\n}\n\nvoid aos_gnome_sort(const char **headers, int size)\n{\n    const char *tmp;\n    int i = 0, last_highest = 0;\n\n    while (i < size) {\n        if ((i == 0) || apr_strnatcasecmp(headers[i-1], headers[i]) < 0) {\n            i = ++last_highest;\n        } else {\n            tmp = headers[i];\n            headers[i] = headers[i - 1];\n            headers[--i] = tmp;\n        }\n    }\n}\n\nconst char* aos_http_method_to_string(http_method_e method)\n{\n    switch (method) {\n        case HTTP_GET:\n            return \"GET\";\n        case HTTP_HEAD:\n            return \"HEAD\";\n        case HTTP_PUT:\n            return \"PUT\";\n        case HTTP_POST:\n            return \"POST\";\n        case HTTP_DELETE:\n            return \"DELETE\";\n        default:\n            return \"UNKNOWN\";\n    }\n}\n\nint aos_base64_encode(const unsigned char *in, int inLen, char *out)\n{\n    static const char *ENC = \n        \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n    char *original_out = out;\n\n    while (inLen) {\n        // first 6 bits of char 1\n        *out++ = ENC[*in >> 2];\n        if (!--inLen) {\n            // last 2 bits of char 1, 4 bits of 0\n            *out++ = ENC[(*in & 0x3) << 4];\n            *out++ = '=';\n            *out++ = '=';\n            break;\n        }\n        // last 2 bits of char 1, first 4 bits of char 2\n        *out++ = ENC[((*in & 0x3) << 4) | (*(in + 1) >> 4)];\n        in++;\n        if (!--inLen) {\n            // last 4 bits of char 2, 2 bits of 0\n            *out++ = ENC[(*in & 0xF) << 2];\n            *out++ = '=';\n            break;\n        }\n        // last 4 bits of char 2, first 2 bits of char 3\n        *out++ = ENC[((*in & 0xF) << 2) | (*(in + 1) >> 6)];\n        in++;\n        // last 6 bits of char 3\n        *out++ = ENC[*in & 0x3F];\n        in++, inLen--;\n    }\n\n    return (out - original_out);\n}\n\n// HMAC-SHA-1:\n//\n// K - is key padded with zeros to 512 bits\n// m - is message\n// OPAD - 0x5c5c5c...\n// IPAD - 0x363636...\n//\n// HMAC(K,m) = SHA1((K ^ OPAD) . SHA1((K ^ IPAD) . m))\nvoid HMAC_SHA1(unsigned char hmac[20], const unsigned char *key, int key_len,\n               const unsigned char *message, int message_len)\n{\n    unsigned char kopad[64], kipad[64];\n    int i;\n    unsigned char digest[APR_SHA1_DIGESTSIZE];\n    apr_sha1_ctx_t context;\n    \n    if (key_len > 64) {\n        key_len = 64;\n    }\n\n    for (i = 0; i < key_len; i++) {\n        kopad[i] = key[i] ^ 0x5c;\n        kipad[i] = key[i] ^ 0x36;\n    }\n\n    for ( ; i < 64; i++) {\n        kopad[i] = 0 ^ 0x5c;\n        kipad[i] = 0 ^ 0x36;\n    }\n\n    apr_sha1_init(&context);\n    apr_sha1_update(&context, (const char *)kipad, 64);\n    apr_sha1_update(&context, (const char *)message, (unsigned int)message_len);\n    apr_sha1_final(digest, &context);\n\n    apr_sha1_init(&context);\n    apr_sha1_update(&context, (const char *)kopad, 64);\n    apr_sha1_update(&context, (const char *)digest, 20);\n    apr_sha1_final(hmac, &context);\n}\n\nunsigned char* aos_md5(aos_pool_t* pool, const char *in, apr_size_t in_len) {\n    unsigned char* out;\n    apr_md5_ctx_t context;\n\n    //APR_MD5_DIGESTSIZE: The MD5 digest size, value is 16\n    out = aos_palloc(pool, APR_MD5_DIGESTSIZE + 1);\n    if (!out) {\n        return NULL;\n    }\n\n    if (0 != apr_md5_init(&context)) {\n        return NULL;\n    }\n\n    if (0 != apr_md5_update(&context, in, in_len)) {\n        return NULL;\n    }\n\n    if (0 != apr_md5_final(out, &context)) {\n        return NULL;\n    }\n    out[APR_MD5_DIGESTSIZE] = '\\0';\n    return out;\n};\n\nint aos_url_decode(const char *in, char *out)\n{\n    static const char tbl[256] = {\n        -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n        -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n        -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n         0, 1, 2, 3, 4, 5, 6, 7,  8, 9,-1,-1,-1,-1,-1,-1,\n        -1,10,11,12,13,14,15,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n        -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n        -1,10,11,12,13,14,15,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n        -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n        -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n        -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n        -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n        -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n        -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n        -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n        -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,\n        -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1\n    };\n    char c, v1, v2;\n\n    if(in != NULL) {\n        while((c=*in++) != '\\0') {\n            if(c == '%') {\n                if(!(v1=*in++) || (v1=tbl[(unsigned char)v1])<0 || \n                   !(v2=*in++) || (v2=tbl[(unsigned char)v2])<0) {\n                    *out = '\\0';\n                    return -1;\n                }\n                c = (v1<<4)|v2;\n            } else if (c == '+') {\n                c = ' ';\n            }\n            *out++ = c;\n        }\n    }\n    *out = '\\0';\n    return 0;\n}\n\n/*\n * Convert a string to a long long integer.\n *\n * Ignores `locale' stuff.  Assumes that the upper and lower case\n * alphabets and digits are each contiguous.\n */\nlong long aos_strtoll(const char *nptr, char **endptr, int base)\n{\n    const char *s;\n    /* LONGLONG */\n    long long int acc, cutoff;\n    int c;\n    int neg, any, cutlim;\n\n    /* endptr may be NULL */\n\n#ifdef __GNUC__\n    /* This outrageous construct just to shut up a GCC warning. */\n    (void) &acc; (void) &cutoff;\n#endif\n\n    /*\n     * Skip white space and pick up leading +/- sign if any.\n     * If base is 0, allow 0x for hex and 0 for octal, else\n     * assume decimal; if base is already 16, allow 0x.\n     */\n    s = nptr;\n    do {\n        c = (unsigned char) *s++;\n    } while (isspace(c));\n    if (c == '-') {\n        neg = 1;\n        c = *s++;\n    } else {\n        neg = 0;\n        if (c == '+')\n            c = *s++;\n    }\n    if ((base == 0 || base == 16) &&\n        c == '0' && (*s == 'x' || *s == 'X')) {\n        c = s[1];\n        s += 2;\n        base = 16;\n    }\n    if (base == 0)\n        base = c == '0' ? 8 : 10;\n\n    /*\n     * Compute the cutoff value between legal numbers and illegal\n     * numbers.  That is the largest legal value, divided by the\n     * base.  An input number that is greater than this value, if\n     * followed by a legal input character, is too big.  One that\n     * is equal to this value may be valid or not; the limit\n     * between valid and invalid numbers is then based on the last\n     * digit.  For instance, if the range for long longs is\n     * [-9223372036854775808..9223372036854775807] and the input base\n     * is 10, cutoff will be set to 922337203685477580 and cutlim to\n     * either 7 (neg==0) or 8 (neg==1), meaning that if we have\n     * accumulated a value > 922337203685477580, or equal but the\n     * next digit is > 7 (or 8), the number is too big, and we will\n     * return a range error.\n     *\n     * Set any if any `digits' consumed; make it negative to indicate\n     * overflow.\n     */\n    cutoff = neg ? LLONG_MIN : LLONG_MAX;\n    cutlim = (int)(cutoff % base);\n    cutoff /= base;\n    if (neg) {\n        if (cutlim > 0) {\n            cutlim -= base;\n            cutoff += 1;\n        }\n        cutlim = -cutlim;\n    }\n    for (acc = 0, any = 0;; c = (unsigned char) *s++) {\n        if (isdigit(c))\n            c -= '0';\n        else if (isalpha(c))\n            c -= isupper(c) ? 'A' - 10 : 'a' - 10;\n        else\n            break;\n        if (c >= base)\n            break;\n        if (any < 0)\n            continue;\n        if (neg) {\n            if (acc < cutoff || (acc == cutoff && c > cutlim)) {\n                any = -1;\n                acc = LLONG_MIN;\n                errno = ERANGE;\n            } else {\n                any = 1;\n                acc *= base;\n                acc -= c;\n            }\n        } else {\n            if (acc > cutoff || (acc == cutoff && c > cutlim)) {\n                any = -1;\n                acc = LLONG_MAX;\n                errno = ERANGE;\n            } else {\n                any = 1;\n                acc *= base;\n                acc += c;\n            }\n        }\n    }\n    if (endptr != 0)\n        /* LINTED interface specification */\n        *endptr = (char *)(any ? s - 1 : nptr);\n    return (acc);\n}\n\nint64_t aos_atoi64(const char *nptr)\n{\n    return aos_strtoull(nptr, NULL, 10);\n}\n\nunsigned long long aos_strtoull(const char *nptr, char **endptr, int base)\n{\n    const char *s;\n    unsigned long long acc, cutoff;\n    int c;\n    int neg, any, cutlim;\n\n    /*\n     * See strtoq for comments as to the logic used.\n     */\n    s = nptr;\n    do {\n        c = (unsigned char) *s++;\n    } while (isspace(c));\n    if (c == '-') {\n        neg = 1;\n        c = *s++;\n    } else { \n        neg = 0;\n        if (c == '+')\n            c = *s++;\n    }\n    if ((base == 0 || base == 16) &&\n        c == '0' && (*s == 'x' || *s == 'X')) {\n        c = s[1];\n        s += 2;\n        base = 16;\n    }\n    if (base == 0)\n        base = c == '0' ? 8 : 10;\n\n    cutoff = ULLONG_MAX / (unsigned long long)base;\n    cutlim = ULLONG_MAX % (unsigned long long)base;\n    for (acc = 0, any = 0;; c = (unsigned char) *s++) {\n        if (isdigit(c))\n            c -= '0';\n        else if (isalpha(c))\n            c -= isupper(c) ? 'A' - 10 : 'a' - 10;\n        else\n            break;\n        if (c >= base)\n            break;\n        if (any < 0)\n            continue;\n        if (acc > cutoff || (acc == cutoff && c > cutlim)) {\n            any = -1;\n            acc = ULLONG_MAX;\n            errno = ERANGE;\n        } else {\n            any = 1;\n            acc *= (unsigned long long)base;\n            acc += c;\n        }\n    }\n    if (neg && any > 0)\n#ifdef WIN32\n#pragma warning(disable : 4146)\n#endif\n        acc = -acc;\n#ifdef WIN32\n#pragma warning(default : 4146)\n#endif\n    if (endptr != 0)\n        *endptr = (char *) (any ? s - 1 : nptr);\n    return (acc);\n}\n\nuint64_t aos_atoui64(const char *nptr) \n{\n    return aos_strtoull(nptr, NULL, 10);\n}\n\n\n/* ===== start - public domain SHA256 implementation ===== */\n/* This is based on SHA256 implementation in LibTomCrypt that was released into\n * public domain by Tom St Denis. */\n#define WPA_GET_BE32(a) ((((uint32_t)(a)[0]) << 24) |(((uint32_t)(a)[1]) << 16) |(((uint32_t)(a)[2]) <<  8) |((uint32_t)(a)[3]))\n#define WPA_PUT_BE32(a, val)                                        \\\ndo {                                                                \\\n    (a)[0] = (unsigned char)((((uint32_t) (val)) >> 24) & 0xff); \\\n    (a)[1] = (unsigned char)((((uint32_t) (val)) >> 16) & 0xff); \\\n    (a)[2] = (unsigned char)((((uint32_t) (val)) >> 8) & 0xff);  \\\n    (a)[3] = (unsigned char)(((uint32_t) (val)) & 0xff);         \\\n} while(0)\n\n\n#define WPA_PUT_BE64(a, val)                                  \\\ndo {                                                          \\\n    (a)[0] = (unsigned char)(((uint64_t)(val)) >> 56);  \\\n    (a)[1] = (unsigned char)(((uint64_t)(val)) >> 48);  \\\n    (a)[2] = (unsigned char)(((uint64_t)(val)) >> 40);  \\\n    (a)[3] = (unsigned char)(((uint64_t)(val)) >> 32);  \\\n    (a)[4] = (unsigned char)(((uint64_t)(val)) >> 24);  \\\n    (a)[5] = (unsigned char)(((uint64_t)(val)) >> 16);  \\\n    (a)[6] = (unsigned char)(((uint64_t)(val)) >> 8);   \\\n    (a)[7] = (unsigned char)(((uint64_t)(val)) & 0xff); \\\n} while(0)\n\ntypedef struct sha256_state {\n    uint64_t length;\n    uint32_t state[8], curlen;\n    unsigned char buf[64];\n} SHA256_CTX;\n\n/* the K array */\nstatic const uint32_t K[64] = {\n    0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, 0x3956c25bUL,\n    0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, 0xd807aa98UL, 0x12835b01UL,\n    0x243185beUL, 0x550c7dc3UL, 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL,\n    0xc19bf174UL, 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL,\n    0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, 0x983e5152UL,\n    0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, 0xc6e00bf3UL, 0xd5a79147UL,\n    0x06ca6351UL, 0x14292967UL, 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL,\n    0x53380d13UL, 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL,\n    0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, 0xd192e819UL,\n    0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, 0x19a4c116UL, 0x1e376c08UL,\n    0x2748774cUL, 0x34b0bcb5UL, 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL,\n    0x682e6ff3UL, 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL,\n    0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL\n};\n/* Various logical functions */\n#define RORc(x, y) \\\n    (((((uint32_t)(x) & 0xFFFFFFFFUL) >> (uint32_t)((y) & 31)) | \\\n       ((uint32_t)(x) << (uint32_t)(32 - ((y) & 31)))) & 0xFFFFFFFFUL)\n#define Ch(x,y,z)   (z ^ (x & (y ^ z)))\n#define Maj(x,y,z)  (((x | y) & z) | (x & y))\n#define S(x, n)     RORc((x), (n))\n#define R(x, n)     (((x)&0xFFFFFFFFUL)>>(n))\n#define Sigma0(x)   (S(x, 2) ^ S(x, 13) ^ S(x, 22))\n#define Sigma1(x)   (S(x, 6) ^ S(x, 11) ^ S(x, 25))\n#define Gamma0(x)   (S(x, 7) ^ S(x, 18) ^ R(x, 3))\n#define Gamma1(x)   (S(x, 17) ^ S(x, 19) ^ R(x, 10))\n#ifndef MIN\n#define MIN(x, y)   (((x) < (y)) ? (x) : (y))\n#endif\n/* compress 512-bits */\nstatic int sha256_compress(struct sha256_state* md, unsigned char* buf)\n{\n    unsigned long S[8], W[64], t0, t1;\n    unsigned long t;\n    int i;\n    /* copy state into S */\n    for (i = 0; i < 8; i++) {\n        S[i] = md->state[i];\n    }\n    /* copy the state into 512-bits into W[0..15] */\n    for (i = 0; i < 16; i++)\n        W[i] = WPA_GET_BE32(buf + (4 * i));\n    /* fill W[16..63] */\n    for (i = 16; i < 64; i++) {\n        W[i] = Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) +\n            W[i - 16];\n    }\n    /* Compress */\n#define RND(a,b,c,d,e,f,g,h,i)                    \\\n    t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i]; \\\n    t1 = Sigma0(a) + Maj(a, b, c);                  \\\n    d += t0;                                        \\\n    h = t0 + t1;\n    for (i = 0; i < 64; ++i) {\n        RND(S[0], S[1], S[2], S[3], S[4], S[5], S[6], S[7], i);\n        t = S[7]; S[7] = S[6]; S[6] = S[5]; S[5] = S[4];\n        S[4] = S[3]; S[3] = S[2]; S[2] = S[1]; S[1] = S[0]; S[0] = t;\n    }\n    /* feedback */\n    for (i = 0; i < 8; i++) {\n        md->state[i] = md->state[i] + S[i];\n    }\n    return 0;\n}\n/* Initialize the hash state */\nstatic void SHA256_Init(struct sha256_state* md)\n{\n    md->curlen = 0;\n    md->length = 0;\n    md->state[0] = 0x6A09E667UL;\n    md->state[1] = 0xBB67AE85UL;\n    md->state[2] = 0x3C6EF372UL;\n    md->state[3] = 0xA54FF53AUL;\n    md->state[4] = 0x510E527FUL;\n    md->state[5] = 0x9B05688CUL;\n    md->state[6] = 0x1F83D9ABUL;\n    md->state[7] = 0x5BE0CD19UL;\n}\n/**\n   Process a block of memory though the hash\n   @param md     The hash state\n   @param in     The data to hash\n   @param inlen  The length of the data (octets)\n   @return CRYPT_OK if successful\n*/\nstatic int SHA256_Update(struct sha256_state* md, const unsigned char* in, unsigned long inlen)\n{\n    unsigned long n;\n#define block_size 64\n    if (md->curlen > sizeof(md->buf))\n        return -1;\n    while (inlen > 0) {\n        if (md->curlen == 0 && inlen >= block_size) {\n            if (sha256_compress(md, (unsigned char*)in) < 0)\n                return -1;\n            md->length += block_size * 8;\n            in += block_size;\n            inlen -= block_size;\n        }\n        else {\n            n = MIN(inlen, (block_size - md->curlen));\n            memcpy(md->buf + md->curlen, in, n);\n            md->curlen += n;\n            in += n;\n            inlen -= n;\n            if (md->curlen == block_size) {\n                if (sha256_compress(md, md->buf) < 0)\n                    return -1;\n                md->length += 8 * block_size;\n                md->curlen = 0;\n            }\n        }\n    }\n    return 0;\n}\n/**\n   Terminate the hash to get the digest\n   @param md  The hash state\n   @param out [out] The destination of the hash (32 bytes)\n   @return CRYPT_OK if successful\n*/\nstatic int SHA256_Final(unsigned char* out, struct sha256_state* md)\n{\n    int i;\n    if (md->curlen >= sizeof(md->buf))\n        return -1;\n    /* increase the length of the message */\n    md->length += md->curlen * 8;\n    /* append the '1' bit */\n    md->buf[md->curlen++] = (unsigned char)0x80;\n    /* if the length is currently above 56 bytes we append zeros\n     * then compress.  Then we can fall back to padding zeros and length\n     * encoding like normal.\n     */\n    if (md->curlen > 56) {\n        while (md->curlen < 64) {\n            md->buf[md->curlen++] = (unsigned char)0;\n        }\n        sha256_compress(md, md->buf);\n        md->curlen = 0;\n    }\n    /* pad up to 56 bytes of zeroes */\n    while (md->curlen < 56) {\n        md->buf[md->curlen++] = (unsigned char)0;\n    }\n    /* store length */\n    WPA_PUT_BE64(md->buf + 56, md->length);\n    sha256_compress(md, md->buf);\n    /* copy output */\n    for (i = 0; i < 8; i++)\n        WPA_PUT_BE32(out + (4 * i), md->state[i]);\n    return 0;\n}\n/* ===== end - public domain SHA256 implementation ===== */\n\nvoid aos_HMAC_SHA256(char hmac[32], const char* key, int key_len, const char* message, int message_len)\n{\n    unsigned char kopad[64], kipad[64];\n    int i;\n    unsigned char digest[32];\n    SHA256_CTX context;\n\n    if (key_len > 64) {\n        key_len = 64;\n    }\n\n    for (i = 0; i < key_len; i++) {\n        kopad[i] = key[i] ^ 0x5c;\n        kipad[i] = key[i] ^ 0x36;\n    }\n\n    for (; i < 64; i++) {\n        kopad[i] = 0 ^ 0x5c;\n        kipad[i] = 0 ^ 0x36;\n    }\n\n    SHA256_Init(&context);\n    SHA256_Update(&context, kipad, 64);\n    SHA256_Update(&context, (unsigned char*)message, (unsigned int)message_len);\n    SHA256_Final(digest, &context);\n\n    SHA256_Init(&context);\n    SHA256_Update(&context, kopad, 64);\n    SHA256_Update(&context, digest, 32);\n    SHA256_Final((unsigned char* )hmac, &context);\n}\n\nvoid aos_SHA256(char hash[32], const char* message, int message_len)\n{\n    SHA256_CTX context;\n    memset(hash, 0, 32);\n    SHA256_Init(&context);\n    SHA256_Update(&context, (const unsigned char*)message, message_len);\n    SHA256_Final((unsigned char*)hash, &context);\n}\n"
  },
  {
    "path": "oss_c_sdk/aos_util.h",
    "content": "#ifndef LIBAOS_UTIL_H\n#define LIBAOS_UTIL_H\n\n#include \"aos_buf.h\"\n#include \"aos_string.h\"\n#include \"aos_define.h\"\n#include \"aos_fstack.h\"\n\n#include <mxml.h>\n#include <apr_md5.h>\n#include <apr_sha1.h>\n\nAOS_CPP_START\n\nint aos_parse_xml_body(aos_list_t *bc, mxml_node_t **root);\n\nvoid aos_gnome_sort(const char **headers, int size);\n\nint aos_convert_to_gmt_time(char* date, const char* format, apr_time_exp_t *tm);\nint aos_get_gmt_str_time(char datestr[AOS_MAX_GMT_TIME_LEN]);\n\nint aos_convert_to_iso8601_time(char* date, const char* format, apr_time_exp_t* tm);\nint aos_get_iso8601_str_time(char datestr[AOS_MAX_GMT_TIME_LEN]);\nint aos_get_iso8601_str_time_ex(char datestr[AOS_MAX_GMT_TIME_LEN], apr_time_t now);\nint aos_get_gmt_time_date(const char *gmt, char datestr[AOS_MAX_SHORT_TIME_LEN]);\n\n/**\n * URL-encodes a string from [src] into [dest]. [dest] must have at least\n * 3x the number of characters that [source] has. At most [maxSrcSize] bytes\n * from [src] are encoded; if more are present in [src], 0 is returned from\n * urlEncode, else nonzero is returned.\n * if slash not 0, don't change / to %2F\n */\nint aos_url_encode(char *dest, const char *src, int maxSrcSize);\nint aos_url_encode_ex(char *dest, const char *src, int maxSrcSize, int slash);\n\n/**\n * Convert binary data to a hex encoding.\n */\nint aos_encode_hex(char* dest, const void* src, int srclen, int* len);\n\nconst char* aos_http_method_to_string(http_method_e method);\n\n/**\n * encode query string, check query args < AOS_MAX_QUERY_ARG_LEN\n * result string \"?a&b=x\"\n */\nint aos_query_params_to_string(aos_pool_t *p, aos_table_t *query_params, aos_string_t *querystr);\n\n/**\n * base64 encode bytes. The output buffer must have at least\n * ((4 * (inLen + 1)) / 3) bytes in it.  Returns the number of bytes written\n * to [out].\n */\nint aos_base64_encode(const unsigned char *in, int inLen, char *out);\n\n/**\n * Compute HMAC-SHA-1 with key [key] and message [message], storing result\n * in [hmac]\n */\nvoid HMAC_SHA1(unsigned char hmac[20], const unsigned char *key, int key_len,\n               const unsigned char *message, int message_len);\n\nunsigned char* aos_md5(aos_pool_t* pool, const char* in, apr_size_t in_len);\n\nint aos_url_decode(const char *in, char *out);\n\n/*\n * Convert a string to a long long integer.\n *\n * Ignores `locale' stuff.  Assumes that the upper and lower case\n * alphabets and digits are each contiguous.\n */\nlong long aos_strtoll(const char *nptr, char **endptr, int base);\n\n/*\n * @brief Convert a string to int64_t.\n**/\nint64_t aos_atoi64(const char *nptr);\n\n/*\n * @brief Convert a string to an unsigned long long integer.\n *\n * Ignores `locale' stuff.  Assumes that the upper and lower case\n * alphabets and digits are each contiguous.\n**/\nunsigned long long aos_strtoull(const char *nptr, char **endptr, int base);\n\n/*\n * @brief Convert a string to uint64_t.\n**/\nuint64_t aos_atoui64(const char *nptr);\n\n\nvoid aos_HMAC_SHA256(char hmac[32], const char* key, int key_len, const char* message, int message_len);\n\nvoid aos_SHA256(char hash[32], const char* message, int message_len);\n\n\nAOS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/oss_api.h",
    "content": "#ifndef LIBOSS_API_H\n#define LIBOSS_API_H\n\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_define.h\"\n#include \"oss_util.h\"\n\nOSS_CPP_START\n\n/*\n * @brief  create oss bucket\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[in]   oss_acl       the oss bucket acl\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_create_bucket(const oss_request_options_t *options,\n                                const aos_string_t *bucket,\n                                oss_acl_e oss_acl,\n                                aos_table_t **resp_headers);\n\n/*\n * @brief  create oss bucket with storage class\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[in]   oss_acl       the oss bucket acl\n * @param[in]   storage_class the oss bucket storage_class\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_create_bucket_with_storage_class(const oss_request_options_t *options, \n                                const aos_string_t *bucket, \n                                oss_acl_e oss_acl, \n                                oss_storage_class_type_e storage_class, \n                                aos_table_t **resp_headers);\n\n/*\n * @brief  delete oss bucket\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_delete_bucket(const oss_request_options_t *options, \n                                const aos_string_t *bucket, \n                                aos_table_t **resp_headers);\n\n/*\n * @brief  put oss bucket acl\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[in]   oss_acl       the oss bucket acl\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_bucket_acl(const oss_request_options_t *options, \n                                 const aos_string_t *bucket, \n                                 oss_acl_e oss_acl,\n                                 aos_table_t **resp_headers);\n\n/*\n * @brief  get oss bucket acl\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[out]  oss_acl       the oss bucket acl\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_bucket_acl(const oss_request_options_t *options,\n                                 const aos_string_t *bucket,\n                                 aos_string_t *oss_acl,\n                                 aos_table_t **resp_headers);\n\n/*\n * @brief  head oss bucket \n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_head_bucket(const oss_request_options_t *options, \n                              const aos_string_t *bucket, \n                              aos_table_t **resp_headers);\n\n/*\n * @brief  get oss bucket location\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[out]  oss_location  the oss bucket location\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_bucket_location(const oss_request_options_t *options, \n                                      const aos_string_t *bucket, \n                                      aos_string_t *oss_location, \n                                      aos_table_t **resp_headers);\n\n/*\n * @brief  get oss bucket info\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[out]  bucket_info   the oss bucket info\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_bucket_info(const oss_request_options_t *options, \n                                  const aos_string_t *bucket, \n                                  oss_bucket_info_t *bucket_info, \n                                  aos_table_t **resp_headers);\n\n/*\n * @brief  get oss bucket stat\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[out]  bucket_stat   the oss bucket stat\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_bucket_stat(const oss_request_options_t *options, \n                                  const aos_string_t *bucket, \n                                  oss_bucket_stat_t *bucket_stat, \n                                  aos_table_t **resp_headers);\n\n/*\n * @brief  get oss bucket cors\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[out]  rule_list     the oss bucket cors rule list\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_bucket_cors(const oss_request_options_t *options, \n                                  const aos_string_t *bucket, \n                                  aos_list_t *rule_list, \n                                  aos_table_t **resp_headers);\n\n/*\n * @brief  delete oss bucket cors\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_delete_bucket_cors(const oss_request_options_t *options, \n                                     const aos_string_t *bucket, \n                                     aos_table_t **resp_headers);\n\n/*\n * @brief  get oss bucket referer\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[out]  referer_config the oss bucket referer config\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_bucket_referer(const oss_request_options_t *options, \n                                     const aos_string_t *bucket, \n                                     oss_referer_config_t *referer_config, \n                                     aos_table_t **resp_headers);\n/*\n * @brief  put oss bucket storage capacity\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[in]   storage_capacity  the oss bucket storage capacity, unit gigabyte\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_bucket_storage_capacity(const oss_request_options_t *options, \n                                              const aos_string_t *bucket, \n                                              long storage_capacity, \n                                              aos_table_t **resp_headers);\n\n/*\n * @brief  get oss bucket storage capacity\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[out]  storage_capacity  the oss bucket storage capacity\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_bucket_storage_capacity(const oss_request_options_t *options, \n                                              const aos_string_t *bucket, \n                                              long *storage_capacity, \n                                              aos_table_t **resp_headers);\n\n/*\n * @brief  put oss bucket lifecycle\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   lifecycle_rule_list the oss bucket lifecycle list\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_bucket_lifecycle(const oss_request_options_t *options,\n                                       const aos_string_t *bucket, \n                                       aos_list_t *lifecycle_rule_list, \n                                       aos_table_t **resp_headers);\n\n/*\n * @brief  put oss bucket referer \n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   referer_config      the oss bucket referer_config \n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_bucket_referer(const oss_request_options_t *options,\n                                     const aos_string_t *bucket, \n                                     oss_referer_config_t *referer_config,\n                                     aos_table_t **resp_headers);\n\n/*\n * @brief  put oss bucket cors \n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   rule_list           the oss bucket ocor rule list\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_bucket_cors(const oss_request_options_t *options,\n                                  const aos_string_t *bucket, \n                                  aos_list_t *rule_list,\n                                  aos_table_t **resp_headers);\n\n/*\n * @brief  put oss bucket website\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   website_config      the oss bucket website config \n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_bucket_website(const oss_request_options_t *options,\n                                     const aos_string_t *bucket, \n                                     oss_website_config_t *website_config,\n                                     aos_table_t **resp_headers);\n\n/*\n * @brief  get oss bucket website\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[out]   website_config      the oss bucket website config \n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_bucket_website(const oss_request_options_t *options, \n                                     const aos_string_t *bucket, \n                                     oss_website_config_t *website_config, \n                                     aos_table_t **resp_headers);\n\n/*\n * @brief  delete oss bucket website\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_delete_bucket_website(const oss_request_options_t *options, \n                                        const aos_string_t *bucket, \n                                        aos_table_t **resp_headers);\n\n/*\n * @brief  put oss bucket logging\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   content             the oss bucket logging content rule\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_bucket_logging(const oss_request_options_t *options,\n                                     const aos_string_t *bucket, \n                                     oss_logging_config_content_t *content, \n                                     aos_table_t **resp_headers);\n\n/*\n * @brief  get oss bucket logging\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   content             the oss bucket logging content rule\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_bucket_logging(const oss_request_options_t *options, \n                                     const aos_string_t *bucket, \n                                     oss_logging_config_content_t *logging_content, \n                                     aos_table_t **resp_headers);\n\n/*\n * @brief  delete oss bucket logging\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_delete_bucket_logging(const oss_request_options_t *options, \n                                        const aos_string_t *bucket, \n                                        aos_table_t **resp_headers);\n\n/*\n * @brief  get oss bucket lifecycle\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[out]  lifecycle_rule_list the oss bucket lifecycle list\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_bucket_lifecycle(const oss_request_options_t *options,\n                                       const aos_string_t *bucket, \n                                       aos_list_t *lifecycle_rule_list, \n                                       aos_table_t **resp_headers);\n\n/*\n * @brief  delete oss bucket lifecycle\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_delete_bucket_lifecycle(const oss_request_options_t *options,\n                                          const aos_string_t *bucket, \n                                          aos_table_t **resp_headers);\n\n/*\n * @brief  list oss objects\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[in]   params        input params for list object request,\n                              including prefix, marker, delimiter, max_ret\n * @param[out]  params        output params for list object response,\n                              including truncated, next_marker, obje list\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_list_object(const oss_request_options_t *options, \n                              const aos_string_t *bucket, \n                              oss_list_object_params_t *params, \n                              aos_table_t **resp_headers);\n\n/*\n * @brief  list oss buckets\n * @param[in]   options       the oss request options\n * @param[in]   params        input params for list bucket request,\n                              including prefix, marker, max_keys\n * @param[out]  params        output params for list bucket response,\n                              including truncated, next_marker, bucket list\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_list_bucket(const oss_request_options_t *options,\n                              oss_list_buckets_params_t *params, \n                              aos_table_t **resp_headers);\n\n/*\n * @brief  put oss object from buffer\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   buffer              the buffer containing object content\n * @param[in]   headers             the headers for request\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_object_from_buffer(const oss_request_options_t *options, \n                                         const aos_string_t *bucket, \n                                         const aos_string_t *object, \n                                         aos_list_t *buffer, \n                                         aos_table_t *headers,\n                                         aos_table_t **resp_headers);\n\n/*\n * @brief  put oss object from file\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   filename            the filename to put\n * @param[in]   headers             the headers for request\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_object_from_file(const oss_request_options_t *options,\n                                       const aos_string_t *bucket, \n                                       const aos_string_t *object, \n                                       const aos_string_t *filename,\n                                       aos_table_t *headers, \n                                       aos_table_t **resp_headers);\n\n/*\n * @brief  put oss object from buffer\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   buffer              the buffer containing object content\n * @param[in]   headers             the headers for request\n * @param[in]   params              the params for request\n * @param[in]   progress_callback   the progress callback function\n * @param[out]  resp_headers        oss server response headers\n * @param[out]  resp_body           oss server response body\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_do_put_object_from_buffer(const oss_request_options_t *options,\n                                            const aos_string_t *bucket, \n                                            const aos_string_t *object, \n                                            aos_list_t *buffer,\n                                            aos_table_t *headers, \n                                            aos_table_t *params,\n                                            oss_progress_callback progress_callback,\n                                            aos_table_t **resp_headers,\n                                            aos_list_t *resp_body);\n\n/*\n * @brief  put oss object from file\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   filename            the filename to put\n * @param[in]   headers             the headers for request\n * @param[in]   params              the params for request\n * @param[in]   progress_callback   the progress callback function\n * @param[out]  resp_headers        oss server response headers\n * @param[out]  resp_body           oss server response body\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_do_put_object_from_file(const oss_request_options_t *options,\n                                          const aos_string_t *bucket, \n                                          const aos_string_t *object, \n                                          const aos_string_t *filename,\n                                          aos_table_t *headers, \n                                          aos_table_t *params,\n                                          oss_progress_callback progress_callback,\n                                          aos_table_t **resp_headers,\n                                          aos_list_t *resp_body);\n\n/*\n * @brief  get oss object to buffer\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   headers             the headers for request\n * @param[in]   params              the params for request\n * @param[out]  buffer              the buffer containing object content\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_object_to_buffer(const oss_request_options_t *options, \n                                       const aos_string_t *bucket, \n                                       const aos_string_t *object,\n                                       aos_table_t *headers, \n                                       aos_table_t *params,\n                                       aos_list_t *buffer, \n                                       aos_table_t **resp_headers);\n\n/*\n * @brief  restore oss object from archive bucket\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_restore_object(const oss_request_options_t *options, \n                                          const aos_string_t *bucket, \n                                          const aos_string_t *object,\n                                          aos_table_t *headers, \n                                          aos_table_t **resp_headers);\n\n/*\n * @brief  restore oss object from cold archive bucket\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   tier                the mode of restoring an object\n * @param[in]   day                 the day of staying in retrievable state\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_restore_object_with_tier(const oss_request_options_t *options,\n    const aos_string_t *bucket,\n    const aos_string_t *object,\n    oss_tier_type_e tier,\n    int day,\n    aos_table_t *headers,\n    aos_table_t **resp_headers);\n\n/*\n * @brief  get oss object to buffer\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   headers             the headers for request\n * @param[in]   params              the params for request\n * @param[in]   progress_callback   the progress callback function\n * @param[out]  buffer              the buffer containing object content\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_do_get_object_to_buffer(const oss_request_options_t *options, \n                                          const aos_string_t *bucket, \n                                          const aos_string_t *object,\n                                          aos_table_t *headers, \n                                          aos_table_t *params,\n                                          aos_list_t *buffer,\n                                          oss_progress_callback progress_callback, \n                                          aos_table_t **resp_headers);\n\n/*\n * @brief  get oss object to file\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   headers             the headers for request\n * @param[in]   params              the params for request\n * @param[in]  filename             the filename storing object content\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_object_to_file(const oss_request_options_t *options,\n                                     const aos_string_t *bucket, \n                                     const aos_string_t *object,\n                                     aos_table_t *headers, \n                                     aos_table_t *params,\n                                     aos_string_t *filename, \n                                     aos_table_t **resp_headers);\n\n/*\n * @brief  get oss object to file\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   headers             the headers for request\n * @param[in]   params              the params for request\n * @param[in]   filename            the filename storing object content\n * @param[in]   progress_callback   the progress callback function\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_do_get_object_to_file(const oss_request_options_t *options,\n                                        const aos_string_t *bucket, \n                                        const aos_string_t *object,\n                                        aos_table_t *headers, \n                                        aos_table_t *params,\n                                        aos_string_t *filename, \n                                        oss_progress_callback progress_callback,\n                                        aos_table_t **resp_headers);\n\n/*\n * @brief  head oss object\n * @param[in]   options          the oss request options\n * @param[in]   bucket           the oss bucket name\n * @param[in]   object           the oss object name\n * @param[in]   headers          the headers for request\n * @param[out]  resp_headers     oss server response headers containing object meta\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_head_object(const oss_request_options_t *options, \n                              const aos_string_t *bucket, \n                              const aos_string_t *object,\n                              aos_table_t *headers, \n                              aos_table_t **resp_headers);\n\n/*\n * @brief get object meta\n * @param[in]   options          the oss request options\n * @param[in]   bucket           the oss bucket name\n * @param[in]   object           the oss object name\n * @param[out]  resp_headers     oss server response headers containing object meta\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_object_meta(const oss_request_options_t *options,\n                                  const aos_string_t *bucket,\n                                  const aos_string_t *object,\n                                  aos_table_t **resp_headers);\n\n/*\n * @brief put object acl\n * @param[in]   options          the oss request options\n * @param[in]   bucket           the oss bucket name\n * @param[in]   object           the oss object name\n * @param[in]   oss_acl          the oss object ACL\n * @param[out]  resp_headers     oss server response headers containing object meta\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_object_acl(const oss_request_options_t *options,\n                                 const aos_string_t *bucket,\n                                 const aos_string_t *object,\n                                 oss_acl_e oss_acl,\n                                 aos_table_t **resp_headers);\n\n/*\n * @brief put object acl\n * @param[in]   options          the oss request options\n * @param[in]   bucket           the oss bucket name\n * @param[in]   object           the oss object name\n * @param[out]  oss_acl          the oss object ACL\n * @param[out]  resp_headers     oss server response headers containing object meta\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_object_acl(const oss_request_options_t *options,\n                                 const aos_string_t *bucket,\n                                 const aos_string_t *object,\n                                 aos_string_t *oss_acl,\n                                 aos_table_t **resp_headers);\n\n/*\n * @brief  put symlink oss object\n * @param[in]   options          the oss request options\n * @param[in]   bucket           the oss bucket name\n * @param[in]   sym_object       the oss symlink object name\n * @param[in]   target_object    the oss target object game\n * @param[out]  resp_headers     oss server response headers containing object meta\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_symlink(const oss_request_options_t *options, \n                              const aos_string_t *bucket, \n                              const aos_string_t *sym_object,\n                              const aos_string_t *target_object,\n                              aos_table_t **resp_headers);\n\n/*\n * @brief  put symlink oss object\n * @param[in]   options          the oss request options\n * @param[in]   bucket           the oss bucket name\n * @param[in]   sym_object       the oss symlink object name\n * @param[in]   target_object    the oss target object game\n * @param[in]   headers          the headers for request\n * @param[out]  resp_headers     oss server response headers containing object meta\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_do_put_symlink(const oss_request_options_t *options,\n    const aos_string_t *bucket,\n    const aos_string_t *sym_object,\n    const aos_string_t *target_object,\n    aos_table_t *headers,\n    aos_table_t **resp_headers);\n\n/*\n * @brief  get symlink oss object\n * @param[in]   options          the oss request options\n * @param[in]   bucket           the oss bucket name\n * @param[in]   sym_object       the oss symlink object name\n * @param[out]  resp_headers     oss server response headers containing object meta\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_symlink(const oss_request_options_t *options, \n                              const aos_string_t *bucket, \n                              const aos_string_t *sym_object,\n                              aos_table_t **resp_headers);\n\n/*\n * @brief  delete oss object\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_delete_object(const oss_request_options_t *options, \n                                const aos_string_t *bucket, \n                                const aos_string_t *object, \n                                aos_table_t **resp_headers);\n\n/*\n * @brief  delete oss objects\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object_list         the oss object list name\n * @param[in]   is_quiet            is quiet or verbose\n * @param[out]  resp_headers        oss server response headers\n * @param[out]  deleted_object_list deleted object list\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_delete_objects(const oss_request_options_t *options,\n                                 const aos_string_t *bucket, \n                                 aos_list_t *object_list, \n                                 int is_quiet,\n                                 aos_table_t **resp_headers, \n                                 aos_list_t *deleted_object_list);\n\n/*\n * @brief  delete oss objects by prefix\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   prefix              prefix of delete objects\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_delete_objects_by_prefix(oss_request_options_t *options,\n                                           const aos_string_t *bucket, \n                                           const aos_string_t *prefix);\n\n/*\n * @brief  copy oss objects\n * @param[in]   options             the oss request options\n * @param[in]   source_bucket       the oss source bucket name\n * @param[in]   object_list         the oss source object list name\n * @param[in]   dest_bucket         the oss dest bucket name\n * @param[in]   dest_list           the oss dest object list name\n * @param[in]   headers             the headers for request\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_copy_object(const oss_request_options_t *options, \n                              const aos_string_t *source_bucket, \n                              const aos_string_t *source_object, \n                              const aos_string_t *dest_bucket, \n                              const aos_string_t *dest_object, \n                              aos_table_t *headers, \n                              aos_table_t **resp_headers);\n\n/*\n * @brief  append oss object from buffer\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   position            the start position append\n * @param[in]   buffer              the buffer containing object content\n * @param[in]   headers             the headers for request\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_append_object_from_buffer(const oss_request_options_t *options,\n                                            const aos_string_t *bucket, \n                                            const aos_string_t *object, \n                                            int64_t position,\n                                            aos_list_t *buffer, \n                                            aos_table_t *headers, \n                                            aos_table_t **resp_headers);\n\n/*\n * @brief  append oss object from buffer\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   position            the start position append\n * @param[in]   init_crc             the initial crc value\n * @param[in]   buffer              the buffer containing object content\n * @param[in]   headers             the headers for request\n * @param[in]   params              the params for request\n * @param[in]   progress_callback   the progress callback function\n * @param[out]  resp_headers        oss server response headers\n * @param[out]  resp_body           oss server response body\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_do_append_object_from_buffer(const oss_request_options_t *options,\n                                               const aos_string_t *bucket, \n                                               const aos_string_t *object, \n                                               int64_t position,\n                                               uint64_t init_crc,\n                                               aos_list_t *buffer, \n                                               aos_table_t *headers, \n                                               aos_table_t *params,\n                                               oss_progress_callback progress_callback,\n                                               aos_table_t **resp_headers,\n                                               aos_list_t *resp_body);\n\n/*\n * @brief  append oss object from file\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   position            the start position append\n * @param[in]   append_file         the file containing appending content \n * @param[in]   headers             the headers for request\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_append_object_from_file(const oss_request_options_t *options,\n                                          const aos_string_t *bucket, \n                                          const aos_string_t *object, \n                                          int64_t position,\n                                          const aos_string_t *append_file, \n                                          aos_table_t *headers, \n                                          aos_table_t **resp_headers);\n\n/*\n * @brief  append oss object from file\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   position            the start position append\n * @param[in]   init_crc             the initial crc value\n * @param[in]   append_file         the file containing appending content \n * @param[in]   headers             the headers for request\n * @param[in]   params              the params for request\n * @param[in]   progress_callback   the progress callback function\n * @param[out]  resp_headers        oss server response headers\n * @param[out]  resp_body           oss server response body\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_do_append_object_from_file(const oss_request_options_t *options,\n                                             const aos_string_t *bucket, \n                                             const aos_string_t *object, \n                                             int64_t position,\n                                             uint64_t init_crc,\n                                             const aos_string_t *append_file, \n                                             aos_table_t *headers, \n                                             aos_table_t *params,\n                                             oss_progress_callback progress_callback,\n                                             aos_table_t **resp_headers,\n                                             aos_list_t *resp_body);\n\n/*\n * @brief  gen signed url for oss object api\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   expires             the end expire time for signed url\n * @param[in]   req                 the aos http request\n * @return  signed url, non-NULL success, NULL failure\n */\nchar *oss_gen_signed_url(const oss_request_options_t *options, \n                         const aos_string_t *bucket,\n                         const aos_string_t *object, \n                         int64_t expires, \n                         aos_http_request_t *req);\n\n/*\n * @brief  oss put object from buffer using signed url\n * @param[in]   options             the oss request options\n * @param[in]   signed_url          the signed url for put object\n * @param[in]   buffer              the buffer containing object content\n * @param[in]   headers             the headers for request\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_object_from_buffer_by_url(const oss_request_options_t *options,\n                                                const aos_string_t *signed_url, \n                                                aos_list_t *buffer, \n                                                aos_table_t *headers,\n                                                aos_table_t **resp_headers);\n\n/*\n * @brief  oss put object from file using signed url\n * @param[in]   options             the oss request options\n * @param[in]   signed_url          the signed url for put object\n * @param[in]   filename            the filename containing object content\n * @param[in]   headers             the headers for request\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_object_from_file_by_url(const oss_request_options_t *options,\n                                              const aos_string_t *signed_url, \n                                              aos_string_t *filename, \n                                              aos_table_t *headers,\n                                              aos_table_t **resp_headers);\n\n/*\n * @brief  oss get object to buffer using signed url\n * @param[in]   options             the oss request options\n * @param[in]   signed_url          the signed url for put object\n * @param[in]   buffer              the buffer containing object content\n * @param[in]   headers             the headers for request\n * @param[in]   params              the params for request\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_object_to_buffer_by_url(const oss_request_options_t *options,\n                                              const aos_string_t *signed_url, \n                                              aos_table_t *headers,\n                                              aos_table_t *params,\n                                              aos_list_t *buffer,\n                                              aos_table_t **resp_headers);\n\n/*\n * @brief  oss get object to file using signed url\n * @param[in]   options             the oss request options\n * @param[in]   signed_url          the signed url for put object\n * @param[in]   headers             the headers for request\n * @param[in]   params              the params for request\n * @param[in]   filename            the filename containing object content\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_object_to_file_by_url(const oss_request_options_t *options,\n                                            const aos_string_t *signed_url,\n                                            aos_table_t *headers, \n                                            aos_table_t *params,\n                                            aos_string_t *filename,\n                                            aos_table_t **resp_headers);\n\n/*\n * @brief  oss head object using signed url\n * @param[in]   options             the oss request options\n * @param[in]   signed_url          the signed url for put object\n * @param[in]   headers             the headers for request\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_head_object_by_url(const oss_request_options_t *options,\n                                     const aos_string_t *signed_url, \n                                     aos_table_t *headers, \n                                     aos_table_t **resp_headers);\n\n/*\n * @brief  oss get object meta using signed url\n * @param[in]   options             the oss request options\n * @param[in]   signed_url          the signed url for put object\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_object_meta_by_url(const oss_request_options_t *options,\n                                     const aos_string_t *signed_url,\n                                     aos_table_t **resp_headers);\n\n/*\n * @brief  oss init multipart upload\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   upload_id           the upload id to upload if has\n * @param[in]   headers             the headers for request\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_init_multipart_upload(const oss_request_options_t *options, \n                                        const aos_string_t *bucket, \n                                        const aos_string_t *object, \n                                        aos_string_t *upload_id,\n                                        aos_table_t *headers,\n                                        aos_table_t **resp_headers);\n\n/*\n * @brief  oss upload part from buffer\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   upload_id           the upload id to upload if has\n * @param[in]   part_num            the upload part number\n * @param[in]   buffer              the buffer containing upload part content\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_upload_part_from_buffer(const oss_request_options_t *options, \n                                          const aos_string_t *bucket, \n                                          const aos_string_t *object, \n                                          const aos_string_t *upload_id, \n                                          int part_num, \n                                          aos_list_t *buffer, \n                                          aos_table_t **resp_headers);\n\n/*\n * @brief  oss upload part from buffer\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   upload_id           the upload id to upload if has\n * @param[in]   part_num            the upload part number\n * @param[in]   buffer              the buffer containing upload part content\n * @param[in]   progress_callback   the progress callback function\n * @param[in]   headers             the headers for request\n * @param[in]   params              the params for request\n * @param[out]  resp_headers        oss server response headers\n * @param[out]  resp_body           oss server response body\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_do_upload_part_from_buffer(const oss_request_options_t *options, \n                                             const aos_string_t *bucket, \n                                             const aos_string_t *object, \n                                             const aos_string_t *upload_id,\n                                             int part_num, \n                                             aos_list_t *buffer, \n                                             oss_progress_callback progress_callback,\n                                             aos_table_t *headers, \n                                             aos_table_t *params,\n                                             aos_table_t **resp_headers,\n                                             aos_list_t *resp_body);\n\n/*\n * @brief  oss upload part from file\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   upload_id           the upload id to upload if has\n * @param[in]   part_num            the upload part number\n * @param[in]   upload_file         the file containing upload part content\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_upload_part_from_file(const oss_request_options_t *options,\n                                        const aos_string_t *bucket, \n                                        const aos_string_t *object,\n                                        const aos_string_t *upload_id, \n                                        int part_num, \n                                        oss_upload_file_t *upload_file,\n                                        aos_table_t **resp_headers);\n\n/*\n * @brief  oss upload part from file\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   upload_id           the upload id to upload if has\n * @param[in]   part_num            the upload part number\n * @param[in]   upload_file         the file containing upload part content\n * @param[in]   progress_callback   the progress callback function\n * @param[in]   headers             the headers for request\n * @param[in]   params              the params for request\n * @param[out]  resp_headers        oss server response headers\n * @param[out]  resp_body           oss server response body\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_do_upload_part_from_file(const oss_request_options_t *options,\n                                           const aos_string_t *bucket, \n                                           const aos_string_t *object,\n                                           const aos_string_t *upload_id, \n                                           int part_num, \n                                           oss_upload_file_t *upload_file,\n                                           oss_progress_callback progress_callback,\n                                           aos_table_t *headers, \n                                           aos_table_t *params,\n                                           aos_table_t **resp_headers,\n                                           aos_list_t *resp_body);\n\n/*\n * @brief  oss abort multipart upload\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   upload_id           the upload id to upload if has\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_abort_multipart_upload(const oss_request_options_t *options, \n                                         const aos_string_t *bucket, \n                                         const aos_string_t *object, \n                                         aos_string_t *upload_id, \n                                         aos_table_t **resp_headers);\n\n\n/*\n * @brief  oss complete multipart upload\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   upload_id           the upload id to upload if has\n * @param[in]   part_list           the uploaded part list to complete\n * @param[in]   headers             the headers for request          \n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_complete_multipart_upload(const oss_request_options_t *options, \n                                            const aos_string_t *bucket, \n                                            const aos_string_t *object, \n                                            const aos_string_t *upload_id, \n                                            aos_list_t *part_list, \n                                            aos_table_t *headers,\n                                            aos_table_t **resp_headers);\n\n/*\n * @brief  oss complete multipart upload\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   upload_id           the upload id to upload if has\n * @param[in]   part_list           the uploaded part list to complete\n * @param[in]   headers             the headers for request    \n * @param[in]   params              the params for request\n * @param[out]  resp_headers        oss server response headers\n * @param[out]  resp_body           oss server response body\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_do_complete_multipart_upload(const oss_request_options_t *options, \n                                               const aos_string_t *bucket, \n                                               const aos_string_t *object, \n                                               const aos_string_t *upload_id, \n                                               aos_list_t *part_list, \n                                               aos_table_t *headers,\n                                               aos_table_t *params,\n                                               aos_table_t **resp_headers,\n                                               aos_list_t *resp_body);\n\n/*\n * @brief  oss list upload part with specific upload_id for object\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   upload_id           the upload id to upload if has\n * @param[in]   params              the input list upload part parameters,\n                                    incluing part_number_marker, max_ret\n * @param[out]  params              the output params,\n                                    including next_part_number_marker, part_list, truncated\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_list_upload_part(const oss_request_options_t *options, \n                                   const aos_string_t *bucket, \n                                   const aos_string_t *object, \n                                   const aos_string_t *upload_id, \n                                   oss_list_upload_part_params_t *params, \n                                   aos_table_t **resp_headers);\n\n/*\n * @brief  oss list multipart upload for bucket\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   params              the input list multipart upload parameters\n * @param[out]  params              the output params including next_key_marker, next_upload_id_markert, upload_list etc\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_list_multipart_upload(const oss_request_options_t *options, \n                                        const aos_string_t *bucket, \n                                        oss_list_multipart_upload_params_t *params, \n                                        aos_table_t **resp_headers);\n\n/*\n * @brief  oss copy large object using upload part copy\n * @param[in]   options             the oss request options\n * @param[in]   paramsthe           upload part copy parameters\n * @param[in]   headers             the headers for request\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_upload_part_copy(const oss_request_options_t *options,\n                                   oss_upload_part_copy_params_t *params, \n                                   aos_table_t *headers, \n                                   aos_table_t **resp_headers);\n\n/*\n * @brief  oss upload file using multipart upload\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   upload_id           the upload id to upload if has\n * @param[in]   filename            the filename containing object content\n * @param[in]   part_size           the part size for multipart upload\n * @param[in]   headers             the headers for request\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_upload_file(oss_request_options_t *options,\n                              const aos_string_t *bucket, \n                              const aos_string_t *object, \n                              aos_string_t *upload_id,\n                              aos_string_t *filename, \n                              int64_t part_size,\n                              aos_table_t *headers);\n\n/*\n * @brief  oss upload file with mulit-thread and resumable\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   filepath            the filename containing object content\n * @param[in]   headers             the headers for request    \n * @param[in]   params              the params for request\n * @param[in]   clt_params          the control params of upload\n * @param[in]   progress_callback   the progress callback function\n * @param[out]  resp_headers        oss server response headers\n * @param[out]  resp_body           oss server response body\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_resumable_upload_file(oss_request_options_t *options,\n                                        aos_string_t *bucket, \n                                        aos_string_t *object, \n                                        aos_string_t *filepath,                           \n                                        aos_table_t *headers,\n                                        aos_table_t *params,\n                                        oss_resumable_clt_params_t *clt_params, \n                                        oss_progress_callback progress_callback,\n                                        aos_table_t **resp_headers,\n                                        aos_list_t *resp_body);\n\n/*\n * @brief  oss upload file with mulit-thread and resumable\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[in]   filepath            download object to the file\n * @param[in]   headers             the headers for request    \n * @param[in]   params              the params for request\n * @param[in]   clt_params          the control params of upload\n * @param[in]   progress_callback   the progress callback function\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_resumable_download_file(oss_request_options_t *options,\n                                          aos_string_t *bucket, \n                                          aos_string_t *object, \n                                          aos_string_t *filepath,                           \n                                          aos_table_t *headers,\n                                          aos_table_t *params,\n                                          oss_resumable_clt_params_t *clt_params, \n                                          oss_progress_callback progress_callback,\n                                          aos_table_t **resp_headers);\n\n/*\n * @brief  oss create live channel\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   config              the oss live channel configuration\n * @param[in]   publish_url_list    the publish url list\n * @param[in]   play_url_list       the play url list\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_create_live_channel(const oss_request_options_t *options,\n                                      const aos_string_t *bucket,\n                                      oss_live_channel_configuration_t *config,\n                                      aos_list_t *publish_url_list,\n                                      aos_list_t *play_url_list,\n                                      aos_table_t **resp_headers);\n\n/*\n * @brief  oss set live channel status\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   live_channel        the oss live channel name\n * @param[in]   live_channel_status the oss live channel status, enabled or disabled\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_live_channel_status(const oss_request_options_t *options,\n                                          const aos_string_t *bucket,\n                                          const aos_string_t *live_channel,\n                                          const aos_string_t *live_channel_status,\n                                          aos_table_t **resp_headers);\n\n/*\n * @brief  oss get live channel information\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   live_channel        the oss live channel name\n * @param[out]  info                the oss live channel information\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_live_channel_info(const oss_request_options_t *options,\n                                        const aos_string_t *bucket,\n                                        const aos_string_t *live_channel,\n                                        oss_live_channel_configuration_t *info,\n                                        aos_table_t **resp_headers);\n\n/*\n * @brief  oss get live channel stat\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   live_channel        the oss live channel name\n * @param[out]  stat                the oss live channel stat\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_live_channel_stat(const oss_request_options_t *options,\n                                        const aos_string_t *bucket,\n                                        const aos_string_t *live_channel,\n                                        oss_live_channel_stat_t *stat,\n                                        aos_table_t **resp_headers);\n\n/*\n * @brief  delete oss live channel\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   live_channel        the oss live channel name\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_delete_live_channel(const oss_request_options_t *options,\n                                      const aos_string_t *bucket,\n                                      const aos_string_t *live_channel,\n                                      aos_table_t **resp_headers);\n\n/*\n * @brief  list oss live channels\n * @param[in]   options       the oss request options\n * @param[in]   bucket        the oss bucket name\n * @param[in]   params        input params for list live channel request,\n                              including prefix, marker, max_key\n * @param[out]  params        output params for list object response,\n                              including truncated, next_marker, live channel list\n * @param[out]  resp_headers  oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_list_live_channel(const oss_request_options_t *options,\n                                    const aos_string_t *bucket,\n                                    oss_list_live_channel_params_t *params,\n                                    aos_table_t **resp_headers);\n\n/*\n * @brief  oss get live record history of live channel\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   live_channel        the oss live channel name\n * @param[out]  live_record_list    the oss live records of live channel\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_live_channel_history(const oss_request_options_t *options,\n                                           const aos_string_t *bucket,\n                                           const aos_string_t *live_channel,\n                                           aos_list_t *live_record_list,\n                                           aos_table_t **resp_headers);\n\n/*\n * @brief  generate vod play list for a period of time\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   live_channel        the oss live channel name\n * @param[in]   play_list_name      the oss live channel play list name\n * @param[in]   start_time          the start epoch time of play list, such as 1459922368\n * @param[in]   end_time            the end epoch time of play list, such as 1459922563\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_gen_vod_play_list(const oss_request_options_t *options,\n                                     const aos_string_t *bucket,\n                                     const aos_string_t *live_channel,\n                                     const aos_string_t *play_list_name,\n                                     const int64_t start_time,\n                                     const int64_t end_time,\n                                     aos_table_t **resp_headers);\n\n/*\n * @brief  gen signed url for put rtmp stream\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   live_channel        the oss live channel name\n * @param[in]   play_list_name      the oss live channel play list name\n * @param[in]   expires             the end expire time for signed url\n * @return  signed url, non-NULL success, NULL failure\n */\nchar *oss_gen_rtmp_signed_url(const oss_request_options_t *options,\n                              const aos_string_t *bucket,\n                              const aos_string_t *live_channel,\n                              const aos_string_t *play_list_name,\n                              const int64_t expires);\n\n/*\n* @brief  select oss object to buffer\n* @param[in]   options             the oss request options\n* @param[in]   bucket              the oss bucket name\n* @param[in]   object              the oss object name\n* @param[in]   expression          sql select expression\n* @param[in]   select_params       select object parameters\n* @param[out]  buffer              the buffer containing object content\n* @param[out]  resp_headers        oss server response headers\n* @return  aos_status_t, code is 2xx success, other failure\n*/\naos_status_t *oss_select_object_to_buffer(const oss_request_options_t *options,\n                            const aos_string_t *bucket,\n                            const aos_string_t *object,\n                            const aos_string_t *expression,\n                            oss_select_object_params_t *select_params,\n                            aos_list_t *buffer,\n                            aos_table_t **resp_headers);\n\n/*\n* @brief  select oss object to buffer\n* @param[in]   options             the oss request options\n* @param[in]   bucket              the oss bucket name\n* @param[in]   object              the oss object name\n* @param[in]   expression          sql select expression\n* @param[in]   select_params       select object parameters\n* @param[in]   headers             the headers for request\n* @param[in]   params              the params for request\n* @param[out]  buffer              the buffer containing object content\n* @param[in]   progress_callback   the progress callback function\n* @param[out]  resp_headers        oss server response headers\n* @return  aos_status_t, code is 2xx success, other failure\n*/\naos_status_t *oss_do_select_object_to_buffer(const oss_request_options_t *options,\n                            const aos_string_t *bucket,\n                            const aos_string_t *object,\n                            const aos_string_t *expression,\n                            oss_select_object_params_t *select_params,\n                            aos_table_t *headers,\n                            aos_table_t *params,\n                            aos_list_t *buffer,\n                            oss_progress_callback progress_callback,\n                            aos_table_t **resp_headers);\n\n/*\n* @brief  select oss object to file\n* @param[in]   options             the oss request options\n* @param[in]   bucket              the oss bucket name\n* @param[in]   object              the oss object name\n* @param[in]   expression          sql select expression\n* @param[in]   select_params       select object parameters\n* @param[in]   filename            the filename storing object content\n* @param[out]  resp_headers        oss server response headers\n* @return  aos_status_t, code is 2xx success, other failure\n*/\naos_status_t *oss_select_object_to_file(const oss_request_options_t *options,\n                            const aos_string_t *bucket,\n                            const aos_string_t *object,\n                            const aos_string_t *expression,\n                            oss_select_object_params_t *select_params,\n                            aos_string_t *filename,\n                            aos_table_t **resp_headers);\n\n/*\n* @brief  select oss object to file\n* @param[in]   options             the oss request options\n* @param[in]   bucket              the oss bucket name\n* @param[in]   object              the oss object name\n* @param[in]   expression          sql select expression\n* @param[in]   select_params       select object parameters\n* @param[in]   headers             the headers for request\n* @param[in]   params              the params for request\n* @param[in]   filename            the filename storing object content\n* @param[in]   progress_callback   the progress callback function\n* @param[out]  resp_headers        oss server response headers\n* @return  aos_status_t, code is 2xx success, other failure\n*/\naos_status_t *oss_do_select_object_to_file(const oss_request_options_t *options,\n                            const aos_string_t *bucket,\n                            const aos_string_t *object,\n                            const aos_string_t *expression,\n                            oss_select_object_params_t *select_params,\n                            aos_table_t *headers,\n                            aos_table_t *params,\n                            aos_string_t *filename,\n                            oss_progress_callback progress_callback,\n                            aos_table_t **resp_headers);\n\n/*\n* @brief  create select oss object meta\n* @param[in]   options             the oss request options\n* @param[in]   bucket              the oss bucket name\n* @param[in]   object              the oss object name\n* @param[in]   meta_params         create select object meta parameters\n* @param[out]  resp_headers        oss server response headers\n* @return  aos_status_t, code is 2xx success, other failure\n*/\naos_status_t *oss_create_select_object_meta(const oss_request_options_t *options,\n    const aos_string_t *bucket,\n    const aos_string_t *object,\n    oss_select_object_meta_params_t *meta_params,\n    aos_table_t **resp_headers);\n\n/*\n * @brief  put oss object tagging\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[out]  tag_list            the oss object tag list\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_put_object_tagging(const oss_request_options_t *options,\n    const aos_string_t *bucket,\n    const aos_string_t *object,\n    aos_list_t *tag_list,\n    aos_table_t **resp_headers);\n\n/*\n * @brief  get oss object tagging\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[out]  tag_list            the oss object tag list\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_get_object_tagging(const oss_request_options_t *options,\n    const aos_string_t *bucket,\n    const aos_string_t *object,\n    aos_list_t *tag_list,\n    aos_table_t **resp_headers);\n\n/*\n * @brief  delete oss object tagging\n * @param[in]   options             the oss request options\n * @param[in]   bucket              the oss bucket name\n * @param[in]   object              the oss object name\n * @param[out]  resp_headers        oss server response headers\n * @return  aos_status_t, code is 2xx success, other failure\n */\naos_status_t *oss_delete_object_tagging(const oss_request_options_t *options,\n    const aos_string_t *bucket,\n    const aos_string_t *object,\n    aos_table_t **resp_headers);\n\n\nOSS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/oss_auth.c",
    "content": "#include \"oss_auth.h\"\r\n#include \"aos_log.h\"\r\n#include \"oss_util.h\"\r\n\r\nstatic const char *g_s_oss_sub_resource_list[] = {\r\n    \"acl\",\r\n    \"location\",\r\n    \"bucketInfo\",\r\n    \"stat\",\r\n    \"referer\",\r\n    \"cors\",\r\n    \"website\",\r\n    \"restore\",\r\n    \"logging\",\r\n    \"symlink\",\r\n    \"qos\",\r\n    \"uploadId\",\r\n    \"uploads\",\r\n    \"partNumber\",\r\n    \"response-content-type\",\r\n    \"response-content-language\",\r\n    \"response-expires\",\r\n    \"response-cache-control\",\r\n    \"response-content-disposition\",\r\n    \"response-content-encoding\",\r\n    \"append\",\r\n    \"position\",\r\n    \"lifecycle\",\r\n    \"delete\",\r\n    \"live\",\r\n    \"status\",\r\n    \"comp\",\r\n    \"vod\",\r\n    \"startTime\",\r\n    \"endTime\",\r\n    \"x-oss-process\",\r\n    \"security-token\",\r\n    \"objectMeta\",\r\n    \"tagging\",\r\n    \"x-oss-sign-origin-only\",\r\n    NULL,\r\n};\r\n\r\nstatic int is_oss_sub_resource(const char *str);\r\nstatic int is_oss_canonicalized_header(const char *str);\r\nstatic int oss_get_canonicalized_headers(aos_pool_t *p, \r\n        const aos_table_t *headers, aos_buf_t *signbuf);\r\nstatic int oss_get_canonicalized_resource(aos_pool_t *p, \r\n        const aos_table_t *params, aos_buf_t *signbuf);\r\nstatic int oss_get_canonicalized_params(aos_pool_t *p,\r\n    const aos_table_t *params, aos_buf_t *signbuf);\r\nstatic int oss_sign_request_v4(aos_http_request_t *req, const oss_config_t *config);\r\nstatic int get_oss_request_signature_v4(const oss_request_options_t *options, \r\n                              aos_http_request_t *req,\r\n                              const aos_string_t *expires, \r\n                              aos_string_t *signature);\r\n\r\nstatic int is_oss_sub_resource(const char *str)\r\n{\r\n    int i = 0;\r\n    for ( ; g_s_oss_sub_resource_list[i]; i++) {\r\n        if (apr_strnatcmp(g_s_oss_sub_resource_list[i], str) == 0) {\r\n            return 1;\r\n        }\r\n    }\r\n    return 0;\r\n}\r\n\r\nstatic int is_oss_canonicalized_header(const char *str)\r\n{\r\n    size_t len = strlen(OSS_CANNONICALIZED_HEADER_PREFIX);\r\n    return strncasecmp(str, OSS_CANNONICALIZED_HEADER_PREFIX, len) == 0;\r\n}\r\n\r\nstatic int oss_get_canonicalized_headers(aos_pool_t *p, \r\n                                         const aos_table_t *headers, \r\n                                         aos_buf_t *signbuf)\r\n{\r\n    int pos;\r\n    int meta_count = 0;\r\n    int i;\r\n    int len;\r\n    const aos_array_header_t *tarr;\r\n    const aos_table_entry_t *telts;\r\n    char **meta_headers;\r\n    const char *value;\r\n    aos_string_t tmp_str;\r\n    char *tmpbuf = (char*)malloc(AOS_MAX_HEADER_LEN + 1);\r\n    if (NULL == tmpbuf) {\r\n        aos_error_log(\"malloc %d memory failed.\", AOS_MAX_HEADER_LEN + 1);\r\n        return AOSE_OVER_MEMORY;\r\n    }\r\n\r\n    if (apr_is_empty_table(headers)) {\r\n        free(tmpbuf);\r\n        return AOSE_OK;\r\n    }\r\n\r\n    // sort user meta header\r\n    tarr = aos_table_elts(headers);\r\n    telts = (aos_table_entry_t*)tarr->elts;\r\n    meta_headers = aos_pcalloc(p, tarr->nelts * sizeof(char*));\r\n    for (pos = 0; pos < tarr->nelts; ++pos) {\r\n        if (is_oss_canonicalized_header(telts[pos].key)) {\r\n            aos_string_t key = aos_string(telts[pos].key);\r\n            aos_string_tolower(&key);\r\n            meta_headers[meta_count++] = key.data;\r\n        }\r\n    }\r\n    if (meta_count == 0) {\r\n        free(tmpbuf);\r\n        return AOSE_OK;\r\n    }\r\n    aos_gnome_sort((const char **)meta_headers, meta_count);\r\n\r\n    // sign string\r\n    for (i = 0; i < meta_count; ++i) {\r\n        value = apr_table_get(headers, meta_headers[i]);\r\n        aos_str_set(&tmp_str, value);\r\n        aos_strip_space(&tmp_str);\r\n        len = apr_snprintf(tmpbuf, AOS_MAX_HEADER_LEN + 1, \"%s:%.*s\", \r\n                           meta_headers[i], tmp_str.len, tmp_str.data);\r\n        if (len > AOS_MAX_HEADER_LEN) {\r\n            free(tmpbuf);\r\n            aos_error_log(\"user meta header too many, %d > %d.\", \r\n                          len, AOS_MAX_HEADER_LEN);\r\n            return AOSE_INVALID_ARGUMENT;\r\n        }\r\n        tmp_str.data = tmpbuf;\r\n        tmp_str.len = len;\r\n        aos_buf_append_string(p, signbuf, tmpbuf, len);\r\n        aos_buf_append_string(p, signbuf, \"\\n\", sizeof(\"\\n\")-1);\r\n    }\r\n\r\n    free(tmpbuf);\r\n    return AOSE_OK;\r\n}\r\n\r\nstatic int oss_get_canonicalized_resource(aos_pool_t *p, \r\n                                          const aos_table_t *params, \r\n                                          aos_buf_t *signbuf)\r\n{\r\n    int pos;\r\n    int subres_count = 0;\r\n    int i;\r\n    int len;\r\n    char sep;\r\n    const char *value;\r\n    char tmpbuf[AOS_MAX_QUERY_ARG_LEN+1];\r\n    char **subres_headers;\r\n    const aos_array_header_t *tarr;\r\n    const aos_table_entry_t *telts;\r\n\r\n    if (apr_is_empty_table(params)) {\r\n        return AOSE_OK;\r\n    }\r\n\r\n    // sort sub resource param\r\n    tarr = aos_table_elts(params);\r\n    telts = (aos_table_entry_t*)tarr->elts;\r\n    subres_headers = aos_pcalloc(p, tarr->nelts * sizeof(char*));\r\n    for (pos = 0; pos < tarr->nelts; ++pos) {\r\n        if (is_oss_sub_resource(telts[pos].key)) {\r\n            subres_headers[subres_count++] = telts[pos].key;\r\n        }\r\n    }\r\n    if (subres_count == 0) {\r\n        return AOSE_OK;\r\n    }\r\n    aos_gnome_sort((const char **)subres_headers, subres_count);\r\n\r\n    // sign string\r\n    sep = '?';\r\n    for (i = 0; i < subres_count; ++i) {\r\n        value = apr_table_get(params, subres_headers[i]);\r\n        if (value != NULL && *value != '\\0') {\r\n            len = apr_snprintf(tmpbuf, sizeof(tmpbuf), \"%c%s=%s\", \r\n                    sep, subres_headers[i], value);\r\n        } else {\r\n            len = apr_snprintf(tmpbuf, sizeof(tmpbuf), \"%c%s\", \r\n                    sep, subres_headers[i]);\r\n        }\r\n        if (len >= AOS_MAX_QUERY_ARG_LEN) {\r\n            aos_error_log(\"http query params too long, %s.\", tmpbuf);\r\n            return AOSE_INVALID_ARGUMENT;\r\n        }\r\n        aos_buf_append_string(p, signbuf, tmpbuf, len);\r\n        sep = '&';\r\n    }\r\n\r\n    return AOSE_OK;\r\n}    \r\n\r\nint oss_get_string_to_sign(aos_pool_t *p, \r\n                           http_method_e method, \r\n                           const aos_string_t *canon_res,\r\n                           const aos_table_t *headers, \r\n                           const aos_table_t *params, \r\n                           aos_string_t *signstr)\r\n{\r\n    int res;\r\n    aos_buf_t *signbuf;\r\n    const char *value;\r\n    aos_str_null(signstr);\r\n\r\n    signbuf = aos_create_buf(p, 1024);\r\n\r\n#define signbuf_append_from_headers(KEY) do {                            \\\r\n        if ((value = apr_table_get(headers, KEY)) != NULL) {            \\\r\n            aos_buf_append_string(p, signbuf, value, strlen(value));    \\\r\n        }                                                               \\\r\n        aos_buf_append_string(p, signbuf, \"\\n\", sizeof(\"\\n\")-1);        \\\r\n    } while (0)\r\n\r\n#define signbuf_append(VALUE, LEN) do {                                 \\\r\n        aos_buf_append_string(p, signbuf, VALUE, LEN);                  \\\r\n        aos_buf_append_string(p, signbuf, \"\\n\", sizeof(\"\\n\")-1);        \\\r\n    } while (0)\r\n    \r\n    value = aos_http_method_to_string(method);\r\n    signbuf_append(value, strlen(value));    \r\n\r\n    signbuf_append_from_headers(OSS_CONTENT_MD5);\r\n    signbuf_append_from_headers(OSS_CONTENT_TYPE);\r\n\r\n    // date\r\n    if ((value = apr_table_get(headers, OSS_CANNONICALIZED_HEADER_DATE)) == NULL) {\r\n        value = apr_table_get(headers, OSS_DATE);\r\n    }\r\n    if (NULL == value || *value == '\\0') {\r\n        aos_error_log(\"http header date is empty.\");\r\n        return AOSE_INVALID_ARGUMENT;\r\n    }\r\n    signbuf_append(value, strlen(value));\r\n\r\n    // user meta headers\r\n    if ((res = oss_get_canonicalized_headers(p, headers, signbuf)) != AOSE_OK) {\r\n        return res;\r\n    }\r\n\r\n    // canonicalized resource\r\n    aos_buf_append_string(p, signbuf, canon_res->data, canon_res->len);\r\n    \r\n    if (params != NULL && (res = oss_get_canonicalized_resource(p, params, signbuf)) != AOSE_OK) {\r\n        return res;\r\n    }\r\n\r\n    // result\r\n    signstr->data = (char *)signbuf->pos;\r\n    signstr->len = aos_buf_size(signbuf);\r\n\r\n    return AOSE_OK;\r\n}\r\n\r\nvoid oss_sign_headers(aos_pool_t *p, \r\n                      const aos_string_t *signstr, \r\n                      const aos_string_t *access_key_id,\r\n                      const aos_string_t *access_key_secret, \r\n                      aos_table_t *headers)\r\n{\r\n    int b64Len;\r\n    char *value;\r\n    unsigned char hmac[20];\r\n    char b64[((20 + 1) * 4) / 3];\r\n\r\n    HMAC_SHA1(hmac, (unsigned char *)access_key_secret->data, access_key_secret->len,\r\n              (unsigned char *)signstr->data, signstr->len);\r\n\r\n    // Now base-64 encode the results\r\n    b64Len = aos_base64_encode(hmac, 20, b64);\r\n    value = apr_psprintf(p, \"OSS %.*s:%.*s\", access_key_id->len, access_key_id->data, b64Len, b64);\r\n    apr_table_addn(headers, OSS_AUTHORIZATION, value);\r\n\r\n    return;\r\n}\r\n\r\nint oss_get_signed_headers(aos_pool_t *p, \r\n                           const aos_string_t *access_key_id, \r\n                           const aos_string_t *access_key_secret,\r\n                           const aos_string_t* canon_res, \r\n                           aos_http_request_t *req)\r\n{\r\n    int res;\r\n    aos_string_t signstr;\r\n\r\n    res = oss_get_string_to_sign(p, req->method, canon_res, \r\n                                 req->headers, req->query_params, &signstr);\r\n    \r\n    if (res != AOSE_OK) {\r\n        return res;\r\n    }\r\n    \r\n    aos_debug_log(\"signstr:%.*s.\", signstr.len, signstr.data);\r\n\r\n    oss_sign_headers(p, &signstr, access_key_id, access_key_secret, req->headers);\r\n\r\n    return AOSE_OK;\r\n}\r\n\r\nint oss_sign_request(aos_http_request_t *req, \r\n                     const oss_config_t *config)\r\n{\r\n    aos_string_t canon_res;\r\n    char canon_buf[AOS_MAX_URI_LEN];\r\n    char datestr[AOS_MAX_GMT_TIME_LEN];\r\n    const char *value;\r\n    int res = AOSE_OK;\r\n    int len = 0;\r\n    \r\n    if (config->signature_version == 4) {\r\n        return oss_sign_request_v4(req, config);\r\n    }\r\n\r\n    canon_res.data = canon_buf;\r\n    if (req->resource != NULL) {\r\n        len = strlen(req->resource);\r\n        if (len >= AOS_MAX_URI_LEN - 1) {\r\n            aos_error_log(\"http resource too long, %s.\", req->resource);\r\n            return AOSE_INVALID_ARGUMENT;\r\n        }\r\n        canon_res.len = apr_snprintf(canon_buf, sizeof(canon_buf), \"/%s\", req->resource);\r\n    } else {\r\n        canon_res.len = apr_snprintf(canon_buf, sizeof(canon_buf), \"/\");\r\n    }\r\n\r\n    if ((value = apr_table_get(req->headers, OSS_CANNONICALIZED_HEADER_DATE)) == NULL) {\r\n        aos_get_gmt_str_time(datestr);\r\n        apr_table_set(req->headers, OSS_DATE, datestr);\r\n    }\r\n\r\n    res = oss_get_signed_headers(req->pool, &config->access_key_id, \r\n                                 &config->access_key_secret, &canon_res, req);\r\n    return res;\r\n}\r\n\r\nint get_oss_request_signature(const oss_request_options_t *options, \r\n                              aos_http_request_t *req,\r\n                              const aos_string_t *expires, \r\n                              aos_string_t *signature)\r\n{\r\n    aos_string_t canon_res;\r\n    char canon_buf[AOS_MAX_URI_LEN];\r\n    const char *value;\r\n    aos_string_t signstr;\r\n    int res = AOSE_OK;\r\n    int b64Len;\r\n    unsigned char hmac[20];\r\n    char b64[((20 + 1) * 4) / 3];\r\n\r\n    canon_res.data = canon_buf;\r\n    canon_res.len = apr_snprintf(canon_buf, sizeof(canon_buf), \"/%s\", req->resource);\r\n\r\n    apr_table_set(req->headers, OSS_DATE, expires->data);\r\n\r\n    if ((res = oss_get_string_to_sign(options->pool, req->method, &canon_res, \r\n        req->headers, req->query_params, &signstr))!= AOSE_OK) {\r\n        return res;\r\n    }\r\n\r\n    HMAC_SHA1(hmac, (unsigned char *)options->config->access_key_secret.data, \r\n              options->config->access_key_secret.len,\r\n              (unsigned char *)signstr.data, signstr.len);\r\n\r\n    b64Len = aos_base64_encode(hmac, 20, b64);\r\n    value = apr_psprintf(options->pool, \"%.*s\", b64Len, b64);\r\n    aos_str_set(signature, value);\r\n\r\n    return res;\r\n}\r\n\r\nint oss_get_signed_url(const oss_request_options_t *options, \r\n                       aos_http_request_t *req,\r\n                       const aos_string_t *expires, \r\n                       aos_string_t *signed_url)\r\n{\r\n    char *signed_url_str;\r\n    aos_string_t querystr;\r\n    char uristr[3*AOS_MAX_URI_LEN+1];\r\n    int res = AOSE_OK;\r\n    aos_string_t signature;\r\n    const char *proto;\r\n\r\n    if (options->config->signature_version == 4) {\r\n        if (options->config->sts_token.data != NULL) {\r\n            apr_table_set(req->query_params, OSS_SECURITY_TOKEN_V4, options->config->sts_token.data);\r\n        }\r\n\r\n        res = get_oss_request_signature_v4(options, req, expires, &signature);\r\n        if (res != AOSE_OK) {\r\n            return res;\r\n        }\r\n\r\n        apr_table_set(req->query_params, OSS_SIGNATURE_V4, signature.data);\r\n\r\n    } else {\r\n        if (options->config->sts_token.data != NULL) {\r\n            apr_table_set(req->query_params, OSS_SECURITY_TOKEN, options->config->sts_token.data);\r\n        }\r\n\r\n        res = get_oss_request_signature(options, req, expires, &signature);\r\n        if (res != AOSE_OK) {\r\n            return res;\r\n        }\r\n\r\n        apr_table_set(req->query_params, OSS_ACCESSKEYID, options->config->access_key_id.data);\r\n        apr_table_set(req->query_params, OSS_EXPIRES, expires->data);\r\n        apr_table_set(req->query_params, OSS_SIGNATURE, signature.data);\r\n    }\r\n\r\n    uristr[0] = '\\0';\r\n    aos_str_null(&querystr);\r\n    res = aos_url_encode_ex(uristr, req->uri, AOS_MAX_URI_LEN, req->normalize_url);\r\n    if (res != AOSE_OK) {\r\n        return res;\r\n    }\r\n\r\n    res = aos_query_params_to_string(options->pool, req->query_params, &querystr);\r\n    if (res != AOSE_OK) {\r\n        return res;\r\n    }\r\n\r\n    proto = strlen(req->proto) != 0 ? req->proto : AOS_HTTP_PREFIX;\r\n    signed_url_str = apr_psprintf(options->pool, \"%s%s/%s%.*s\",\r\n                                  proto, req->host, uristr,\r\n                                  querystr.len, querystr.data);\r\n    aos_str_set(signed_url, signed_url_str);\r\n\r\n    return res;\r\n}\r\n\r\nint oss_get_rtmp_signed_url(const oss_request_options_t *options,\r\n                            aos_http_request_t *req,\r\n                            const aos_string_t *expires,\r\n                            const aos_string_t *play_list_name,\r\n                            aos_table_t *params,\r\n                            aos_string_t *signed_url)\r\n{\r\n    char *signed_url_str;\r\n    aos_string_t querystr;\r\n    char uristr[3*AOS_MAX_URI_LEN+1];\r\n    int res = AOSE_OK;\r\n    aos_string_t signature;\r\n    int pos = 0;\r\n    const aos_array_header_t *tarr;\r\n    const aos_table_entry_t *telts;\r\n\r\n    if (NULL != params) {\r\n        tarr = aos_table_elts(params);\r\n        telts = (aos_table_entry_t*)tarr->elts;\r\n        for (pos = 0; pos < tarr->nelts; ++pos) {\r\n            apr_table_set(req->query_params, telts[pos].key, telts[pos].val);\r\n        }\r\n    }\r\n    apr_table_set(req->query_params, OSS_PLAY_LIST_NAME, play_list_name->data);\r\n\r\n    res = get_oss_rtmp_request_signature(options, req, expires,&signature);\r\n    if (res != AOSE_OK) {\r\n        return res;\r\n    }\r\n\r\n    apr_table_set(req->query_params, OSS_ACCESSKEYID,\r\n                  options->config->access_key_id.data);\r\n    apr_table_set(req->query_params, OSS_EXPIRES, expires->data);\r\n    apr_table_set(req->query_params, OSS_SIGNATURE, signature.data);\r\n\r\n    uristr[0] = '\\0';\r\n    aos_str_null(&querystr);\r\n    res = aos_url_encode(uristr, req->uri, AOS_MAX_URI_LEN);\r\n    if (res != AOSE_OK) {\r\n        return res;\r\n    }\r\n\r\n    res = aos_query_params_to_string(options->pool, req->query_params, &querystr);\r\n    if (res != AOSE_OK) {\r\n        return res;\r\n    }\r\n\r\n    signed_url_str = apr_psprintf(options->pool, \"%s%s/%s%.*s\",\r\n                                  req->proto, req->host, uristr,\r\n                                  querystr.len, querystr.data);\r\n    aos_str_set(signed_url, signed_url_str);\r\n\r\n    return res;\r\n}\r\n\r\nint get_oss_rtmp_request_signature(const oss_request_options_t *options,\r\n                                   aos_http_request_t *req,\r\n                                   const aos_string_t *expires,\r\n                                   aos_string_t *signature)\r\n{\r\n    aos_string_t canon_res;\r\n    char canon_buf[AOS_MAX_URI_LEN];\r\n    const char *value;\r\n    aos_string_t signstr;\r\n    int res = AOSE_OK;\r\n    int b64Len;\r\n    unsigned char hmac[20];\r\n    char b64[((20 + 1) * 4) / 3];\r\n\r\n    canon_res.data = canon_buf;\r\n    canon_res.len = apr_snprintf(canon_buf, sizeof(canon_buf), \"/%s\", req->resource);\r\n\r\n    if ((res = oss_get_rtmp_string_to_sign(options->pool, expires, &canon_res,\r\n        req->query_params, &signstr))!= AOSE_OK) {\r\n        return res;\r\n    }\r\n\r\n    HMAC_SHA1(hmac, (unsigned char *)options->config->access_key_secret.data,\r\n              options->config->access_key_secret.len,\r\n              (unsigned char *)signstr.data, signstr.len);\r\n\r\n    b64Len = aos_base64_encode(hmac, 20, b64);\r\n    value = apr_psprintf(options->pool, \"%.*s\", b64Len, b64);\r\n    aos_str_set(signature, value);\r\n\r\n    return res;\r\n}\r\n\r\nint oss_get_rtmp_string_to_sign(aos_pool_t *p,\r\n                                const aos_string_t *expires,\r\n                                const aos_string_t *canon_res,\r\n                                const aos_table_t *params,\r\n                                aos_string_t *signstr)\r\n{\r\n    int res;\r\n    aos_buf_t *signbuf;\r\n    aos_str_null(signstr);\r\n\r\n    signbuf = aos_create_buf(p, 1024);\r\n\r\n    // expires\r\n    aos_buf_append_string(p, signbuf, expires->data, expires->len);\r\n    aos_buf_append_string(p, signbuf, \"\\n\", sizeof(\"\\n\")-1);\r\n\r\n    // canonicalized params\r\n    if ((res = oss_get_canonicalized_params(p, params, signbuf)) != AOSE_OK) {\r\n        return res;\r\n    }\r\n\r\n    // canonicalized resource\r\n    aos_buf_append_string(p, signbuf, canon_res->data, canon_res->len);\r\n\r\n    // result\r\n    signstr->data = (char *)signbuf->pos;\r\n    signstr->len = aos_buf_size(signbuf);\r\n\r\n    return AOSE_OK;\r\n}\r\n\r\nstatic int oss_get_canonicalized_params(aos_pool_t *p,\r\n                                        const aos_table_t *params,\r\n                                        aos_buf_t *signbuf)\r\n{\r\n    int pos;\r\n    int meta_count = 0;\r\n    int i;\r\n    int len;\r\n    const aos_array_header_t *tarr;\r\n    const aos_table_entry_t *telts;\r\n    char **meta_headers;\r\n    const char *value;\r\n    aos_string_t tmp_str;\r\n    char *tmpbuf = (char*)malloc(AOS_MAX_HEADER_LEN + 1);\r\n    if (NULL == tmpbuf) {\r\n        aos_error_log(\"malloc %d memory failed.\", AOS_MAX_HEADER_LEN + 1);\r\n        return AOSE_OVER_MEMORY;\r\n    }\r\n\r\n    if (apr_is_empty_table(params)) {\r\n        free(tmpbuf);\r\n        return AOSE_OK;\r\n    }\r\n\r\n    // sort user meta header\r\n    tarr = aos_table_elts(params);\r\n    telts = (aos_table_entry_t*)tarr->elts;\r\n    meta_headers = aos_pcalloc(p, tarr->nelts * sizeof(char*));\r\n    for (pos = 0; pos < tarr->nelts; ++pos) {\r\n        aos_string_t key = aos_string(telts[pos].key);\r\n        meta_headers[meta_count++] = key.data;\r\n    }\r\n    if (meta_count == 0) {\r\n        free(tmpbuf);\r\n        return AOSE_OK;\r\n    }\r\n    aos_gnome_sort((const char **)meta_headers, meta_count);\r\n\r\n    // sign string\r\n    for (i = 0; i < meta_count; ++i) {\r\n        value = apr_table_get(params, meta_headers[i]);\r\n        aos_str_set(&tmp_str, value);\r\n        aos_strip_space(&tmp_str);\r\n        len = apr_snprintf(tmpbuf, AOS_MAX_HEADER_LEN + 1, \"%s:%.*s\",\r\n                           meta_headers[i], tmp_str.len, tmp_str.data);\r\n        if (len > AOS_MAX_HEADER_LEN) {\r\n            free(tmpbuf);\r\n            aos_error_log(\"rtmp parameters too many, %d > %d.\",\r\n                          len, AOS_MAX_HEADER_LEN);\r\n            return AOSE_INVALID_ARGUMENT;\r\n        }\r\n        tmp_str.data = tmpbuf;\r\n        tmp_str.len = len;\r\n        aos_buf_append_string(p, signbuf, tmpbuf, len);\r\n        aos_buf_append_string(p, signbuf, \"\\n\", sizeof(\"\\n\")-1);\r\n    }\r\n\r\n    free(tmpbuf);\r\n    return AOSE_OK;\r\n}\r\n\r\n//v4\r\n#define AOS_SHA256_HASH_LEN 32\r\n\r\nstatic int cmp_table_key_v4(const void* v1, const void* v2)\r\n{\r\n    const apr_table_entry_t* s1 = (const apr_table_entry_t*)v1;\r\n    const apr_table_entry_t* s2 = (const apr_table_entry_t*)v2;\r\n    return strcmp(s1->key, s2->key);\r\n}\r\n\r\nstatic int is_oss_signed_header_v4(const char* str)\r\n{\r\n    if (strncasecmp(str, OSS_CANNONICALIZED_HEADER_PREFIX, strlen(OSS_CANNONICALIZED_HEADER_PREFIX)) == 0 ||\r\n        strncasecmp(str, OSS_CONTENT_MD5, strlen(OSS_CONTENT_MD5)) == 0 ||\r\n        strncasecmp(str, OSS_CONTENT_TYPE, strlen(OSS_CONTENT_TYPE)) == 0)\r\n    {\r\n        return 1;\r\n    }\r\n    return 0;\r\n}\r\n\r\nstatic int oss_build_canonical_request_v4(aos_pool_t* p, aos_http_request_t* req, aos_string_t* out)\r\n{\r\n    int pos;\r\n    const char* value;\r\n    aos_buf_t* signbuf;\r\n    const aos_array_header_t* arr;\r\n    const aos_table_entry_t* elts;\r\n    aos_table_t *canon_querys;\r\n    aos_table_t* canon_headers;\r\n\r\n    signbuf = aos_create_buf(p, 1024);\r\n\r\n    //http method + \"\\n\"\r\n    value = aos_http_method_to_string(req->method);\r\n    aos_buf_append_string(p, signbuf, value, strlen(value));\r\n    aos_buf_append_string(p, signbuf, \"\\n\", 1);\r\n\r\n    //Canonical URI + \"\\n\"\r\n    aos_buf_append_string(p, signbuf, \"/\", 1);\r\n    if (req->resource != NULL) {\r\n        char canon_buf[AOS_MAX_URI_LEN];\r\n        canon_buf[0] = '\\0';\r\n        aos_url_encode_ex(canon_buf, req->resource, AOS_MAX_URI_LEN, 1);\r\n        aos_buf_append_string(p, signbuf, canon_buf, strlen(canon_buf));\r\n    }\r\n    aos_buf_append_string(p, signbuf, \"\\n\", 1);\r\n\r\n    //Canonical Query String + \"\\n\"\r\n    arr = aos_table_elts(req->query_params);\r\n    elts = (aos_table_entry_t*)arr->elts;\r\n    canon_querys = aos_table_make(p, 0);\r\n    for (pos = 0; pos < arr->nelts; ++pos) {\r\n        char enc_key[AOS_MAX_QUERY_ARG_LEN];\r\n        char enc_value[AOS_MAX_URI_LEN];\r\n        aos_url_encode(enc_key, elts[pos].key, AOS_MAX_QUERY_ARG_LEN);\r\n        aos_url_encode(enc_value, elts[pos].val, AOS_MAX_QUERY_ARG_LEN);\r\n        apr_table_set(canon_querys, enc_key, enc_value);\r\n    }\r\n    arr = aos_table_elts(canon_querys);\r\n    qsort(arr->elts, arr->nelts, arr->elt_size, cmp_table_key_v4);\r\n\r\n    elts = (aos_table_entry_t*)arr->elts;\r\n    for (pos = 0; pos < arr->nelts; ++pos) {\r\n        if (pos != 0) {\r\n            aos_buf_append_string(p, signbuf, \"&\", 1);\r\n        }\r\n        value = elts[pos].key;\r\n        aos_buf_append_string(p, signbuf, value, strlen(value));\r\n\r\n        value = elts[pos].val;\r\n        if (value != NULL && *value != '\\0') {\r\n            aos_buf_append_string(p, signbuf, \"=\", 1);\r\n            aos_buf_append_string(p, signbuf, value, strlen(value));\r\n        }\r\n    }\r\n    aos_buf_append_string(p, signbuf, \"\\n\", 1);\r\n\r\n    //Canonical Headers + \"\\n\"\r\n    arr = aos_table_elts(req->headers);\r\n    elts = (aos_table_entry_t*)arr->elts;\r\n    canon_headers = aos_table_make(p, 0);\r\n    for (pos = 0; pos < arr->nelts; ++pos) {\r\n        if (is_oss_signed_header_v4(elts[pos].key)) {\r\n            aos_string_t key;\r\n            aos_str_set(&key, apr_pstrdup(p, elts[pos].key));\r\n            aos_string_tolower(&key);\r\n            aos_strip_space(&key);\r\n            apr_table_addn(canon_headers, key.data, elts[pos].val);\r\n        }\r\n    }\r\n    arr = aos_table_elts(canon_headers);\r\n    qsort(arr->elts, arr->nelts, arr->elt_size, cmp_table_key_v4);\r\n\r\n    elts = (aos_table_entry_t*)arr->elts;\r\n    for (pos = 0; pos < arr->nelts; ++pos) {\r\n        aos_string_t tmp_str;\r\n        aos_str_set(&tmp_str, elts[pos].val);\r\n        aos_strip_space(&tmp_str);\r\n        aos_buf_append_string(p, signbuf, elts[pos].key, strlen(elts[pos].key));\r\n        aos_buf_append_string(p, signbuf, \":\", 1);\r\n        aos_buf_append_string(p, signbuf, tmp_str.data, tmp_str.len);\r\n        aos_buf_append_string(p, signbuf, \"\\n\", 1);\r\n    }\r\n    aos_buf_append_string(p, signbuf, \"\\n\", 1);\r\n\r\n    //Additional Headers + \"\\n\"\r\n    aos_buf_append_string(p, signbuf, \"\\n\", 1);\r\n\r\n    //Hashed PayLoad\r\n    value = apr_table_get(req->headers, OSS_CONTENT_SHA256);\r\n    if (value == NULL) {\r\n        aos_buf_append_string(p, signbuf, \"UNSIGNED-PAYLOAD\", 16);\r\n    } else {\r\n        aos_buf_append_string(p, signbuf, value, strlen(value));\r\n    }\r\n\r\n    // result\r\n    out->data = (char*)signbuf->pos;\r\n    out->len = aos_buf_size(signbuf);\r\n\r\n    return AOSE_OK;\r\n}\r\n\r\nstatic int oss_build_string_to_sign_v4(aos_pool_t* p, const aos_string_t* datetime, const aos_string_t* date, const aos_string_t* region, const aos_string_t* product, const aos_string_t* canonical_request, aos_string_t* out)\r\n{\r\n    char hash[AOS_SHA256_HASH_LEN];\r\n    char hex[AOS_SHA256_HASH_LEN * 2 + 1];\r\n    aos_buf_t* signbuf;\r\n\r\n    signbuf = aos_create_buf(p, 256);\r\n\r\n    // OSS4-HMAC-SHA256 + \\n +\r\n    // dateime + \\n +\r\n    // data/region/product/aliyun_v4_request + \\n +\r\n    // toHex(sha256(canonical_request));\r\n    aos_buf_append_string(p, signbuf, \"OSS4-HMAC-SHA256\", 16); aos_buf_append_string(p, signbuf, \"\\n\", 1);\r\n    aos_buf_append_string(p, signbuf, datetime->data, datetime->len); aos_buf_append_string(p, signbuf, \"\\n\", 1);\r\n\r\n    //scope\r\n    aos_buf_append_string(p, signbuf, date->data, date->len); aos_buf_append_string(p, signbuf, \"/\", 1);\r\n    aos_buf_append_string(p, signbuf, region->data, region->len); aos_buf_append_string(p, signbuf, \"/\", 1);\r\n    aos_buf_append_string(p, signbuf, product->data, product->len); aos_buf_append_string(p, signbuf, \"/\", 1);\r\n    aos_buf_append_string(p, signbuf, \"aliyun_v4_request\", 17); aos_buf_append_string(p, signbuf, \"\\n\", 1);\r\n\r\n    aos_SHA256(hash, canonical_request->data, canonical_request->len);\r\n    aos_encode_hex(hex, hash, AOS_SHA256_HASH_LEN, NULL);\r\n    aos_buf_append_string(p, signbuf, hex, AOS_SHA256_HASH_LEN * 2);\r\n\r\n    // result\r\n    out->data = (char*)signbuf->pos;\r\n    out->len = aos_buf_size(signbuf);\r\n\r\n    return AOSE_OK;\r\n}\r\n\r\nstatic int oss_build_signing_key_v4(aos_pool_t* p, const aos_string_t* access_key_secret, const aos_string_t* date, const aos_string_t* region, const aos_string_t* product, char signing_key[32])\r\n{\r\n    char* signing_secret;\r\n    char signing_date[AOS_SHA256_HASH_LEN];\r\n    char signing_region[AOS_SHA256_HASH_LEN];\r\n    char signing_product[AOS_SHA256_HASH_LEN];\r\n    signing_secret = apr_psprintf(p, \"aliyun_v4%.*s\", access_key_secret->len, access_key_secret->data);\r\n    aos_HMAC_SHA256(signing_date, signing_secret, strlen(signing_secret), date->data, date->len);\r\n    aos_HMAC_SHA256(signing_region, signing_date, AOS_SHA256_HASH_LEN, region->data, region->len);\r\n    aos_HMAC_SHA256(signing_product, signing_region, AOS_SHA256_HASH_LEN, product->data, product->len);\r\n    aos_HMAC_SHA256(signing_key, signing_product, AOS_SHA256_HASH_LEN, \"aliyun_v4_request\", 17);\r\n\r\n    return AOSE_OK;\r\n}\r\n\r\nstatic int oss_build_signature_v4(aos_pool_t* p, const char signing_key[32], const aos_string_t* string_to_sign, aos_string_t* out)\r\n{\r\n    char signature[AOS_SHA256_HASH_LEN];\r\n    aos_buf_t* signbuf;\r\n\r\n    signbuf = aos_create_buf(p, AOS_SHA256_HASH_LEN * 2 + 1);\r\n    aos_HMAC_SHA256(signature, signing_key, AOS_SHA256_HASH_LEN, string_to_sign->data, string_to_sign->len);\r\n    aos_encode_hex((char*)signbuf->pos, signature, AOS_SHA256_HASH_LEN, NULL);\r\n\r\n    out->data = (char*)signbuf->pos;\r\n    out->len = AOS_SHA256_HASH_LEN * 2;\r\n\r\n    return AOSE_OK;\r\n}\r\n\r\nstatic int oss_sign_request_v4(aos_http_request_t *req, const oss_config_t *config)\r\n{\r\n    aos_string_t datetime;\r\n    aos_string_t date;\r\n    aos_string_t region;\r\n    aos_string_t product;\r\n    aos_string_t canonical_request;\r\n    aos_string_t string_to_sign;\r\n    aos_string_t signature;\r\n    char signing_key[AOS_SHA256_HASH_LEN];\r\n    const char* value;\r\n    int res = AOSE_OK;\r\n    aos_string_t gmt_suffix;\r\n    char shortdate[AOS_MAX_SHORT_TIME_LEN];\r\n\r\n\r\n    //default, ex payload, x-oss-date \r\n    apr_table_set(req->headers, OSS_CONTENT_SHA256, \"UNSIGNED-PAYLOAD\");\r\n\r\n    if ((value = apr_table_get(req->headers, OSS_CANNONICALIZED_HEADER_DATE)) == NULL) {\r\n        char datestr[AOS_MAX_GMT_TIME_LEN];\r\n        aos_get_iso8601_str_time(datestr);\r\n        apr_table_set(req->headers, OSS_CANNONICALIZED_HEADER_DATE, datestr);\r\n    }\r\n\r\n    //datetime & date\r\n    value = apr_table_get(req->headers, OSS_CANNONICALIZED_HEADER_DATE);\r\n    datetime.data = (char *)value;\r\n    datetime.len = strlen(value);\r\n\r\n    aos_str_set(&gmt_suffix, \"GMT\");\r\n    if (aos_ends_with(&datetime, &gmt_suffix)) {\r\n        aos_get_gmt_time_date(datetime.data, shortdate);\r\n        date.data = shortdate;\r\n        date.len = 8;\r\n    }\r\n    else {\r\n        date.data = datetime.data;\r\n        date.len = aos_min(8, datetime.len);\r\n    }\r\n\r\n    //region\r\n    if (!aos_string_is_empty(&config->cloudbox_id)) {\r\n        region.data = config->cloudbox_id.data;\r\n        region.len = config->cloudbox_id.len;\r\n    }\r\n    else {\r\n        region.data = config->region.data;\r\n        region.len = config->region.len;\r\n    }\r\n\r\n    //product, oss or \"oss-cloudbox\"\r\n    if (!aos_string_is_empty(&config->cloudbox_id)) {\r\n        aos_str_set(&product, \"oss-cloudbox\");\r\n    } else {\r\n        aos_str_set(&product, \"oss\");\r\n    }\r\n\r\n    //canonical request\r\n    if ((res = oss_build_canonical_request_v4(req->pool, req, &canonical_request)) != AOSE_OK) {\r\n        return res;\r\n    }\r\n    //printf(\"\\ncanonical_request:\\n%s\", canonical_request.data);\r\n\r\n    //string to sign\r\n    if ((res = oss_build_string_to_sign_v4(req->pool, &datetime, &date, &region, &product, &canonical_request, &string_to_sign)) != AOSE_OK) {\r\n        return res;\r\n    }\r\n    //printf(\"\\nstring_to_sign:\\n%s\", string_to_sign.data);\r\n\r\n    //signing key\r\n    if ((res = oss_build_signing_key_v4(req->pool, &config ->access_key_secret, &date, &region, &product, signing_key)) != AOSE_OK) {\r\n        return res;\r\n    }\r\n\r\n    //signature\r\n    if ((res = oss_build_signature_v4(req->pool, signing_key, &string_to_sign, &signature)) != AOSE_OK) {\r\n        return res;\r\n    }\r\n    //printf(\"\\nsignature:\\n%s\", signature.data);\r\n\r\n    //sign header\r\n    value = apr_psprintf(req->pool, \"OSS4-HMAC-SHA256 Credential=%.*s/%.*s/%.*s/%.*s/aliyun_v4_request,Signature=%.*s\",\r\n        config->access_key_id.len, config->access_key_id.data,\r\n        date.len, date.data,\r\n        region.len, region.data,\r\n        product.len, product.data,\r\n        signature.len, signature.data);\r\n    apr_table_addn(req->headers, OSS_AUTHORIZATION, value);\r\n\r\n    //printf(\"\\nAuthorization:\\n%s\", value);\r\n\r\n    return res;\r\n}\r\n\r\nstatic int get_oss_request_signature_v4(const oss_request_options_t *options, \r\n                              aos_http_request_t *req,\r\n                              const aos_string_t *expires, \r\n                              aos_string_t *signature)\r\n{\r\n    aos_string_t datetime;\r\n    aos_string_t date;\r\n    aos_string_t region;\r\n    aos_string_t product;\r\n    aos_string_t canonical_request;\r\n    aos_string_t string_to_sign;\r\n    char signing_key[AOS_SHA256_HASH_LEN];\r\n    int res = AOSE_OK;\r\n    oss_config_t *config;\r\n    apr_time_t now;\r\n    char datetimestr[AOS_MAX_GMT_TIME_LEN];\r\n    apr_time_t expires_s;\r\n    const char* value;\r\n\r\n    config = options->config;\r\n\r\n    //datetime & date\r\n    now = apr_time_now();\r\n    aos_get_iso8601_str_time_ex(datetimestr, now);\r\n    aos_str_set(&datetime, datetimestr);\r\n    date.data = datetime.data;\r\n    date.len = aos_min(8, datetime.len);\r\n    //region\r\n    if (!aos_string_is_empty(&config->cloudbox_id)) {\r\n        region.data = config->cloudbox_id.data;\r\n        region.len = config->cloudbox_id.len;\r\n    }\r\n    else {\r\n        region.data = config->region.data;\r\n        region.len = config->region.len;\r\n    }\r\n\r\n    //product, oss or \"oss-cloudbox\"\r\n    if (!aos_string_is_empty(&config->cloudbox_id)) {\r\n        aos_str_set(&product, \"oss-cloudbox\");\r\n    } else {\r\n        aos_str_set(&product, \"oss\");\r\n    }\r\n\r\n    // expires_s\r\n    if (aos_string_is_empty(expires)) {\r\n        return AOSE_INVALID_ARGUMENT;\r\n    }\r\n    expires_s = (apr_time_t)aos_atoi64(expires->data);\r\n\r\n    //set x-oss-signature-version\r\n    apr_table_set(req->query_params, OSS_SIGNATURE_VERSION, \"OSS4-HMAC-SHA256\");\r\n\r\n    //set x-oss-credential\r\n    value = apr_psprintf(req->pool, \"%.*s/%.*s/%.*s/%.*s/aliyun_v4_request\",\r\n        config->access_key_id.len, config->access_key_id.data,\r\n        date.len, date.data,\r\n        region.len, region.data,\r\n        product.len, product.data);\r\n    apr_table_set(req->query_params, OSS_CREDENTIAL, value);\r\n\r\n    //set x-oss-date\r\n    apr_table_set(req->query_params, OSS_CANNONICALIZED_HEADER_DATE, datetime.data);\r\n\r\n    //set x-oss-expires\r\n    expires_s = expires_s - apr_time_sec(now);\r\n    value = apr_psprintf(options->pool, \"%\" APR_INT64_T_FMT, expires_s);\r\n    apr_table_set(req->query_params, OSS_EXPIRES_V4, value);\r\n\r\n    //canonical request\r\n    if ((res = oss_build_canonical_request_v4(req->pool, req, &canonical_request)) != AOSE_OK) {\r\n        return res;\r\n    }\r\n    //printf(\"\\ncanonical_request:\\n%s\", canonical_request.data);\r\n\r\n    //string to sign\r\n    if ((res = oss_build_string_to_sign_v4(req->pool, &datetime, &date, &region, &product, &canonical_request, &string_to_sign)) != AOSE_OK) {\r\n        return res;\r\n    }\r\n    //printf(\"\\nstring_to_sign:\\n%s\", string_to_sign.data);\r\n\r\n    //signing key\r\n    if ((res = oss_build_signing_key_v4(req->pool, &config ->access_key_secret, &date, &region, &product, signing_key)) != AOSE_OK) {\r\n        return res;\r\n    }\r\n\r\n    //signature\r\n    if ((res = oss_build_signature_v4(req->pool, signing_key, &string_to_sign, signature)) != AOSE_OK) {\r\n        return res;\r\n    }\r\n    //printf(\"\\nsignature:\\n%s\", signature.data);\r\n\r\n    return res;\r\n}\r\n"
  },
  {
    "path": "oss_c_sdk/oss_auth.h",
    "content": "#ifndef LIB_OSS_AUTH_H\n#define LIB_OSS_AUTH_H\n\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_http_io.h\"\n#include \"oss_define.h\"\n\nOSS_CPP_START\n\n/**\n  * @brief  sign oss headers \n**/\nvoid oss_sign_headers(aos_pool_t *p, \n                      const aos_string_t *signstr, \n                      const aos_string_t *access_key_id,\n                      const aos_string_t *access_key_secret, \n                      aos_table_t *headers);\n\n/**\n  * @brief  get string to signature\n**/\nint oss_get_string_to_sign(aos_pool_t *p, \n                           http_method_e method, \n                           const aos_string_t *canon_res,\n                           const aos_table_t *headers, \n                           const aos_table_t *params, \n                           aos_string_t *signstr);\n\n/**\n  * @brief  get signed oss request headers\n**/\nint oss_get_signed_headers(aos_pool_t *p, const aos_string_t *access_key_id, \n                           const aos_string_t *access_key_secret,\n                           const aos_string_t* canon_res, aos_http_request_t *req);\n\n/**\n  * @brief  sign oss request\n**/\nint oss_sign_request(aos_http_request_t *req, const oss_config_t *config);\n\n/**\n  * @brief  generate oss request Signature\n**/\nint get_oss_request_signature(const oss_request_options_t *options, aos_http_request_t *req,\n        const aos_string_t *expires, aos_string_t *signature);\n\n/**\n  * @brief  get oss signed url\n**/\nint oss_get_signed_url(const oss_request_options_t *options, aos_http_request_t *req,\n        const aos_string_t *expires, aos_string_t *auth_url);\n\n/**\n  * @brief  get rtmp string to signature\n**/\nint oss_get_rtmp_string_to_sign(aos_pool_t *p, const aos_string_t *expires,\n    const aos_string_t *canon_res, const aos_table_t *params,\n    aos_string_t *signstr);\n\n/**\n  * @brief  generate oss rtmp request signature\n**/\nint get_oss_rtmp_request_signature(const oss_request_options_t *options, aos_http_request_t *req,\n    const aos_string_t *expires, aos_string_t *signature);\n\n/**\n  * @brief  get oss rtmp signed url\n**/\nint oss_get_rtmp_signed_url(const oss_request_options_t *options, aos_http_request_t *req,\n    const aos_string_t *expires, const aos_string_t *play_list_name, aos_table_t *params,\n    aos_string_t *signed_url);\n\nOSS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/oss_bucket.c",
    "content": "#include \"aos_log.h\"\r\n#include \"aos_define.h\"\r\n#include \"aos_util.h\"\r\n#include \"aos_string.h\"\r\n#include \"aos_status.h\"\r\n#include \"oss_auth.h\"\r\n#include \"oss_util.h\"\r\n#include \"oss_xml.h\"\r\n#include \"oss_api.h\"\r\n\r\nstatic aos_status_t *oss_create_bucket_with_params(const oss_request_options_t *options, \r\n                                                   const aos_string_t *bucket, \r\n                                                   oss_create_bucket_params_t *params, \r\n                                                   aos_table_t **resp_headers)\r\n{\r\n    const char *oss_acl_str = NULL;\r\n    const char *oss_storage_class_str = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_table_t *query_params = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 0);\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 1);\r\n    oss_acl_str = get_oss_acl_str(params->acl);\r\n    if (oss_acl_str) {\r\n        apr_table_set(headers, OSS_CANNONICALIZED_HEADER_ACL, oss_acl_str);\r\n    }\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_PUT, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    oss_storage_class_str = get_oss_storage_class_str(params->storage_class);\r\n    if (oss_storage_class_str != NULL) {\r\n        aos_list_t body;\r\n        build_bucket_storage_class(options->pool, params->storage_class, &body);\r\n        oss_write_request_body_from_buffer(&body, req); \r\n    }\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_create_bucket(const oss_request_options_t *options, \r\n                                const aos_string_t *bucket, \r\n                                oss_acl_e oss_acl, \r\n                                aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    oss_create_bucket_params_t params;\r\n    params.acl = oss_acl;\r\n    params.storage_class = OSS_STORAGE_CLASS_BUTT;\r\n    \r\n    s = oss_create_bucket_with_params(options, \r\n                                bucket, \r\n                                &params, \r\n                                resp_headers);\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_create_bucket_with_storage_class(const oss_request_options_t *options, \r\n                                const aos_string_t *bucket, \r\n                                oss_acl_e oss_acl, \r\n                                oss_storage_class_type_e storage_class, \r\n                                aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    oss_create_bucket_params_t params;\r\n    params.acl = oss_acl;\r\n    params.storage_class = storage_class;\r\n    \r\n    s = oss_create_bucket_with_params(options, \r\n                                bucket, \r\n                                &params, \r\n                                resp_headers);\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_delete_bucket(const oss_request_options_t *options,\r\n                                const aos_string_t *bucket, \r\n                                aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n    query_params = aos_table_create_if_null(options, query_params, 0);\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_DELETE, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_put_bucket_acl(const oss_request_options_t *options, \r\n                                 const aos_string_t *bucket, \r\n                                 oss_acl_e oss_acl,\r\n                                 aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n    const char *oss_acl_str = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_ACL, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 1);\r\n    oss_acl_str = get_oss_acl_str(oss_acl);\r\n    if (oss_acl_str) {\r\n        apr_table_set(headers, OSS_CANNONICALIZED_HEADER_ACL, oss_acl_str);\r\n    }\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_PUT, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;    \r\n}\r\n\r\naos_status_t *oss_get_bucket_acl(const oss_request_options_t *options, \r\n                                 const aos_string_t *bucket, \r\n                                 aos_string_t *oss_acl, \r\n                                 aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    int res;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_ACL, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_GET, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_acl_parse_from_body(options->pool, &resp->body, oss_acl);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_head_bucket(const oss_request_options_t *options, \r\n                              const aos_string_t *bucket, \r\n                              aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 0);\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_HEAD, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_bucket_location(const oss_request_options_t *options, \r\n                                      const aos_string_t *bucket, \r\n                                      aos_string_t *oss_location, \r\n                                      aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    int res;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_LOCATION, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_GET, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_location_parse_from_body(options->pool, &resp->body, oss_location);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_bucket_info(const oss_request_options_t *options, \r\n                                  const aos_string_t *bucket, \r\n                                  oss_bucket_info_t *bucket_info, \r\n                                  aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    int res;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_BUCKETINFO, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_GET, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_get_bucket_info_parse_from_body(options->pool, &resp->body, bucket_info);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_bucket_stat(const oss_request_options_t *options, \r\n                                  const aos_string_t *bucket, \r\n                                  oss_bucket_stat_t *bucket_stat, \r\n                                  aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    int res;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_BUCKETSTAT, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_GET, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_get_bucket_stat_parse_from_body(options->pool, &resp->body, bucket_stat);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_bucket_referer(const oss_request_options_t *options, \r\n                                     const aos_string_t *bucket, \r\n                                     oss_referer_config_t *referer_config, \r\n                                     aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    int res;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_REFERER, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_GET, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_get_bucket_referer_config_parse_from_body(options->pool, &resp->body, referer_config);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_put_bucket_storage_capacity(const oss_request_options_t *options, \r\n                                              const aos_string_t *bucket, \r\n                                              long storage_capacity, \r\n                                              aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_list_t body;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_addn(query_params, OSS_QOS, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_PUT, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    build_bucket_storage_capacity_body(options->pool, storage_capacity, &body);\r\n    oss_write_request_body_from_buffer(&body, req); \r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_bucket_storage_capacity(const oss_request_options_t *options, \r\n                                              const aos_string_t *bucket, \r\n                                              long *storage_capacity, \r\n                                              aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    int res;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_QOS, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_GET, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_storage_capacity_parse_from_body(options->pool, &resp->body, storage_capacity);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_list_object(const oss_request_options_t *options,\r\n                              const aos_string_t *bucket, \r\n                              oss_list_object_params_t *params, \r\n                              aos_table_t **resp_headers)\r\n{\r\n    int res;\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 4);\r\n    apr_table_add(query_params, OSS_PREFIX, params->prefix.data);\r\n    apr_table_add(query_params, OSS_DELIMITER, params->delimiter.data);\r\n    apr_table_add(query_params, OSS_MARKER, params->marker.data);\r\n    aos_table_add_int(query_params, OSS_MAX_KEYS, params->max_ret);\r\n    \r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_GET, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_list_objects_parse_from_body(options->pool, &resp->body, \r\n            &params->object_list, &params->common_prefix_list, \r\n            &params->next_marker, &params->truncated);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_list_bucket(const oss_request_options_t *options,\r\n                              oss_list_buckets_params_t *params, \r\n                              aos_table_t **resp_headers)\r\n{\r\n    int res;\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 3);\r\n    if (params->prefix.len) {\r\n        apr_table_add(query_params, OSS_PREFIX, params->prefix.data);\r\n    }\r\n\r\n    if (params->marker.len) {\r\n        apr_table_add(query_params, OSS_MARKER, params->marker.data);\r\n    }\r\n\r\n    if (params->max_keys) {\r\n        aos_table_add_int(query_params, OSS_MAX_KEYS, params->max_keys);\r\n    }\r\n    \r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_service_request(options, HTTP_GET, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_list_buckets_parse_from_body(options->pool, &resp->body, \r\n            params);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_put_bucket_logging(const oss_request_options_t *options,\r\n                                       const aos_string_t *bucket, \r\n                                       oss_logging_config_content_t *content, \r\n                                       aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    apr_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_list_t body;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_LOGGING, \"\");\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_PUT, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    build_bucket_logging_body(options->pool, content, &body);\r\n    oss_write_request_body_from_buffer(&body, req);\r\n    s = oss_process_request(options, req, resp);\r\n\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_bucket_logging(const oss_request_options_t *options, \r\n                                 const aos_string_t *bucket, \r\n                                 oss_logging_config_content_t *content, \r\n                                 aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    int res;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_LOGGING, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_GET, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_logging_parse_from_body(options->pool, &resp->body, content);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_delete_bucket_logging(const oss_request_options_t *options, \r\n                                 const aos_string_t *bucket, \r\n                                 aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_LOGGING, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_DELETE, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_put_bucket_lifecycle(const oss_request_options_t *options,\r\n                                       const aos_string_t *bucket, \r\n                                       aos_list_t *lifecycle_rule_list, \r\n                                       aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    apr_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_list_t body;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_LIFECYCLE, \"\");\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_PUT, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    build_lifecycle_body(options->pool, lifecycle_rule_list, &body);\r\n    oss_write_request_body_from_buffer(&body, req);\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_put_bucket_cors(const oss_request_options_t *options,\r\n                                  const aos_string_t *bucket, \r\n                                  aos_list_t *rule_list,\r\n                                  aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    apr_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_list_t body;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_CORS, \"\");\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_PUT, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    build_cors_rule_body(options->pool, rule_list, &body);\r\n    oss_write_request_body_from_buffer(&body, req);\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_bucket_cors(const oss_request_options_t *options, \r\n                                  const aos_string_t *bucket, \r\n                                  aos_list_t *rule_list, \r\n                                  aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    int res;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_CORS, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_GET, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_get_bucket_cors_parse_from_body(options->pool, &resp->body, rule_list);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_delete_bucket_cors(const oss_request_options_t *options, \r\n                                     const aos_string_t *bucket, \r\n                                     aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_CORS, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_DELETE, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_put_bucket_referer(const oss_request_options_t *options,\r\n                                     const aos_string_t *bucket, \r\n                                     oss_referer_config_t *referer_config,\r\n                                     aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    apr_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_list_t body;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_REFERER, \"\");\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_PUT, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    build_referer_config_body(options->pool, referer_config, &body);\r\n    oss_write_request_body_from_buffer(&body, req);\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_put_bucket_website(const oss_request_options_t *options,\r\n                                     const aos_string_t *bucket, \r\n                                     oss_website_config_t *website_config,\r\n                                     aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    apr_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_list_t body;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_WEBSITE, \"\");\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_PUT, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    build_website_config_body(options->pool, website_config, &body);\r\n    oss_write_request_body_from_buffer(&body, req);\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_bucket_website(const oss_request_options_t *options, \r\n                                     const aos_string_t *bucket, \r\n                                     oss_website_config_t *website_config, \r\n                                     aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    int res;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_WEBSITE, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_GET, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_get_bucket_website_parse_from_body(options->pool, &resp->body, website_config);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_delete_bucket_website(const oss_request_options_t *options, \r\n                                        const aos_string_t *bucket, \r\n                                        aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_WEBSITE, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);    \r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_DELETE, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_bucket_lifecycle(const oss_request_options_t *options,\r\n                                       const aos_string_t *bucket, \r\n                                       aos_list_t *lifecycle_rule_list, \r\n                                       aos_table_t **resp_headers)\r\n{\r\n    int res;\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_LIFECYCLE, \"\");\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_GET, &req, \r\n                            query_params, headers, &resp);\r\n    \r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_lifecycle_rules_parse_from_body(options->pool, \r\n            &resp->body, lifecycle_rule_list);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_delete_bucket_lifecycle(const oss_request_options_t *options,\r\n                                          const aos_string_t *bucket, \r\n                                          aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_LIFECYCLE, \"\");\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_DELETE, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_delete_objects(const oss_request_options_t *options,\r\n                                 const aos_string_t *bucket, \r\n                                 aos_list_t *object_list, \r\n                                 int is_quiet,\r\n                                 aos_table_t **resp_headers, \r\n                                 aos_list_t *deleted_object_list)\r\n{\r\n    int res;\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_list_t body;\r\n    unsigned char *md5 = NULL;\r\n    char *buf = NULL;\r\n    int64_t body_len;\r\n    char *b64_value = NULL;\r\n    int b64_buf_len = (20 + 1) * 4 / 3;\r\n    int b64_len;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_DELETE, \"\");\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 1);\r\n    apr_table_set(headers, OSS_CONTENT_TYPE, OSS_MULTIPART_CONTENT_TYPE);\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_POST, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    build_delete_objects_body(options->pool, object_list, is_quiet, &body);\r\n\r\n    //add Content-MD5\r\n    body_len = aos_buf_list_len(&body);\r\n    buf = aos_buf_list_content(options->pool, &body);\r\n    md5 = aos_md5(options->pool, buf, (apr_size_t)body_len);\r\n    b64_value = aos_pcalloc(options->pool, b64_buf_len);\r\n    b64_len = aos_base64_encode(md5, 20, b64_value);\r\n    b64_value[b64_len] = '\\0';\r\n    apr_table_addn(headers, OSS_CONTENT_MD5, b64_value);\r\n\r\n    oss_write_request_body_from_buffer(&body, req);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    if (is_quiet) {\r\n        return s;\r\n    }\r\n\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_delete_objects_parse_from_body(options->pool, &resp->body, \r\n                                             deleted_object_list);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_delete_objects_by_prefix(oss_request_options_t *options,\r\n                                           const aos_string_t *bucket, \r\n                                           const aos_string_t *prefix)\r\n{\r\n    aos_pool_t *subpool = NULL;\r\n    aos_pool_t *parent_pool = NULL;\r\n    int is_quiet = 1;\r\n    aos_status_t *s = NULL;\r\n    aos_status_t *ret = NULL;\r\n    oss_list_object_params_t *params = NULL;\r\n    int list_object_count = 0;\r\n    const char *next_marker = NULL;\r\n   \r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    parent_pool = options->pool;\r\n    params = oss_create_list_object_params(parent_pool);\r\n    if (prefix->data == NULL) {\r\n        aos_str_set(&params->prefix, \"\");\r\n    } else {\r\n        aos_str_set(&params->prefix, prefix->data);\r\n    }\r\n    while (params->truncated) {\r\n        aos_table_t *list_object_resp_headers = NULL;\r\n        aos_list_t object_list;\r\n        aos_list_t deleted_object_list;\r\n        oss_list_object_content_t *list_content = NULL;\r\n        aos_table_t *delete_objects_resp_headers = NULL;\r\n        char *key = NULL;\r\n\r\n        aos_pool_create(&subpool, parent_pool);\r\n        options->pool = subpool;\r\n        list_object_count = 0;\r\n        aos_list_init(&object_list);\r\n        s = oss_list_object(options, bucket, params, &list_object_resp_headers);\r\n        if (!aos_status_is_ok(s)) {\r\n            ret = aos_status_dup(parent_pool, s);\r\n            aos_pool_destroy(subpool);\r\n            options->pool = parent_pool;\r\n            return ret;\r\n        }\r\n\r\n        aos_list_for_each_entry(oss_list_object_content_t, list_content, &params->object_list, node) {\r\n            oss_object_key_t *object_key = oss_create_oss_object_key(parent_pool);\r\n            key = apr_psprintf(parent_pool, \"%.*s\", list_content->key.len, \r\n                               list_content->key.data);\r\n            aos_str_set(&object_key->key, key);\r\n            aos_list_add_tail(&object_key->node, &object_list);\r\n            list_object_count += 1;\r\n        }\r\n        if (list_object_count == 0)\r\n        {\r\n            ret = aos_status_dup(parent_pool, s);\r\n            aos_pool_destroy(subpool);\r\n            options->pool = parent_pool;\r\n            return ret;\r\n        }\r\n        // swap pool\r\n        if (params->next_marker.data != NULL) {\r\n            next_marker = apr_pstrdup(parent_pool, params->next_marker.data);\r\n            aos_str_set(&params->next_marker, next_marker);\r\n        }\r\n        aos_pool_destroy(subpool);\r\n\r\n        aos_list_init(&deleted_object_list);\r\n        aos_pool_create(&subpool, parent_pool);\r\n        options->pool = subpool;\r\n        s = oss_delete_objects(options, bucket, &object_list, is_quiet,\r\n                               &delete_objects_resp_headers, &deleted_object_list);\r\n        if (!aos_status_is_ok(s)) {\r\n            ret = aos_status_dup(parent_pool, s);\r\n            aos_pool_destroy(subpool);\r\n            options->pool = parent_pool;\r\n            return ret;\r\n        }\r\n        if (!params->truncated) {\r\n            ret = aos_status_dup(parent_pool, s);\r\n        }\r\n\r\n        aos_pool_destroy(subpool);\r\n\r\n        aos_list_init(&params->object_list);\r\n        if (params->next_marker.data) {\r\n            aos_str_set(&params->marker, params->next_marker.data);\r\n        }\r\n    }\r\n    options->pool = parent_pool;\r\n    return ret;\r\n}\r\n"
  },
  {
    "path": "oss_c_sdk/oss_define.c",
    "content": "#include \"oss_define.h\"\n\nconst char OSS_CANNONICALIZED_HEADER_PREFIX[] = \"x-oss-\";\nconst char OSS_CANNONICALIZED_HEADER_DATE[] = \"x-oss-date\";\nconst char OSS_CANNONICALIZED_HEADER_ACL[] = \"x-oss-acl\";\nconst char OSS_CANNONICALIZED_HEADER_STORAGE_CLASS[] = \"StorageClass\";\nconst char OSS_CANNONICALIZED_HEADER_COPY_SOURCE[] = \"x-oss-copy-source\";\nconst char OSS_CANNONICALIZED_HEADER_SYMLINK[] = \"x-oss-symlink-target\";\nconst char OSS_CANNONICALIZED_HEADER_REGION[] = \"x-oss-bucket-region\";\nconst char OSS_CANNONICALIZED_HEADER_OBJECT_ACL[] = \"x-oss-object-acl\";\nconst char OSS_CONTENT_MD5[] = \"Content-MD5\";\nconst char OSS_CONTENT_TYPE[] = \"Content-Type\";\nconst char OSS_CONTENT_LENGTH[] = \"Content-Length\";\nconst char OSS_DATE[] = \"Date\";\nconst char OSS_AUTHORIZATION[] = \"Authorization\";\nconst char OSS_ACCESSKEYID[] = \"OSSAccessKeyId\";\nconst char OSS_EXPECT[] = \"Expect\";\nconst char OSS_EXPIRES[] = \"Expires\";\nconst char OSS_SIGNATURE[] = \"Signature\";\nconst char OSS_ACL[] = \"acl\";\nconst char OSS_LOCATION[] = \"location\";\nconst char OSS_BUCKETINFO[] = \"bucketInfo\";\nconst char OSS_BUCKETSTAT[] = \"stat\";\nconst char OSS_RESTORE[] = \"restore\";\nconst char OSS_SYMLINK[] = \"symlink\";\nconst char OSS_QOS[] = \"qos\";\nconst char OSS_PREFIX[] = \"prefix\";\nconst char OSS_DELIMITER[] = \"delimiter\";\nconst char OSS_MARKER[] = \"marker\";\nconst char OSS_MAX_KEYS[] = \"max-keys\";\nconst char OSS_UPLOADS[] = \"uploads\";\nconst char OSS_UPLOAD_ID[] = \"uploadId\";\nconst char OSS_MAX_PARTS[] = \"max-parts\";\nconst char OSS_PART_NUMBER_MARKER[] = \"part-number-marker\";\nconst char OSS_KEY_MARKER[] = \"key-marker\";\nconst char OSS_UPLOAD_ID_MARKER[] = \"upload-id-marker\";\nconst char OSS_MAX_UPLOADS[] = \"max-uploads\";\nconst char OSS_PARTNUMBER[] = \"partNumber\";\nconst char OSS_APPEND[] = \"append\";\nconst char OSS_POSITION[] = \"position\";\nconst char OSS_MULTIPART_CONTENT_TYPE[] = \"application/x-www-form-urlencoded\";\nconst char OSS_COPY_SOURCE[] = \"x-oss-copy-source\";\nconst char OSS_COPY_SOURCE_RANGE[] = \"x-oss-copy-source-range\";\nconst char OSS_SECURITY_TOKEN[] = \"security-token\";\nconst char OSS_STS_SECURITY_TOKEN[] = \"x-oss-security-token\";\nconst char OSS_OBJECT_TYPE[] = \"x-oss-object-type\";\nconst char OSS_NEXT_APPEND_POSITION[] = \"x-oss-next-append-position\";\nconst char OSS_HASH_CRC64_ECMA[] = \"x-oss-hash-crc64ecma\";\nconst char OSS_CALLBACK[] = \"x-oss-callback\";\nconst char OSS_CALLBACK_VAR[] = \"x-oss-callback-var\";\nconst char OSS_PROCESS[] = \"x-oss-process\";\nconst char OSS_LIFECYCLE[] = \"lifecycle\";\nconst char OSS_REFERER[] = \"referer\";\nconst char OSS_CORS[] = \"cors\";\nconst char OSS_WEBSITE[] = \"website\";\nconst char OSS_LOGGING[] = \"logging\";\nconst char OSS_DELETE[] = \"delete\";\nconst char OSS_YES[] = \"yes\";\nconst char OSS_OBJECT_TYPE_NORMAL[] = \"Normal\";\nconst char OSS_OBJECT_TYPE_APPENDABLE[] = \"Appendable\";\nconst char OSS_LIVE_CHANNEL[] = \"live\";\nconst char OSS_LIVE_CHANNEL_STATUS[] = \"status\";\nconst char OSS_COMP[] = \"comp\";\nconst char OSS_LIVE_CHANNEL_STAT[] = \"stat\";\nconst char OSS_LIVE_CHANNEL_HISTORY[] = \"history\";\nconst char OSS_LIVE_CHANNEL_VOD[] = \"vod\";\nconst char OSS_LIVE_CHANNEL_START_TIME[] = \"startTime\";\nconst char OSS_LIVE_CHANNEL_END_TIME[] = \"endTime\";\nconst char OSS_PLAY_LIST_NAME[] = \"playlistName\";\nconst char LIVE_CHANNEL_STATUS_DISABLED[] = \"disabled\";\nconst char LIVE_CHANNEL_STATUS_ENABLED[] = \"enabled\";\nconst char LIVE_CHANNEL_STATUS_IDLE[] = \"idle\";\nconst char LIVE_CHANNEL_STATUS_LIVE[] = \"live\";\nconst char LIVE_CHANNEL_DEFAULT_TYPE[] = \"HLS\";\nconst char LIVE_CHANNEL_DEFAULT_PLAYLIST[] = \"playlist.m3u8\";\nconst int  LIVE_CHANNEL_DEFAULT_FRAG_DURATION = 5;\nconst int  LIVE_CHANNEL_DEFAULT_FRAG_COUNT = 3;\nconst int OSS_MAX_PART_NUM = 10000;\nconst int OSS_PER_RET_NUM = 1000;\nconst int MAX_SUFFIX_LEN = 1024;\nconst char OSS_OBJECT_META[] = \"objectMeta\";\nconst char OSS_SELECT_OBJECT_OUTPUT_RAW[] = \"x-oss-select-output-raw\";\nconst char OSS_TAGGING[] = \"tagging\";\nconst char OSS_SIGN_ORIGIN_ONLY[] = \"x-oss-sign-origin-only\";\nconst char OSS_CONTENT_SHA256[] = \"x-oss-content-sha256\";\nconst char OSS_SECURITY_TOKEN_V4[] = \"x-oss-security-token\";\nconst char OSS_SIGNATURE_VERSION[] = \"x-oss-signature-version\";\nconst char OSS_CREDENTIAL[] = \"x-oss-credential\";\nconst char OSS_EXPIRES_V4[] = \"x-oss-expires\";\nconst char OSS_SIGNATURE_V4[] = \"x-oss-signature\";\n"
  },
  {
    "path": "oss_c_sdk/oss_define.h",
    "content": "#ifndef LIBOSS_DEFINE_H\n#define LIBOSS_DEFINE_H\n\n#include \"aos_string.h\"\n#include \"aos_list.h\"\n#include \"aos_transport.h\"\n\n#ifdef __cplusplus\n# define OSS_CPP_START extern \"C\" {\n# define OSS_CPP_END }\n#else\n# define OSS_CPP_START\n# define OSS_CPP_END\n#endif\n\n#define aos_xml_error_status_set(STATUS, RES) do {                   \\\n        aos_status_set(STATUS, RES, AOS_XML_PARSE_ERROR_CODE, NULL); \\\n    } while(0)\n\n#define aos_file_error_status_set(STATUS, RES) do {                   \\\n        aos_status_set(STATUS, RES, AOS_OPEN_FILE_ERROR_CODE, NULL); \\\n    } while(0)\n\n#define aos_inconsistent_error_status_set(STATUS, RES) do {                     \\\n        aos_status_set(STATUS, RES, AOS_INCONSISTENT_ERROR_CODE, NULL); \\\n    } while(0)\n\n#define PARAM_OUT\n#define PARAM_IN\n#define OSS_INVALID_VALUE  -1\n\nextern const char OSS_CANNONICALIZED_HEADER_ACL[];\nextern const char OSS_CANNONICALIZED_HEADER_STORAGE_CLASS[];\nextern const char OSS_CANNONICALIZED_HEADER_SOURCE[];\nextern const char OSS_CANNONICALIZED_HEADER_PREFIX[];\nextern const char OSS_CANNONICALIZED_HEADER_DATE[];\nextern const char OSS_CANNONICALIZED_HEADER_COPY_SOURCE[];\nextern const char OSS_CANNONICALIZED_HEADER_SYMLINK[];\nextern const char OSS_CANNONICALIZED_HEADER_OBJECT[];\nextern const char OSS_CANNONICALIZED_HEADER_REGION[];\nextern const char OSS_CANNONICALIZED_HEADER_OBJECT_ACL[];\nextern const char OSS_CONTENT_MD5[];\nextern const char OSS_CONTENT_TYPE[];\nextern const char OSS_CONTENT_LENGTH[];\nextern const char OSS_DATE[];\nextern const char OSS_AUTHORIZATION[];\nextern const char OSS_ACCESSKEYID[];\nextern const char OSS_EXPECT[];\nextern const char OSS_EXPIRES[];\nextern const char OSS_SIGNATURE[];\nextern const char OSS_ACL[];\nextern const char OSS_LOCATION[];\nextern const char OSS_BUCKETINFO[];\nextern const char OSS_BUCKETSTAT[];\nextern const char OSS_RESTORE[];\nextern const char OSS_SYMLINK[];\nextern const char OSS_QOS[];\nextern const char OSS_LOGGING[];\nextern const char OSS_PREFIX[];\nextern const char OSS_DELIMITER[];\nextern const char OSS_MARKER[];\nextern const char OSS_MAX_KEYS[];\nextern const char OSS_UPLOADS[];\nextern const char OSS_UPLOAD_ID[];\nextern const char OSS_MAX_PARTS[];\nextern const char OSS_KEY_MARKER[];\nextern const char OSS_UPLOAD_ID_MARKER[];\nextern const char OSS_MAX_UPLOADS[];\nextern const char OSS_PARTNUMBER[];\nextern const char OSS_PART_NUMBER_MARKER[];\nextern const char OSS_APPEND[];\nextern const char OSS_POSITION[];\nextern const char OSS_MULTIPART_CONTENT_TYPE[];\nextern const char OSS_COPY_SOURCE[];\nextern const char OSS_COPY_SOURCE_RANGE[];\nextern const char OSS_SECURITY_TOKEN[];\nextern const char OSS_STS_SECURITY_TOKEN[];\nextern const char OSS_OBJECT_TYPE[];\nextern const char OSS_NEXT_APPEND_POSITION[];\nextern const char OSS_HASH_CRC64_ECMA[];\nextern const char OSS_CALLBACK[];\nextern const char OSS_CALLBACK_VAR[];\nextern const char OSS_PROCESS[];\nextern const char OSS_LIFECYCLE[];\nextern const char OSS_REFERER[];\nextern const char OSS_CORS[];\nextern const char OSS_WEBSITE[];\nextern const char OSS_DELETE[];\nextern const char OSS_YES[];\nextern const char OSS_OBJECT_TYPE_NORMAL[];\nextern const char OSS_OBJECT_TYPE_APPENDABLE[];\nextern const char OSS_LIVE_CHANNEL[];\nextern const char OSS_LIVE_CHANNEL_STATUS[];\nextern const char OSS_COMP[];\nextern const char OSS_LIVE_CHANNEL_STAT[];\nextern const char OSS_LIVE_CHANNEL_HISTORY[];\nextern const char OSS_LIVE_CHANNEL_VOD[];\nextern const char OSS_LIVE_CHANNEL_START_TIME[];\nextern const char OSS_LIVE_CHANNEL_END_TIME[];\nextern const char OSS_PLAY_LIST_NAME[];\nextern const char LIVE_CHANNEL_STATUS_DISABLED[];\nextern const char LIVE_CHANNEL_STATUS_ENABLED[];\nextern const char LIVE_CHANNEL_STATUS_IDLE[];\nextern const char LIVE_CHANNEL_STATUS_LIVE[];\nextern const char LIVE_CHANNEL_DEFAULT_TYPE[];\nextern const char LIVE_CHANNEL_DEFAULT_PLAYLIST[];\nextern const int  LIVE_CHANNEL_DEFAULT_FRAG_DURATION;\nextern const int  LIVE_CHANNEL_DEFAULT_FRAG_COUNT;\nextern const int OSS_MAX_PART_NUM;\nextern const int OSS_PER_RET_NUM;\nextern const int MAX_SUFFIX_LEN;\nextern const char OSS_OBJECT_META[];\nextern const char OSS_SELECT_OBJECT_OUTPUT_RAW[];\nextern const char OSS_TAGGING[];\nextern const char OSS_SIGN_ORIGIN_ONLY[];\nextern const char OSS_CONTENT_SHA256[];\nextern const char OSS_SECURITY_TOKEN_V4[];\nextern const char OSS_SIGNATURE_VERSION[];\nextern const char OSS_CREDENTIAL[];\nextern const char OSS_EXPIRES_V4[];\nextern const char OSS_SIGNATURE_V4[];\n\ntypedef struct oss_lib_curl_initializer_s oss_lib_curl_initializer_t;\n\n/**\n * oss_acl is an ACL that can be specified when an object is created or\n * updated.  Each canned ACL has a predefined value when expanded to a full\n * set of OSS ACL Grants.\n * Private canned ACL gives the owner FULL_CONTROL and no other permissions\n *     are issued\n * Public Read canned ACL gives the owner FULL_CONTROL and all users Read\n *     permission \n * Public Read Write canned ACL gives the owner FULL_CONTROL and all users\n *     Read and Write permission\n * Default Inherit the ACL of the bucket in which the object is, only the \n *     objects has this acl \n **/\ntypedef enum {\n    OSS_ACL_PRIVATE                  = 0,   /*< private */\n    OSS_ACL_PUBLIC_READ              = 1,   /*< public read */\n    OSS_ACL_PUBLIC_READ_WRITE        = 2,   /*< public read write */\n    OSS_ACL_DEFAULT                  = 3    /*< default */\n} oss_acl_e;\n\ntypedef enum {\n    OSS_STORAGE_CLASS_STANDARD         = 0,  /*< standard */\n    OSS_STORAGE_CLASS_IA               = 1,  /*< IA */\n    OSS_STORAGE_CLASS_ARCHIVE          = 2,  /*< archive */\n    OSS_STORAGE_CLASS_BUTT             = 3,  \n    OSS_STORAGE_CLASS_COLD_ARCHIVE     = 4,  /*< cold archive */\n} oss_storage_class_type_e;\n\ntypedef enum {\n    OSS_TIER_EXPEDITED                = 0,  /*< Expedited */\n    OSS_TIER_STANDARD                 = 1,  /*< Standard */\n    OSS_TIER_BULK                     = 2,  /*< Bulk */\n} oss_tier_type_e;\n\ntypedef struct {\n    aos_string_t endpoint;\n    aos_string_t access_key_id;\n    aos_string_t access_key_secret;\n    aos_string_t sts_token;\n    int is_cname;\n    aos_string_t proxy_host;\n    int proxy_port;\n    aos_string_t proxy_user;\n    aos_string_t proxy_passwd;\n    int signature_version;\n    aos_string_t region;\n    aos_string_t cloudbox_id;\n} oss_config_t;\n\ntypedef struct {\n    oss_acl_e acl;\n    oss_storage_class_type_e storage_class;\n} oss_create_bucket_params_t;\n\ntypedef struct {\n    oss_config_t *config;\n    aos_http_controller_t *ctl; /*< aos http controller, more see aos_transport.h */\n    aos_pool_t *pool;\n} oss_request_options_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t key;\n    aos_string_t last_modified;\n    aos_string_t etag;\n    aos_string_t size;\n    aos_string_t owner_id;\n    aos_string_t owner_display_name;\n    aos_string_t storage_class;\n    aos_string_t type;\n} oss_list_object_content_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t create_date;\n    aos_string_t extranet_endpoint;\n    aos_string_t intranet_endpoint;\n    aos_string_t location;\n    aos_string_t name;\n    aos_string_t storage_class;\n} oss_list_bucket_content_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t prefix;\n} oss_list_object_common_prefix_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t key;\n    aos_string_t upload_id;\n    aos_string_t initiated;\n} oss_list_multipart_upload_content_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t part_number;\n    aos_string_t size;\n    aos_string_t etag;\n    aos_string_t last_modified;\n} oss_list_part_content_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t part_number;\n    aos_string_t etag;\n} oss_complete_part_content_t;\n\ntypedef struct {\n    int part_num;\n    char *etag;\n} oss_upload_part_t;\n\ntypedef struct {\n    aos_string_t prefix;\n    aos_string_t marker;\n    aos_string_t delimiter;\n    int max_ret;\n    int truncated;\n    aos_string_t next_marker;\n    aos_list_t object_list;\n    aos_list_t common_prefix_list;\n} oss_list_object_params_t;\n\ntypedef struct {\n    PARAM_IN aos_string_t prefix;\n    PARAM_IN aos_string_t marker;\n    PARAM_IN int max_keys;\n    PARAM_OUT int truncated;\n    PARAM_OUT aos_string_t next_marker;\n    PARAM_OUT aos_string_t owner_id;\n    PARAM_OUT aos_string_t owner_name;\n    PARAM_OUT aos_list_t bucket_list;\n} oss_list_buckets_params_t;\n\ntypedef struct {\n    aos_string_t part_number_marker;\n    int max_ret;\n    int truncated;\n    aos_string_t next_part_number_marker;\n    aos_list_t part_list;\n} oss_list_upload_part_params_t;\n\ntypedef struct {\n    aos_string_t prefix;\n    aos_string_t key_marker;\n    aos_string_t upload_id_marker;\n    aos_string_t delimiter;\n    int max_ret;\n    int truncated;\n    aos_string_t next_key_marker;\n    aos_string_t next_upload_id_marker;\n    aos_list_t upload_list;\n} oss_list_multipart_upload_params_t;\n\ntypedef struct {\n    aos_string_t source_bucket;\n    aos_string_t source_object;\n    aos_string_t dest_bucket;\n    aos_string_t dest_object;\n    aos_string_t upload_id;\n    int part_num;\n    int64_t range_start;\n    int64_t range_end;\n} oss_upload_part_copy_params_t;\n\ntypedef struct {\n    aos_string_t filename;  /**< file range read filename */\n    int64_t file_pos;   /**< file range read start position */\n    int64_t file_last;  /**< file range read last position */\n} oss_upload_file_t;\n\ntypedef struct {\n    int days;\n    aos_string_t created_before_date;\n} oss_lifecycle_rule_date_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t id;\n    aos_string_t prefix;\n    aos_string_t status;\n    int days;\n    aos_string_t date;\n    aos_string_t created_before_date;\n    oss_lifecycle_rule_date_t abort_multipart_upload_dt;\n    aos_list_t tag_list;\n} oss_lifecycle_rule_content_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t rule;\n} oss_sub_cors_rule_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_list_t allowed_origin_list;\n    aos_list_t allowed_method_list;\n    aos_list_t allowed_head_list;\n    aos_list_t expose_head_list;\n    int max_age_seconds;     // INT_MAX means no value\n} oss_cors_rule_t;\n\ntypedef struct {\n    aos_list_t   node;\n    aos_string_t referer;\n} oss_referer_t;\n\ntypedef struct {\n    aos_list_t   referer_list;\n    int allow_empty_referer;\n} oss_referer_config_t;\n\ntypedef struct {\n    aos_string_t suffix_str;\n    aos_string_t key_str;\n} oss_website_config_t;\n\ntypedef struct {\n    aos_list_t   node;\n    aos_string_t target_bucket;\n    aos_string_t prefix;\n    int logging_enabled;\n} oss_logging_config_content_t;\n\ntypedef struct {\n    aos_string_t created_date;\n    aos_string_t extranet_endpoint;\n    aos_string_t intranet_endpoint;\n    aos_string_t location;\n    aos_string_t owner_id;\n    aos_string_t owner_name;\n    aos_string_t acl;\n    aos_string_t storage_class;\n} oss_bucket_info_t;\n\ntypedef struct {\n    uint64_t storage_in_bytes;\n    uint64_t object_count;\n    uint64_t multipart_upload_count;\n} oss_bucket_stat_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t key;\n} oss_object_key_t;\n\ntypedef struct {\n    char *suffix;\n    char *type;\n} oss_content_type_t;\n\ntypedef struct {\n    int64_t  part_size;  // bytes, default 1MB\n    int32_t  thread_num;  // default 1\n    int      enable_checkpoint; // default disable, false\n    aos_string_t checkpoint_path;  // dafault ./filepath.ucp or ./filepath.dcp\n} oss_resumable_clt_params_t;\n\ntypedef struct {\n    aos_string_t type;\n    int32_t frag_duration; \n    int32_t frag_count;\n    aos_string_t play_list_name;\n}oss_live_channel_target_t;\n\ntypedef struct {\n    aos_string_t name;\n    aos_string_t description;\n    aos_string_t status;\n    oss_live_channel_target_t target;\n} oss_live_channel_configuration_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t publish_url;\n} oss_live_channel_publish_url_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t play_url;\n} oss_live_channel_play_url_t;\n\ntypedef struct {\n    int32_t width;\n    int32_t height;\n    int32_t frame_rate;\n    int32_t band_width;\n    aos_string_t codec;\n} oss_video_stat_t;\n\ntypedef struct {\n    int32_t band_width;\n    int32_t sample_rate;\n    aos_string_t codec;\n} oss_audio_stat_t;\n\ntypedef struct {\n    aos_string_t pushflow_status;\n    aos_string_t connected_time;\n    aos_string_t remote_addr;\n    oss_video_stat_t video_stat;\n    oss_audio_stat_t audio_stat;\n} oss_live_channel_stat_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t name;\n    aos_string_t description;\n    aos_string_t status;\n    aos_string_t last_modified;\n    aos_list_t publish_url_list;\n    aos_list_t play_url_list;\n} oss_live_channel_content_t;\n\ntypedef struct {\n    aos_string_t prefix;\n    aos_string_t marker;\n    int max_keys;\n    int truncated;\n    aos_string_t next_marker;\n    aos_list_t live_channel_list;\n} oss_list_live_channel_params_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t start_time;\n    aos_string_t end_time;\n    aos_string_t remote_addr;\n} oss_live_record_content_t;\n\ntypedef struct {\n    aos_string_t compression_type;\n    aos_string_t file_header_info;\n    aos_string_t record_delimiter;\n    aos_string_t field_delimiter;\n    aos_string_t quote_character;\n    aos_string_t comment_character;\n    aos_string_t range;\n} oss_select_object_input_param_t;\n\ntypedef struct {\n    aos_string_t record_delimiter;\n    aos_string_t field_delimiter;\n    int32_t      keep_all_columns;\n    int32_t      output_rawdata;\n    int32_t      enable_payload_crc;\n    int32_t      output_header;\n} oss_select_object_output_param_t;\n\ntypedef struct {\n    int32_t skip_partial_data_record;\n} oss_select_object_option_param_t;\n\ntypedef struct {\n    oss_select_object_input_param_t  input_param;\n    oss_select_object_output_param_t output_param;\n    oss_select_object_option_param_t option_param;\n} oss_select_object_params_t;\n\ntypedef struct {\n    PARAM_IN aos_string_t compression_type;\n    PARAM_IN aos_string_t record_delimiter;\n    PARAM_IN aos_string_t field_delimiter;\n    PARAM_IN aos_string_t quote_character;\n    PARAM_IN int32_t      over_write_if_existing;\n    PARAM_OUT uint32_t splits_count;\n    PARAM_OUT uint64_t rows_count;\n    PARAM_OUT uint32_t columns_count;\n} oss_select_object_meta_params_t;\n\ntypedef struct {\n    aos_list_t node;\n    aos_string_t key;\n    aos_string_t value;\n} oss_tag_content_t;\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/oss_live.c",
    "content": "#include \"aos_log.h\"\r\n#include \"aos_define.h\"\r\n#include \"aos_util.h\"\r\n#include \"aos_string.h\"\r\n#include \"aos_status.h\"\r\n#include \"oss_auth.h\"\r\n#include \"oss_util.h\"\r\n#include \"oss_xml.h\"\r\n#include \"oss_api.h\"\r\n\r\n\r\naos_status_t *oss_create_live_channel(const oss_request_options_t *options,\r\n                                      const aos_string_t *bucket,\r\n                                      oss_live_channel_configuration_t *config,\r\n                                      aos_list_t *publish_url_list,\r\n                                      aos_list_t *play_url_list,\r\n                                      aos_table_t **resp_headers)\r\n{\r\n    int res = AOSE_OK;\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_list_t body;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_LIVE_CHANNEL, \"\");\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_live_channel_request(options, bucket, &config->name, HTTP_PUT,\r\n                            &req, query_params, headers, &resp);\r\n\r\n    // build body\r\n    build_create_live_channel_body(options->pool, config, &body);\r\n    oss_write_request_body_from_buffer(&body, req);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    // parse result\r\n    res = oss_create_live_channel_parse_from_body(options->pool, &resp->body, \r\n        publish_url_list, play_url_list);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n\r\n}\r\n\r\naos_status_t *oss_put_live_channel_status(const oss_request_options_t *options,\r\n                                          const aos_string_t *bucket,\r\n                                          const aos_string_t *live_channel,\r\n                                          const aos_string_t *live_channel_status,\r\n                                          aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init params\r\n    query_params = aos_table_create_if_null(options, query_params, 2);\r\n    apr_table_add(query_params, OSS_LIVE_CHANNEL, \"\");\r\n    apr_table_add(query_params, OSS_LIVE_CHANNEL_STATUS, live_channel_status->data);\r\n    \r\n    //init headers, forbid 'Expect' and 'Transfer-Encoding' of HTTP\r\n    headers = aos_table_create_if_null(options, headers, 2);\r\n\tapr_table_set(headers, \"Expect\", \"\");\r\n\tapr_table_set(headers, \"Transfer-Encoding\", \"\");\r\n\r\n    oss_init_live_channel_request(options, bucket, live_channel, HTTP_PUT,\r\n                            &req, query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    \r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_live_channel_info(const oss_request_options_t *options,\r\n                                        const aos_string_t *bucket,\r\n                                        const aos_string_t *live_channel,\r\n                                        oss_live_channel_configuration_t *info,\r\n                                        aos_table_t **resp_headers)\r\n{\r\n    int res = AOSE_OK;\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_LIVE_CHANNEL, \"\");\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_live_channel_request(options, bucket, live_channel, HTTP_GET,\r\n                            &req, query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    // parse result\r\n    res = oss_live_channel_info_parse_from_body(options->pool, &resp->body, info);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n    aos_str_set(&info->name, aos_pstrdup(options->pool, live_channel));\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_live_channel_stat(const oss_request_options_t *options,\r\n                                        const aos_string_t *bucket,\r\n                                        const aos_string_t *live_channel,\r\n                                        oss_live_channel_stat_t *stat,\r\n                                        aos_table_t **resp_headers)\r\n{\r\n    int res = AOSE_OK;\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init params\r\n    query_params = aos_table_create_if_null(options, query_params, 2);\r\n    apr_table_add(query_params, OSS_LIVE_CHANNEL, \"\");\r\n    apr_table_add(query_params, OSS_COMP, OSS_LIVE_CHANNEL_STAT);\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_live_channel_request(options, bucket, live_channel, HTTP_GET,\r\n                            &req, query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    // parse result\r\n    res = oss_live_channel_stat_parse_from_body(options->pool, &resp->body, stat);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_delete_live_channel(const oss_request_options_t *options,\r\n                                      const aos_string_t *bucket,\r\n                                      const aos_string_t *live_channel,\r\n                                      aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_LIVE_CHANNEL, \"\");\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_live_channel_request(options, bucket, live_channel, HTTP_DELETE,\r\n                            &req, query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_list_live_channel(const oss_request_options_t *options,\r\n                                    const aos_string_t *bucket,\r\n                                    oss_list_live_channel_params_t *params,\r\n                                    aos_table_t **resp_headers)\r\n{\r\n    int res = AOSE_OK;\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init params\r\n    query_params = aos_table_create_if_null(options, query_params, 4);\r\n    apr_table_add(query_params, OSS_LIVE_CHANNEL, \"\");\r\n    apr_table_add(query_params, OSS_PREFIX, params->prefix.data);\r\n    apr_table_add(query_params, OSS_MARKER, params->marker.data);\r\n    aos_table_add_int(query_params, OSS_MAX_KEYS, params->max_keys);\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_GET, &req,\r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    // parse result\r\n    res = oss_list_live_channel_parse_from_body(options->pool, &resp->body,\r\n        &params->live_channel_list, &params->next_marker, &params->truncated);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_live_channel_history(const oss_request_options_t *options,\r\n                                           const aos_string_t *bucket,\r\n                                           const aos_string_t *live_channel,\r\n                                           aos_list_t *live_record_list,\r\n                                           aos_table_t **resp_headers)\r\n{\r\n    int res = AOSE_OK;\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init params\r\n    query_params = aos_table_create_if_null(options, query_params, 2);\r\n    apr_table_add(query_params, OSS_LIVE_CHANNEL, \"\");\r\n    apr_table_add(query_params, OSS_COMP, OSS_LIVE_CHANNEL_HISTORY);\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_live_channel_request(options, bucket, live_channel, HTTP_GET,\r\n                            &req, query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    // parse result\r\n    res = oss_live_channel_history_parse_from_body(options->pool, &resp->body, live_record_list);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_gen_vod_play_list(const oss_request_options_t *options,\r\n                                     const aos_string_t *bucket,\r\n                                     const aos_string_t *live_channel,\r\n                                     const aos_string_t *play_list_name,\r\n                                     const int64_t start_time,\r\n                                     const int64_t end_time,\r\n                                     aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n    char *resource = NULL;\r\n    aos_string_t resource_str;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init params\r\n    query_params = aos_table_create_if_null(options, query_params, 3);\r\n    apr_table_add(query_params, OSS_LIVE_CHANNEL_VOD, \"\");\r\n    apr_table_add(query_params, OSS_LIVE_CHANNEL_START_TIME,\r\n        apr_psprintf(options->pool, \"%\" APR_INT64_T_FMT, start_time));\r\n    apr_table_add(query_params, OSS_LIVE_CHANNEL_END_TIME,\r\n        apr_psprintf(options->pool, \"%\" APR_INT64_T_FMT, end_time));\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 1);\r\n    apr_table_set(headers, OSS_CONTENT_TYPE, OSS_MULTIPART_CONTENT_TYPE);\r\n\r\n    resource = apr_psprintf(options->pool, \"%s/%s\", live_channel->data, play_list_name->data);\r\n    aos_str_set(&resource_str, resource);\r\n\r\n    oss_init_live_channel_request(options, bucket, &resource_str, HTTP_POST,\r\n                            &req, query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\nchar *oss_gen_rtmp_signed_url(const oss_request_options_t *options,\r\n                              const aos_string_t *bucket,\r\n                              const aos_string_t *live_channel,\r\n                              const aos_string_t *play_list_name,\r\n                              const int64_t expires)\r\n{\r\n    aos_string_t signed_url;\r\n    char *expires_str = NULL;\r\n    aos_string_t expires_time;\r\n    int res = AOSE_OK;\r\n    aos_http_request_t *req = NULL;\r\n    aos_table_t *params = NULL;\r\n\r\n    expires_str = apr_psprintf(options->pool, \"%\" APR_INT64_T_FMT, expires);\r\n    aos_str_set(&expires_time, expires_str);\r\n    req = aos_http_request_create(options->pool);\r\n    oss_get_rtmp_uri(options, bucket, live_channel, req);\r\n    res = oss_get_rtmp_signed_url(options, req, &expires_time, play_list_name,\r\n        params, &signed_url);\r\n    if (res != AOSE_OK) {\r\n        return NULL;\r\n    }\r\n    return signed_url.data;\r\n}\r\n"
  },
  {
    "path": "oss_c_sdk/oss_multipart.c",
    "content": "#include \"aos_log.h\"\r\n#include \"aos_define.h\"\r\n#include \"aos_util.h\"\r\n#include \"aos_string.h\"\r\n#include \"aos_status.h\"\r\n#include \"oss_auth.h\"\r\n#include \"oss_util.h\"\r\n#include \"oss_xml.h\"\r\n#include \"oss_api.h\"\r\n\r\naos_status_t *oss_init_multipart_upload(const oss_request_options_t *options, \r\n                                        const aos_string_t *bucket, \r\n                                        const aos_string_t *object, \r\n                                        aos_string_t *upload_id, \r\n                                        aos_table_t *headers,\r\n                                        aos_table_t **resp_headers)\r\n{\r\n    int res = AOSE_OK;\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_UPLOADS, \"\");\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 1);\r\n    set_content_type(NULL, object->data, headers);\r\n\r\n    oss_init_object_request(options, bucket, object, HTTP_POST, \r\n                            &req, query_params, headers, NULL, 0, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_upload_id_parse_from_body(options->pool, &resp->body, upload_id);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_abort_multipart_upload(const oss_request_options_t *options,\r\n                                         const aos_string_t *bucket, \r\n                                         const aos_string_t *object, \r\n                                         aos_string_t *upload_id, \r\n                                         aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_UPLOAD_ID, upload_id->data);\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_object_request(options, bucket, object, HTTP_DELETE, \r\n                            &req, query_params, headers, NULL, 0, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_list_upload_part(const oss_request_options_t *options,\r\n                                   const aos_string_t *bucket, \r\n                                   const aos_string_t *object, \r\n                                   const aos_string_t *upload_id, \r\n                                   oss_list_upload_part_params_t *params,\r\n                                   aos_table_t **resp_headers)\r\n{\r\n    int res = AOSE_OK;\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 3);\r\n    apr_table_add(query_params, OSS_UPLOAD_ID, upload_id->data);\r\n    aos_table_add_int(query_params, OSS_MAX_PARTS, params->max_ret);\r\n    apr_table_add(query_params, OSS_PART_NUMBER_MARKER, \r\n                  params->part_number_marker.data);\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_object_request(options, bucket, object, HTTP_GET, \r\n                            &req, query_params, headers, NULL, 0, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_list_parts_parse_from_body(options->pool, &resp->body,\r\n            &params->part_list, &params->next_part_number_marker,\r\n            &params->truncated);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_list_multipart_upload(const oss_request_options_t *options,\r\n                                        const aos_string_t *bucket, \r\n                                        oss_list_multipart_upload_params_t *params, \r\n                                        aos_table_t **resp_headers)\r\n{\r\n    int res = AOSE_OK;\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 6);\r\n    apr_table_add(query_params, OSS_UPLOADS, \"\");\r\n    apr_table_add(query_params, OSS_PREFIX, params->prefix.data);\r\n    apr_table_add(query_params, OSS_DELIMITER, params->delimiter.data);\r\n    apr_table_add(query_params, OSS_KEY_MARKER, params->key_marker.data);\r\n    apr_table_add(query_params, OSS_UPLOAD_ID_MARKER, params->upload_id_marker.data);\r\n    aos_table_add_int(query_params, OSS_MAX_UPLOADS, params->max_ret);\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_bucket_request(options, bucket, HTTP_GET, &req, \r\n                            query_params, headers, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_list_multipart_uploads_parse_from_body(options->pool, &resp->body, \r\n            &params->upload_list, &params->next_key_marker, \r\n            &params->next_upload_id_marker, &params->truncated);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_complete_multipart_upload(const oss_request_options_t *options,\r\n                                            const aos_string_t *bucket, \r\n                                            const aos_string_t *object, \r\n                                            const aos_string_t *upload_id, \r\n                                            aos_list_t *part_list, \r\n                                            aos_table_t *headers,\r\n                                            aos_table_t **resp_headers)\r\n{\r\n    return oss_do_complete_multipart_upload(options, bucket, object, upload_id, part_list,\r\n                                            headers, NULL, resp_headers, NULL);\r\n}\r\n\r\naos_status_t *oss_do_complete_multipart_upload(const oss_request_options_t *options, \r\n                                               const aos_string_t *bucket, \r\n                                               const aos_string_t *object, \r\n                                               const aos_string_t *upload_id, \r\n                                               aos_list_t *part_list, \r\n                                               aos_table_t *headers,\r\n                                               aos_table_t *params,\r\n                                               aos_table_t **resp_headers,\r\n                                               aos_list_t *resp_body)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    apr_table_t *query_params = NULL;\r\n    aos_list_t body;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, params, 1);\r\n    apr_table_add(query_params, OSS_UPLOAD_ID, upload_id->data);\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 1);\r\n    apr_table_set(headers, OSS_CONTENT_TYPE, OSS_MULTIPART_CONTENT_TYPE);\r\n\r\n    oss_init_object_request(options, bucket, object, HTTP_POST, \r\n                            &req, query_params, headers, NULL, 0, &resp);\r\n\r\n    build_complete_multipart_upload_body(options->pool, part_list, &body);\r\n    oss_write_request_body_from_buffer(&body, req);\r\n\r\n    s = oss_process_request(options, req, resp); \r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    oss_fill_read_response_body(resp, resp_body);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_upload_part_from_buffer(const oss_request_options_t *options,\r\n                                          const aos_string_t *bucket, \r\n                                          const aos_string_t *object, \r\n                                          const aos_string_t *upload_id, \r\n                                          int part_num, \r\n                                          aos_list_t *buffer, \r\n                                          aos_table_t **resp_headers)\r\n{\r\n    return oss_do_upload_part_from_buffer(options, bucket, object, upload_id, part_num, \r\n                                          buffer, NULL, NULL, NULL, resp_headers, NULL);\r\n}\r\n\r\naos_status_t *oss_do_upload_part_from_buffer(const oss_request_options_t *options, \r\n                                             const aos_string_t *bucket, \r\n                                             const aos_string_t *object, \r\n                                             const aos_string_t *upload_id,\r\n                                             int part_num, \r\n                                             aos_list_t *buffer, \r\n                                             oss_progress_callback progress_callback,\r\n                                             aos_table_t *headers, \r\n                                             aos_table_t *params,\r\n                                             aos_table_t **resp_headers,\r\n                                             aos_list_t *resp_body)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, params, 2);\r\n    apr_table_add(query_params, OSS_UPLOAD_ID, upload_id->data);\r\n    aos_table_add_int(query_params, OSS_PARTNUMBER, part_num);\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_object_request(options, bucket, object, HTTP_PUT, &req, query_params, \r\n                            headers, progress_callback, 0, &resp);\r\n\r\n    oss_write_request_body_from_buffer(buffer, req);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    oss_fill_read_response_body(resp, resp_body);\r\n\r\n    if (is_enable_crc(options) && has_crc_in_response(resp)) {\r\n        oss_check_crc_consistent(req->crc64, resp->headers, s);\r\n    }\r\n\r\n    return s; \r\n}\r\n\r\naos_status_t *oss_upload_part_from_file(const oss_request_options_t *options,\r\n                                        const aos_string_t *bucket, \r\n                                        const aos_string_t *object,\r\n                                        const aos_string_t *upload_id, \r\n                                        int part_num, \r\n                                        oss_upload_file_t *upload_file,\r\n                                        aos_table_t **resp_headers)\r\n{\r\n    return oss_do_upload_part_from_file(options, bucket, object, upload_id, part_num, \r\n                                        upload_file, NULL, NULL, NULL, resp_headers, NULL);\r\n}\r\n\r\naos_status_t *oss_do_upload_part_from_file(const oss_request_options_t *options,\r\n                                           const aos_string_t *bucket, \r\n                                           const aos_string_t *object,\r\n                                           const aos_string_t *upload_id, \r\n                                           int part_num, \r\n                                           oss_upload_file_t *upload_file,\r\n                                           oss_progress_callback progress_callback,\r\n                                           aos_table_t *headers, \r\n                                           aos_table_t *params,\r\n                                           aos_table_t **resp_headers,\r\n                                           aos_list_t *resp_body)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL; \r\n    aos_table_t *query_params = NULL;\r\n    int res = AOSE_OK;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    s = aos_status_create(options->pool);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, params, 2);\r\n    apr_table_add(query_params, OSS_UPLOAD_ID, upload_id->data);\r\n    aos_table_add_int(query_params, OSS_PARTNUMBER, part_num);\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_object_request(options, bucket, object, HTTP_PUT, &req, \r\n                            query_params, headers, progress_callback, 0, &resp);\r\n\r\n    res = oss_write_request_body_from_upload_file(options->pool, upload_file, req);\r\n    if (res != AOSE_OK) {\r\n        aos_file_error_status_set(s, res);\r\n        return s;\r\n    }\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    oss_fill_read_response_body(resp, resp_body);\r\n\r\n    if (is_enable_crc(options) && has_crc_in_response(resp)) {\r\n        oss_check_crc_consistent(req->crc64, resp->headers, s);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_upload_part_copy(const oss_request_options_t *options,\r\n                                   oss_upload_part_copy_params_t *params, \r\n                                   aos_table_t *headers, \r\n                                   aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    char *copy_source = NULL;\r\n    char *copy_source_range = NULL;\r\n    char buffer[AOS_MAX_QUERY_ARG_LEN * 3 + 1];\n    int res = -1;\n\r\n    oss_ensure_bucket_name_valid(&params->dest_bucket);\r\n\r\n    s = aos_status_create(options->pool);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 2);\r\n    apr_table_add(query_params, OSS_UPLOAD_ID, params->upload_id.data);\r\n    aos_table_add_int(query_params, OSS_PARTNUMBER, params->part_num);\r\n\r\n    //init headers\r\n    res = aos_url_encode(buffer, params->source_object.data, AOS_MAX_QUERY_ARG_LEN);\n    if (res != AOSE_OK) {\n        aos_status_set(s, res, AOS_URL_ENCODE_ERROR_CODE, NULL);\n        return s;\n    }\r\n    headers = aos_table_create_if_null(options, headers, 2);\r\n    copy_source = apr_psprintf(options->pool, \"/%.*s/%s\", \r\n        params->source_bucket.len, params->source_bucket.data, \r\n        buffer);\r\n    apr_table_add(headers, OSS_COPY_SOURCE, copy_source);\r\n    copy_source_range = apr_psprintf(options->pool, \r\n            \"bytes=%\" APR_INT64_T_FMT \"-%\" APR_INT64_T_FMT,\r\n            params->range_start, params->range_end);\r\n    apr_table_add(headers, OSS_COPY_SOURCE_RANGE, copy_source_range);\r\n\r\n    oss_init_object_request(options, &params->dest_bucket, &params->dest_object, \r\n                            HTTP_PUT, &req, query_params, headers, NULL, 0, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_sorted_uploaded_part(oss_request_options_t *options,\r\n                                           const aos_string_t *bucket, \r\n                                           const aos_string_t *object, \r\n                                           const aos_string_t *upload_id, \r\n                                           aos_list_t *complete_part_list, \r\n                                           int *part_count)\r\n{\r\n    aos_pool_t *subpool = NULL;\r\n    aos_pool_t *parent_pool = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_status_t *ret = NULL;\r\n    oss_upload_part_t *part_arr = NULL;\r\n    int part_index = 0;\r\n    int index = 0;\r\n    int uploaded_part_count = 0;\r\n    oss_list_upload_part_params_t *params = NULL;\r\n    oss_list_part_content_t *part_content = NULL;\r\n    oss_complete_part_content_t *complete_content = NULL;\r\n    aos_table_t *list_part_resp_headers = NULL;\r\n    char *part_num_str = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    parent_pool = options->pool;\r\n    part_arr = aos_palloc(parent_pool, OSS_MAX_PART_NUM * sizeof(oss_upload_part_t));\r\n    params = oss_create_list_upload_part_params(parent_pool);\r\n    while (params->truncated) {\r\n        aos_pool_create(&subpool, parent_pool);\r\n        options->pool = subpool;\r\n        s = oss_list_upload_part(options, bucket, object,\r\n                upload_id, params, &list_part_resp_headers);\r\n        if (!aos_status_is_ok(s)) {\r\n            ret = aos_status_dup(parent_pool, s);\r\n            aos_pool_destroy(subpool);\r\n            options->pool = parent_pool;\r\n            return ret;\r\n        }\r\n        if (!params->truncated) {\r\n            ret = aos_status_dup(parent_pool, s);\r\n        }\r\n        aos_list_for_each_entry(oss_list_part_content_t, part_content, &params->part_list, node) {\r\n            oss_upload_part_t upload_part;\r\n            upload_part.etag = part_content->etag.data;\r\n            upload_part.part_num = atoi(part_content->part_number.data);\r\n            part_arr[part_index++] = upload_part;\r\n            uploaded_part_count++;\r\n        }\r\n\r\n        aos_list_init(&params->part_list);\r\n        if (params->next_part_number_marker.data != NULL) {\r\n            aos_str_set(&params->part_number_marker, \r\n                        params->next_part_number_marker.data);\r\n        }\r\n        \r\n        //sort multipart upload part content\r\n        qsort(part_arr, uploaded_part_count, sizeof(part_arr[0]), part_sort_cmp);\r\n\r\n        for (index = 0; index < part_index; ++index) {\r\n            complete_content = oss_create_complete_part_content(parent_pool);\r\n            part_num_str = apr_psprintf(parent_pool, \"%d\", part_arr[index].part_num);\r\n            aos_str_set(&complete_content->part_number, part_num_str);\r\n            aos_str_set(&complete_content->etag, part_arr[index].etag);\r\n            aos_list_add_tail(&complete_content->node, complete_part_list);\r\n        }\r\n        part_index = 0;\r\n        aos_pool_destroy(subpool);\r\n    }\r\n\r\n    *part_count = uploaded_part_count;\r\n    options->pool = parent_pool;\r\n\r\n    return ret;\r\n}\r\n\r\naos_status_t *oss_upload_file(oss_request_options_t *options,\r\n                              const aos_string_t *bucket, \r\n                              const aos_string_t *object, \r\n                              aos_string_t *upload_id,\r\n                              aos_string_t *filepath, \r\n                              int64_t part_size,\r\n                              aos_table_t *headers)\r\n{\r\n    aos_pool_t *subpool = NULL;\r\n    aos_pool_t *parent_pool = NULL;\r\n    int64_t start_pos;\r\n    int64_t end_pos;\r\n    int part_num;\r\n    int part_count = 0;\r\n    int res = AOSE_OK;\r\n    aos_status_t *s = NULL;\r\n    aos_status_t *ret = NULL;\r\n    aos_file_buf_t *fb = NULL;\r\n    oss_upload_file_t *upload_file = NULL;\r\n    aos_table_t *upload_part_resp_headers = NULL;\r\n    char *part_num_str = NULL;\r\n    char *etag = NULL;\r\n    aos_list_t complete_part_list;\r\n    oss_complete_part_content_t *complete_content = NULL;\r\n    aos_table_t *complete_resp_headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    aos_list_init(&complete_part_list);\r\n    parent_pool = options->pool;\r\n\r\n    //get upload_id and uploaded part\r\n    aos_pool_create(&subpool, options->pool);\r\n    options->pool = subpool;\r\n    if (NULL == upload_id->data) {\r\n        aos_table_t *init_multipart_headers = NULL;\r\n        aos_table_t *init_multipart_resp_headers = NULL;\r\n\r\n        init_multipart_headers = aos_table_make(subpool, 0);\r\n        s = oss_init_multipart_upload(options, bucket, object, \r\n                upload_id, init_multipart_headers, &init_multipart_resp_headers);\r\n        if (!aos_status_is_ok(s)) {\r\n            ret = aos_status_dup(parent_pool, s);\r\n            aos_pool_destroy(subpool);\r\n            options->pool = parent_pool;\r\n            return ret;\r\n        }\r\n    } else {\r\n        s = oss_get_sorted_uploaded_part(options, bucket, object, upload_id, \r\n                &complete_part_list, &part_count);\r\n        if (!aos_status_is_ok(s)) {\r\n            ret = aos_status_dup(parent_pool, s);\r\n            aos_pool_destroy(subpool);\r\n            options->pool = parent_pool;\r\n            return ret;\r\n        }\r\n    }\r\n    aos_pool_destroy(subpool);\r\n\r\n    //get part size\r\n    fb = aos_create_file_buf(parent_pool);\r\n    res = aos_open_file_for_read(parent_pool, filepath->data, fb);\r\n    if (res != AOSE_OK) {\r\n        s = aos_status_create(parent_pool);\r\n        aos_file_error_status_set(s, res);\r\n        options->pool = parent_pool;\r\n        return s;\r\n    }\r\n    oss_get_part_size(fb->file_last, &part_size);\r\n\r\n    //upload part from file\r\n    upload_file = oss_create_upload_file(parent_pool);\r\n    aos_str_set(&upload_file->filename, filepath->data);\r\n    start_pos = part_size * part_count;\r\n    end_pos = start_pos + part_size;\r\n    part_num = part_count + 1;\r\n\r\n    while (1) {\r\n        aos_pool_create(&subpool, parent_pool);\r\n        options->pool = subpool;\r\n        upload_file->file_pos = start_pos;\r\n        upload_file->file_last = end_pos;\r\n        \r\n        s = oss_upload_part_from_file(options, bucket, object, upload_id,\r\n            part_num, upload_file, &upload_part_resp_headers);\r\n        if (!aos_status_is_ok(s)) {\r\n            ret = aos_status_dup(parent_pool, s);\r\n            aos_pool_destroy(subpool);\r\n            options->pool = parent_pool;\r\n            return ret;\r\n        }\r\n         \r\n        complete_content = oss_create_complete_part_content(parent_pool);\r\n        part_num_str = apr_psprintf(parent_pool, \"%d\", part_num);\r\n        aos_str_set(&complete_content->part_number, part_num_str);\r\n        etag = apr_pstrdup(parent_pool, \r\n                           (char*)apr_table_get(upload_part_resp_headers, \"ETag\"));\r\n        aos_str_set(&complete_content->etag, etag);\r\n        aos_list_add_tail(&complete_content->node, &complete_part_list);\r\n        aos_pool_destroy(subpool);\r\n        if (end_pos >= fb->file_last) {\r\n            break;\r\n        }\r\n        start_pos += part_size;\r\n        end_pos += part_size;\r\n        if (end_pos > fb->file_last)\r\n            end_pos = fb->file_last;\r\n        part_num += 1;\r\n    }\r\n\r\n    //complete multipart\r\n    aos_pool_create(&subpool, parent_pool);\r\n    options->pool = subpool;\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    s = oss_complete_multipart_upload(options, bucket, object, upload_id,\r\n            &complete_part_list, headers, &complete_resp_headers);\r\n    ret = aos_status_dup(parent_pool, s);\r\n    aos_pool_destroy(subpool);\r\n    options->pool = parent_pool;\r\n    return ret;\r\n}\r\n"
  },
  {
    "path": "oss_c_sdk/oss_object.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"aos_define.h\"\n#include \"oss_define.h\"\n\nchar *oss_gen_signed_url(const oss_request_options_t *options,\n                         const aos_string_t *bucket, \n                         const aos_string_t *object,\n                         int64_t expires, \n                         aos_http_request_t *req)\n{\n    aos_string_t signed_url;\n    char *expires_str = NULL;\n    aos_string_t expires_time;\n    int res = AOSE_OK;\n\n    if (!oss_is_valid_bucket_name(bucket) ||\n        !oss_is_valid_object_name_ex(object, is_verify_object_strict(options))) {\n        return NULL;\n    }\n\n    expires_str = apr_psprintf(options->pool, \"%\" APR_INT64_T_FMT, expires);\n    aos_str_set(&expires_time, expires_str);\n    oss_get_object_uri(options, bucket, object, req);\n    res = oss_get_signed_url(options, req, &expires_time, &signed_url);\n    if (res != AOSE_OK) {\n        return NULL;\n    }\n    return signed_url.data;\n}\n\naos_status_t *oss_put_object_from_buffer(const oss_request_options_t *options,\n                                         const aos_string_t *bucket, \n                                         const aos_string_t *object, \n                                         aos_list_t *buffer,\n                                         aos_table_t *headers, \n                                         aos_table_t **resp_headers)\n{\n    return oss_do_put_object_from_buffer(options, bucket, object, buffer, \n                                         headers, NULL, NULL, resp_headers, NULL);\n}\n\naos_status_t *oss_do_put_object_from_buffer(const oss_request_options_t *options,\n                                            const aos_string_t *bucket, \n                                            const aos_string_t *object, \n                                            aos_list_t *buffer,\n                                            aos_table_t *headers, \n                                            aos_table_t *params,\n                                            oss_progress_callback progress_callback,\n                                            aos_table_t **resp_headers,\n                                            aos_list_t *resp_body)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\n    headers = aos_table_create_if_null(options, headers, 2);\n    set_content_type(NULL, object->data, headers);\n    apr_table_add(headers, OSS_EXPECT, \"\");\n\n    query_params = aos_table_create_if_null(options, params, 0);\n\n    oss_init_object_request(options, bucket, object, HTTP_PUT, \n                            &req, query_params, headers, progress_callback, 0, &resp);\n    oss_write_request_body_from_buffer(buffer, req);\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_body(resp, resp_body);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    if (is_enable_crc(options) && has_crc_in_response(resp)) {\n        oss_check_crc_consistent(req->crc64, resp->headers, s);\n    }\n\n    return s;\n}\n\naos_status_t *oss_put_object_from_file(const oss_request_options_t *options,\n                                       const aos_string_t *bucket, \n                                       const aos_string_t *object, \n                                       const aos_string_t *filename,\n                                       aos_table_t *headers, \n                                       aos_table_t **resp_headers)\n{\n    return oss_do_put_object_from_file(options, bucket, object, filename, \n                                       headers, NULL, NULL, resp_headers, NULL);\n}\n\naos_status_t *oss_do_put_object_from_file(const oss_request_options_t *options,\n                                          const aos_string_t *bucket, \n                                          const aos_string_t *object, \n                                          const aos_string_t *filename,\n                                          aos_table_t *headers, \n                                          aos_table_t *params,\n                                          oss_progress_callback progress_callback,\n                                          aos_table_t **resp_headers,\n                                          aos_list_t *resp_body)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n    int res = AOSE_OK;\n\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\n    s = aos_status_create(options->pool);\n\n    headers = aos_table_create_if_null(options, headers, 2);\n    set_content_type(filename->data, object->data, headers);\n    apr_table_add(headers, OSS_EXPECT, \"\");\n\n    query_params = aos_table_create_if_null(options, params, 0);\n\n    oss_init_object_request(options, bucket, object, HTTP_PUT, &req, \n                            query_params, headers, progress_callback, 0, &resp);\n\n    res = oss_write_request_body_from_file(options->pool, filename, req);\n    if (res != AOSE_OK) {\n        aos_file_error_status_set(s, res);\n        return s;\n    }\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_body(resp, resp_body);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    if (is_enable_crc(options) && has_crc_in_response(resp)) {\n        oss_check_crc_consistent(req->crc64, resp->headers, s);\n    }\n\n    return s;\n}\n\naos_status_t *oss_get_object_to_buffer(const oss_request_options_t *options, \n                                       const aos_string_t *bucket, \n                                       const aos_string_t *object,\n                                       aos_table_t *headers, \n                                       aos_table_t *params,\n                                       aos_list_t *buffer, \n                                       aos_table_t **resp_headers)\n{\n    return oss_do_get_object_to_buffer(options, bucket, object, headers, \n                                       params, buffer, NULL, resp_headers);\n}\n\naos_status_t *oss_do_get_object_to_buffer(const oss_request_options_t *options, \n                                          const aos_string_t *bucket, \n                                          const aos_string_t *object,\n                                          aos_table_t *headers, \n                                          aos_table_t *params,\n                                          aos_list_t *buffer,\n                                          oss_progress_callback progress_callback, \n                                          aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\n    headers = aos_table_create_if_null(options, headers, 0);\n    params = aos_table_create_if_null(options, params, 0);\n\n    oss_init_object_request(options, bucket, object, HTTP_GET, \n                            &req, params, headers, progress_callback, 0, &resp);\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_body(resp, buffer);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    if (is_enable_crc(options) && has_crc_in_response(resp) &&  \n        !has_range_or_process_in_request(req)) {\n        oss_check_crc_consistent(resp->crc64, resp->headers, s);\n    }\n\n    return s;\n}\n\naos_status_t *oss_restore_object(const oss_request_options_t *options, \n                                          const aos_string_t *bucket, \n                                          const aos_string_t *object,\n                                          aos_table_t *headers, \n                                          aos_table_t **resp_headers)\n{\n    aos_table_t *params = NULL;\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\n    params = aos_table_create_if_null(options, params, 0);\n    apr_table_add(params, OSS_RESTORE, \"\");\n\n    headers = aos_table_create_if_null(options, headers, 0);\n\n    /* \n     * Because this framework will auto add content-length for HTTP_POST and HTTP_PUT method,\n     * it has to add content type as well. Otherwise oss server will fail at signature\n     * mismatch. \n     * With set content type, it works.\n     * But in future, it's better refactor framework to fix this problem.\n     */\n    set_content_type(NULL, object->data, headers);\n\n    oss_init_object_request(options, bucket, object, HTTP_POST, \n                            &req, params, headers, NULL, 0, &resp);\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    return s;\n}\n\naos_status_t *oss_restore_object_with_tier(const oss_request_options_t *options,\n    const aos_string_t *bucket,\n    const aos_string_t *object,\n    oss_tier_type_e tier,\n    int day,\n    aos_table_t *headers,\n    aos_table_t **resp_headers)\n{\n    aos_table_t *params = NULL;\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_list_t body;\r\n\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\n    params = aos_table_create_if_null(options, params, 0);\n    apr_table_add(params, OSS_RESTORE, \"\");\n\n    headers = aos_table_create_if_null(options, headers, 0);\n\n    set_content_type(NULL, object->data, headers);\n\n    oss_init_object_request(options, bucket, object, HTTP_POST,\n        &req, params, headers, NULL, 0, &resp);\n\n    oss_build_restore_object_body(options->pool, tier, day, &body);\r\n    oss_write_request_body_from_buffer(&body, req);\r\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    return s;\n}\n\naos_status_t *oss_get_object_to_file(const oss_request_options_t *options,\n                                     const aos_string_t *bucket, \n                                     const aos_string_t *object,\n                                     aos_table_t *headers, \n                                     aos_table_t *params,\n                                     aos_string_t *filename, \n                                     aos_table_t **resp_headers)\n{\n    return oss_do_get_object_to_file(options, bucket, object, headers, \n                                     params, filename, NULL, resp_headers);\n}\n\naos_status_t *oss_do_get_object_to_file(const oss_request_options_t *options,\n                                        const aos_string_t *bucket, \n                                        const aos_string_t *object,\n                                        aos_table_t *headers, \n                                        aos_table_t *params,\n                                        aos_string_t *filename, \n                                        oss_progress_callback progress_callback,\n                                        aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    int res = AOSE_OK;\n    aos_string_t tmp_filename;\n\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\n    headers = aos_table_create_if_null(options, headers, 0);\n    params = aos_table_create_if_null(options, params, 0);\n\n    oss_get_temporary_file_name(options->pool, filename, &tmp_filename);\n\n    oss_init_object_request(options, bucket, object, HTTP_GET, \n                            &req, params, headers, progress_callback, 0, &resp);\n\n    s = aos_status_create(options->pool);\n    res = oss_init_read_response_body_to_file(options->pool, &tmp_filename, resp);\n    if (res != AOSE_OK) {\n        aos_file_error_status_set(s, res);\n        return s;\n    }\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    if (is_enable_crc(options) && has_crc_in_response(resp) && \n        !has_range_or_process_in_request(req)) {\n            oss_check_crc_consistent(resp->crc64, resp->headers, s);\n    }\n\n    oss_temp_file_rename(s, tmp_filename.data, filename->data, options->pool);\n\n    return s;\n}\n\naos_status_t *oss_head_object(const oss_request_options_t *options, \n                              const aos_string_t *bucket, \n                              const aos_string_t *object,\n                              aos_table_t *headers, \n                              aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\n    headers = aos_table_create_if_null(options, headers, 0);\n\n    query_params = aos_table_create_if_null(options, query_params, 0);\n\n    oss_init_object_request(options, bucket, object, HTTP_HEAD, \n                            &req, query_params, headers, NULL, 0, &resp);\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    return s;\n}\n\naos_status_t *oss_get_object_meta(const oss_request_options_t *options,\n                                  const aos_string_t *bucket,\n                                  const aos_string_t *object,\n                                  aos_table_t **resp_headers){\n   aos_status_t *s = NULL;\n   aos_http_request_t *req = NULL;\n   aos_http_response_t *resp = NULL;\n   aos_table_t *query_params = NULL;\n   aos_table_t *headers = NULL;\n\n   oss_ensure_bucket_name_valid(bucket);\r\n   oss_ensure_object_name_valid(object);\r\n\n   //init query_params\n   query_params = aos_table_create_if_null(options, query_params, 1);\n   apr_table_add(query_params, OSS_OBJECT_META, \"\");\n\n   //init headers\n   headers = aos_table_create_if_null(options, headers, 0);\n\n   oss_init_object_request(options, bucket, object, HTTP_HEAD, \n                            &req, query_params, headers, NULL, 0, &resp);\n\n   s = oss_process_request(options, req, resp);\n   oss_fill_read_response_header(resp, resp_headers);\n\n   return s;\n}\n\naos_status_t *oss_put_object_acl(const oss_request_options_t *options,\n                                 const aos_string_t *bucket,\n                                 const aos_string_t *object,\n                                 oss_acl_e oss_acl,\n                                 aos_table_t **resp_headers){\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n    aos_table_t *headers = NULL;\n    const char *oss_acl_str = NULL;\n    \n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\n    s = aos_status_create(options->pool);\n    \n    // In this place, we use a temporary solution to the problem of empty or null values of bucket or object\n    // And in the next release, we will use a unified approach to solve this problem for all APIs\n    if (aos_string_is_empty(object)) {\n        aos_status_set(s, AOSE_INVALID_ARGUMENT, AOS_EMPTY_STRING_ERROR, \"bucket or object is empty!\");\n        return s;\n    }\n\n    //init query_params\n    query_params = aos_table_create_if_null(options, query_params, 1);\n    apr_table_add(query_params, OSS_ACL, \"\");\n\n    //init headers\n    headers = aos_table_create_if_null(options, headers, 1);\n    oss_acl_str = get_oss_acl_str(oss_acl);\n    if (oss_acl_str){\n        apr_table_set(headers, OSS_CANNONICALIZED_HEADER_OBJECT_ACL, oss_acl_str);     \n    }\n\n    oss_init_object_request(options, bucket, object, HTTP_PUT, \n                    &req, query_params, headers, NULL, 0, &resp);\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    return s;\n}\n\naos_status_t *oss_get_object_acl(const oss_request_options_t *options,\n                                 const aos_string_t *bucket,\n                                 const aos_string_t *object,\n                                 aos_string_t *oss_acl,\n                                 aos_table_t **resp_headers){\n    aos_status_t *s = NULL;\n    int res;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n    aos_table_t *headers = NULL;\n\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\r\n    s = aos_status_create(options->pool);\n    \n    // In this place, we use a temporary solution to the problem of empty or null values of bucket or object\n    // And in the next release, we will use a unified approach to solve this problem for all APIs\n    if (aos_string_is_empty(object)) {\n        aos_status_set(s, AOSE_INVALID_ARGUMENT, AOS_EMPTY_STRING_ERROR, \"bucket or object is empty!\");\n        return s;\n    }\n\n    //init query_params\n    query_params = aos_table_create_if_null(options, headers, 1);\n    apr_table_add(query_params, OSS_ACL, \"\");\n\n    //init headers\n    headers = aos_table_create_if_null(options, headers, 0);\n\n    oss_init_object_request(options, bucket, object, HTTP_GET,\n                    &req, query_params, headers, NULL, 0, &resp);\n    \n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n    if (!aos_status_is_ok(s)) {\n        return s;\n    }\n\n    res = oss_acl_parse_from_body(options->pool, &resp->body, oss_acl);\n    if (res != AOSE_OK) {\n        aos_xml_error_status_set(s, res);\n    }\n\n    return s;\n}\n\naos_status_t *oss_put_symlink(const oss_request_options_t *options,\n                              const aos_string_t *bucket,\n                              const aos_string_t *sym_object,\n                              const aos_string_t *target_object,\n                              aos_table_t **resp_headers)\n{\n    return oss_do_put_symlink(options, bucket, sym_object, target_object, NULL, resp_headers);\n}\n\naos_status_t *oss_do_put_symlink(const oss_request_options_t *options, \n                              const aos_string_t *bucket, \n                              const aos_string_t *sym_object,\n                              const aos_string_t *target_object,\n                              aos_table_t *headers,\n                              aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(sym_object);\r\n\n    headers = aos_table_create_if_null(options, headers, 1);\n    apr_table_set(headers, OSS_CANNONICALIZED_HEADER_SYMLINK, target_object->data);\n\n    query_params = aos_table_create_if_null(options, query_params, 0);\n    apr_table_add(query_params, OSS_SYMLINK, \"\");\n\n    oss_init_object_request(options, bucket, sym_object, HTTP_PUT, \n                            &req, query_params, headers, NULL, 0, &resp);\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    return s;\n}\n\naos_status_t *oss_get_symlink(const oss_request_options_t *options, \n                              const aos_string_t *bucket, \n                              const aos_string_t *sym_object,\n                              aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n    aos_table_t *headers = NULL; \n\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(sym_object);\r\n\n    headers = aos_table_create_if_null(options, headers, 0);    \n\n    query_params = aos_table_create_if_null(options, query_params, 0);\n    apr_table_add(query_params, OSS_SYMLINK, \"\");\n\n    oss_init_object_request(options, bucket, sym_object, HTTP_GET, \n                            &req, query_params, headers, NULL, 0, &resp);\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    return s;\n}\n\naos_status_t *oss_delete_object(const oss_request_options_t *options,\n                                const aos_string_t *bucket, \n                                const aos_string_t *object, \n                                aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *query_params = NULL;\n\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\n    headers = aos_table_create_if_null(options, headers, 0);\n    query_params = aos_table_create_if_null(options, query_params, 0);\n\n    oss_init_object_request(options, bucket, object, HTTP_DELETE, \n                            &req, query_params, headers, NULL, 0, &resp);\n    oss_get_object_uri(options, bucket, object, req);\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    return s;\n}\n\naos_status_t *oss_copy_object(const oss_request_options_t *options, \n                              const aos_string_t *source_bucket, \n                              const aos_string_t *source_object, \n                              const aos_string_t *dest_bucket, \n                              const aos_string_t *dest_object,\n                              aos_table_t *headers, \n                              aos_table_t **resp_headers)\n{\n    char *copy_source = NULL;\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n    char buffer[AOS_MAX_QUERY_ARG_LEN*3+1];\n    int res = -1;\n\n    oss_ensure_bucket_name_valid(dest_bucket);\r\n    oss_ensure_object_name_valid(dest_object);\r\n\n    s = aos_status_create(options->pool);\n\n    headers = aos_table_create_if_null(options, headers, 2);\n    query_params = aos_table_create_if_null(options, query_params, 0);\n\n    /* init headers */\n    res = aos_url_encode(buffer, source_object->data, AOS_MAX_QUERY_ARG_LEN);\n    if (res != AOSE_OK) {\n        aos_status_set(s, res, AOS_URL_ENCODE_ERROR_CODE, NULL);\n        return s;\n    }\n\n    copy_source = apr_psprintf(options->pool, \"/%.*s/%s\", \n        source_bucket->len, source_bucket->data, buffer);\n    apr_table_set(headers, OSS_CANNONICALIZED_HEADER_COPY_SOURCE, copy_source);\n    set_content_type(NULL, dest_object->data, headers);\n\n    oss_init_object_request(options, dest_bucket, dest_object, HTTP_PUT, \n                            &req, query_params, headers, NULL, 0, &resp);\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    return s;\n}\n\naos_status_t *oss_append_object_from_buffer(const oss_request_options_t *options,\n                                            const aos_string_t *bucket, \n                                            const aos_string_t *object, \n                                            int64_t position,\n                                            aos_list_t *buffer, \n                                            aos_table_t *headers, \n                                            aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n    \n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\n    /* init query_params */\n    query_params = aos_table_create_if_null(options, query_params, 2);\n    apr_table_add(query_params, OSS_APPEND, \"\");\n    aos_table_add_int64(query_params, OSS_POSITION, position);\n\n    /* init headers */\n    headers = aos_table_create_if_null(options, headers, 2);\n    set_content_type(NULL, object->data, headers);\n    apr_table_add(headers, OSS_EXPECT, \"\");\n\n    oss_init_object_request(options, bucket, object, HTTP_POST, \n                            &req, query_params, headers, NULL, 0, &resp);\n    oss_write_request_body_from_buffer(buffer, req);\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    return s;\n}\n\naos_status_t *oss_do_append_object_from_buffer(const oss_request_options_t *options,\n                                               const aos_string_t *bucket, \n                                               const aos_string_t *object, \n                                               int64_t position,\n                                               uint64_t init_crc,\n                                               aos_list_t *buffer, \n                                               aos_table_t *headers,\n                                               aos_table_t *params,\n                                               oss_progress_callback progress_callback,\n                                               aos_table_t **resp_headers,\n                                               aos_list_t *resp_body)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n    \n    oss_ensure_bucket_name_valid(bucket);\n    oss_ensure_object_name_valid(object);\r\n\n    /* init query_params */\n    query_params = aos_table_create_if_null(options, params, 2);\n    apr_table_add(query_params, OSS_APPEND, \"\");\n    aos_table_add_int64(query_params, OSS_POSITION, position);\n\n    /* init headers */\n    headers = aos_table_create_if_null(options, headers, 2);\n    set_content_type(NULL, object->data, headers);\n    apr_table_add(headers, OSS_EXPECT, \"\");\n\n    oss_init_object_request(options, bucket, object, HTTP_POST, &req, query_params, \n                            headers, progress_callback, init_crc, &resp);\n    oss_write_request_body_from_buffer(buffer, req);\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n    oss_fill_read_response_body(resp, resp_body);\n\n    if (is_enable_crc(options) && has_crc_in_response(resp)) {\n        oss_check_crc_consistent(req->crc64, resp->headers, s);\n    }\n\n    return s;\n}\n\naos_status_t *oss_append_object_from_file(const oss_request_options_t *options,\n                                          const aos_string_t *bucket, \n                                          const aos_string_t *object, \n                                          int64_t position,\n                                          const aos_string_t *append_file, \n                                          aos_table_t *headers, \n                                          aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n    int res = AOSE_OK;\n\n    oss_ensure_bucket_name_valid(bucket);\n    oss_ensure_object_name_valid(object);\r\n\n    /* init query_params */\n    query_params = aos_table_create_if_null(options, query_params, 2);\n    apr_table_add(query_params, OSS_APPEND, \"\");\n    aos_table_add_int64(query_params, OSS_POSITION, position);\n    \n    /* init headers */\n    headers = aos_table_create_if_null(options, headers, 2);\n    set_content_type(append_file->data, object->data, headers);\n    apr_table_add(headers, OSS_EXPECT, \"\");\n\n    oss_init_object_request(options, bucket, object, HTTP_POST, \n                            &req, query_params, headers, NULL, 0, &resp);\n    res = oss_write_request_body_from_file(options->pool, append_file, req);\n\n    s = aos_status_create(options->pool);\n    if (res != AOSE_OK) {\n        aos_file_error_status_set(s, res);\n        return s;\n    }\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    return s;\n}\n\naos_status_t *oss_do_append_object_from_file(const oss_request_options_t *options,\n                                             const aos_string_t *bucket, \n                                             const aos_string_t *object, \n                                             int64_t position,\n                                             uint64_t init_crc,\n                                             const aos_string_t *append_file, \n                                             aos_table_t *headers, \n                                             aos_table_t *params,\n                                             oss_progress_callback progress_callback,\n                                             aos_table_t **resp_headers,\n                                             aos_list_t *resp_body)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n    int res = AOSE_OK;\n\n    oss_ensure_bucket_name_valid(bucket);\n    oss_ensure_object_name_valid(object);\r\n\n    /* init query_params */\n    query_params = aos_table_create_if_null(options, params, 2);\n    apr_table_add(query_params, OSS_APPEND, \"\");\n    aos_table_add_int64(query_params, OSS_POSITION, position);\n    \n    /* init headers */\n    headers = aos_table_create_if_null(options, headers, 2);\n    set_content_type(append_file->data, object->data, headers);\n    apr_table_add(headers, OSS_EXPECT, \"\");\n\n    oss_init_object_request(options, bucket, object, HTTP_POST,  &req, query_params, \n                            headers, progress_callback, init_crc, &resp);\n    res = oss_write_request_body_from_file(options->pool, append_file, req);\n\n    s = aos_status_create(options->pool);\n    if (res != AOSE_OK) {\n        aos_file_error_status_set(s, res);\n        return s;\n    }\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n    oss_fill_read_response_body(resp, resp_body);\n\n    if (is_enable_crc(options) && has_crc_in_response(resp)) {\n        oss_check_crc_consistent(req->crc64, resp->headers, s);\n    }\n\n    return s;\n}\n\naos_status_t *oss_put_object_from_buffer_by_url(const oss_request_options_t *options,\n                                                const aos_string_t *signed_url, \n                                                aos_list_t *buffer, \n                                                aos_table_t *headers,\n                                                aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n\n    /* init query_params */\n    headers = aos_table_create_if_null(options, headers, 0);\n    query_params = aos_table_create_if_null(options, query_params, 0);\n\n    oss_init_signed_url_request(options, signed_url, HTTP_PUT, \n                                &req, query_params, headers, &resp);\n\n    oss_write_request_body_from_buffer(buffer, req);\n\n    s = oss_process_signed_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    if (is_enable_crc(options) && has_crc_in_response(resp)) {\n        oss_check_crc_consistent(req->crc64, resp->headers, s);\n    }\n\n    return s;\n}\n\naos_status_t *oss_put_object_from_file_by_url(const oss_request_options_t *options,\n                                              const aos_string_t *signed_url, \n                                              aos_string_t *filename, \n                                              aos_table_t *headers,\n                                              aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n    int res = AOSE_OK;\n\n    s = aos_status_create(options->pool);\n\n    headers = aos_table_create_if_null(options, headers, 0);\n    query_params = aos_table_create_if_null(options, query_params, 0);\n\n    oss_init_signed_url_request(options, signed_url, HTTP_PUT, \n                                &req, query_params, headers, &resp);\n    res = oss_write_request_body_from_file(options->pool, filename, req);\n    if (res != AOSE_OK) {\n        aos_file_error_status_set(s, res);\n        return s;\n    }\n\n    s = oss_process_signed_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    if (is_enable_crc(options) && has_crc_in_response(resp)) {\n        oss_check_crc_consistent(req->crc64, resp->headers, s);\n    }\n\n    return s;\n}\n\naos_status_t *oss_get_object_to_buffer_by_url(const oss_request_options_t *options,\n                                              const aos_string_t *signed_url, \n                                              aos_table_t *headers,\n                                              aos_table_t *params,\n                                              aos_list_t *buffer,\n                                              aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n\n    headers = aos_table_create_if_null(options, headers, 0);\n    params = aos_table_create_if_null(options, params, 0);\n    \n    oss_init_signed_url_request(options, signed_url, HTTP_GET, \n                                &req, params, headers, &resp);\n\n    s = oss_process_signed_request(options, req, resp);\n    oss_fill_read_response_body(resp, buffer);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    if (is_enable_crc(options) && has_crc_in_response(resp) &&  \n        !has_range_or_process_in_request(req)) {\n            oss_check_crc_consistent(resp->crc64, resp->headers, s);\n    }\n\n    return s;\n}\n\naos_status_t *oss_get_object_to_file_by_url(const oss_request_options_t *options,\n                                            const aos_string_t *signed_url, \n                                            aos_table_t *headers, \n                                            aos_table_t *params,\n                                            aos_string_t *filename,\n                                            aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    int res = AOSE_OK;\n    aos_string_t tmp_filename;\n\n    s = aos_status_create(options->pool);\n\n    headers = aos_table_create_if_null(options, headers, 0);\n    params = aos_table_create_if_null(options, params, 0);\n\n    oss_get_temporary_file_name(options->pool, filename, &tmp_filename);\n \n    oss_init_signed_url_request(options, signed_url, HTTP_GET, \n                                &req, params, headers, &resp);\n\n    res = oss_init_read_response_body_to_file(options->pool, filename, resp);\n    if (res != AOSE_OK) {\n        aos_file_error_status_set(s, res);\n        return s;\n    }\n\n    s = oss_process_signed_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    if (is_enable_crc(options) && has_crc_in_response(resp) && \n        !has_range_or_process_in_request(req)) {\n            oss_check_crc_consistent(resp->crc64, resp->headers, s);\n    }\n\n    oss_temp_file_rename(s, tmp_filename.data, filename->data, options->pool);\n\n    return s;\n}\n\naos_status_t *oss_head_object_by_url(const oss_request_options_t *options,\n                                     const aos_string_t *signed_url, \n                                     aos_table_t *headers, \n                                     aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n\n    headers = aos_table_create_if_null(options, headers, 0);\n    query_params = aos_table_create_if_null(options, query_params, 0);\n    \n    oss_init_signed_url_request(options, signed_url, HTTP_HEAD, \n                                &req, query_params, headers, &resp);\n\n    s = oss_process_signed_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    return s;\n}\n\naos_status_t *oss_select_object_to_buffer(const oss_request_options_t *options,\n    const aos_string_t *bucket,\n    const aos_string_t *object,\n    const aos_string_t *expression,\n    oss_select_object_params_t *select_params,\n    aos_list_t *buffer,\n    aos_table_t **resp_headers)\n{\n    return oss_do_select_object_to_buffer(options, bucket, object, \n        expression, select_params,\n        NULL, NULL, buffer, NULL, resp_headers);\n}\n\naos_status_t *oss_do_select_object_to_buffer(const oss_request_options_t *options,\n    const aos_string_t *bucket,\n    const aos_string_t *object,\n    const aos_string_t *expression,\n    oss_select_object_params_t *select_params,\n    aos_table_t *headers,\n    aos_table_t *params,\n    aos_list_t *buffer,\n    oss_progress_callback progress_callback,\n    aos_table_t **resp_headers)\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n    aos_list_t body;\n    unsigned char *md5 = NULL;\n    char *buf = NULL;\n    int64_t body_len;\n    char *b64_value = NULL;\n    int b64_buf_len = (20 + 1) * 4 / 3;\n    int b64_len;\n\n    oss_ensure_bucket_name_valid(bucket);\n    oss_ensure_object_name_valid(object);\r\n\n    /*init query_params*/\n    query_params = aos_table_create_if_null(options, params, 1);\n    apr_table_add(query_params, OSS_PROCESS, \"csv/select\");\n\n    /*init headers*/\n    headers = aos_table_create_if_null(options, headers, 1);\n    apr_table_add(headers, OSS_CONTENT_TYPE, \"application/x-www-form-urlencoded\");\n\n    oss_init_object_request(options, bucket, object, HTTP_POST,\n        &req, query_params, headers, progress_callback, 0, &resp);\n\n    /*build post data*/\n    oss_build_select_object_body(options->pool, expression, select_params, &body);\n\n    /*add Content-MD5*/\n    body_len = aos_buf_list_len(&body);\n    buf = aos_buf_list_content(options->pool, &body);\n    md5 = aos_md5(options->pool, buf, (apr_size_t)body_len);\n    b64_value = aos_pcalloc(options->pool, b64_buf_len);\n    b64_len = aos_base64_encode(md5, 20, b64_value);\n    b64_value[b64_len] = '\\0';\n    apr_table_addn(headers, OSS_CONTENT_MD5, b64_value);\n\n    oss_write_request_body_from_buffer(&body, req);\n    oss_init_select_object_read_response_body(options->pool, resp);\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_body(resp, buffer);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    oss_check_select_object_status(resp, s);\n\n    return s;\n}\n\naos_status_t *oss_select_object_to_file(const oss_request_options_t *options,\n        const aos_string_t *bucket,\n        const aos_string_t *object,\n        const aos_string_t *expression,\n        oss_select_object_params_t *select_params,\n        aos_string_t *filename,\n        aos_table_t **resp_headers)\n\n{\n    return oss_do_select_object_to_file(options, bucket, object, \n        expression, select_params, \n        NULL, NULL, filename, NULL, resp_headers);\n}\n\naos_status_t *oss_do_select_object_to_file(const oss_request_options_t *options,\n        const aos_string_t *bucket,\n        const aos_string_t *object,\n        const aos_string_t *expression,\n        oss_select_object_params_t *select_params,\n        aos_table_t *headers,\n        aos_table_t *params,\n        aos_string_t *filename,\n        oss_progress_callback progress_callback,\n        aos_table_t **resp_headers)\n{\n    int res = AOSE_OK;\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n    aos_list_t body;\n    unsigned char *md5 = NULL;\n    char *buf = NULL;\n    int64_t body_len;\n    char *b64_value = NULL;\n    int b64_buf_len = (20 + 1) * 4 / 3;\n    int b64_len;\n    aos_string_t tmp_filename;\n\n    oss_ensure_bucket_name_valid(bucket);\n    oss_ensure_object_name_valid(object);\r\n\n    /*init query_params*/\n    query_params = aos_table_create_if_null(options, params, 1);\n    apr_table_add(query_params, OSS_PROCESS, \"csv/select\");\n\n    /*init headers*/\n    headers = aos_table_create_if_null(options, headers, 1);\n    apr_table_add(headers, OSS_CONTENT_TYPE, \"application/x-www-form-urlencoded\");\n\n    oss_init_object_request(options, bucket, object, HTTP_POST,\n        &req, query_params, headers, progress_callback, 0, &resp);\n\n    /*create temp file*/\n    oss_get_temporary_file_name(options->pool, filename, &tmp_filename);\n    res = oss_init_read_response_body_to_file(options->pool, &tmp_filename, resp);\n    if (res != AOSE_OK) {\n        s = aos_status_create(options->pool);\n        aos_file_error_status_set(s, res);\n        return s;\n    }\n\n    /*build post data*/\n    oss_build_select_object_body(options->pool, expression, select_params, &body);\n\n    /*add Content-MD5*/\n    body_len = aos_buf_list_len(&body);\n    buf = aos_buf_list_content(options->pool, &body);\n    md5 = aos_md5(options->pool, buf, (apr_size_t)body_len);\n    b64_value = aos_pcalloc(options->pool, b64_buf_len);\n    b64_len = aos_base64_encode(md5, 20, b64_value);\n    b64_value[b64_len] = '\\0';\n    apr_table_addn(headers, OSS_CONTENT_MD5, b64_value);\n\n    oss_write_request_body_from_buffer(&body, req);\n    oss_init_select_object_read_response_body(options->pool, resp);\n\n    s = oss_process_request(options, req, resp);\n    oss_fill_read_response_header(resp, resp_headers);\n\n    oss_check_select_object_status(resp, s);\n\n    oss_temp_file_rename(s, tmp_filename.data, filename->data, options->pool);\n\n    return s;\n}\n\naos_status_t *oss_create_select_object_meta(const oss_request_options_t *options,\n    const aos_string_t *bucket,\n    const aos_string_t *object,\n    oss_select_object_meta_params_t *meta_params,\n    aos_table_t **resp_headers)\n\n{\n    aos_status_t *s = NULL;\n    aos_http_request_t *req = NULL;\n    aos_http_response_t *resp = NULL;\n    aos_table_t *query_params = NULL;\n    aos_table_t *headers = NULL;\n    aos_list_t body;\n    unsigned char *md5 = NULL;\n    char *buf = NULL;\n    int64_t body_len;\n    char *b64_value = NULL;\n    int b64_buf_len = (20 + 1) * 4 / 3;\n    int b64_len;\n\n    oss_ensure_bucket_name_valid(bucket);\n    oss_ensure_object_name_valid(object);\r\n\n    /*init query_params*/\n    query_params = aos_table_create_if_null(options, query_params, 1);\n    apr_table_add(query_params, OSS_PROCESS, \"csv/meta\");\n\n    /*init headers*/\n    headers = aos_table_create_if_null(options, headers, 1);\n    apr_table_add(headers, OSS_CONTENT_TYPE, \"application/x-www-form-urlencoded\");\n\n    oss_init_object_request(options, bucket, object, HTTP_POST,\n        &req, query_params, headers, NULL, 0, &resp);\n\n    /*build post data*/\n    oss_build_create_select_object_meta_body(options->pool, meta_params, &body);\n\n    /*add Content-MD5*/\n    body_len = aos_buf_list_len(&body);\n    buf = aos_buf_list_content(options->pool, &body);\n    md5 = aos_md5(options->pool, buf, (apr_size_t)body_len);\n    b64_value = aos_pcalloc(options->pool, b64_buf_len);\n    b64_len = aos_base64_encode(md5, 20, b64_value);\n    b64_value[b64_len] = '\\0';\n    apr_table_addn(headers, OSS_CONTENT_MD5, b64_value);\n\n    oss_write_request_body_from_buffer(&body, req);\n\n    oss_init_create_select_object_meta_read_response_body(options->pool, resp);\n    s = oss_process_request(options, req, resp);\n   \n    oss_fill_read_response_header(resp, resp_headers);\n    oss_check_create_select_object_meta_status(resp, s, meta_params);\n\n    return s;\n}\n\naos_status_t *oss_put_object_tagging(const oss_request_options_t *options,\r\n    const aos_string_t *bucket,\r\n    const aos_string_t *object,\n    aos_list_t *tag_list,\r\n    aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    apr_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_list_t body;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\r\n    //init query_params\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_TAGGING, \"\");\r\n\r\n    //init headers\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_object_request(options, bucket, object, HTTP_PUT,\n        &req, query_params, headers, NULL, 0, &resp);\r\n\r\n    build_object_tagging_body(options->pool, tag_list, &body);\r\n    oss_write_request_body_from_buffer(&body, req);\r\n    s = oss_process_request(options, req, resp);\r\n\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_get_object_tagging(const oss_request_options_t *options,\r\n    const aos_string_t *bucket,\r\n    const aos_string_t *object,\n    aos_list_t *tag_list,\r\n    aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    int res;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_TAGGING, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_object_request(options, bucket, object, HTTP_GET,\n        &req, query_params, headers, NULL, 0, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        return s;\r\n    }\r\n\r\n    res = oss_get_tagging_parse_from_body(options->pool, &resp->body, tag_list);\r\n    if (res != AOSE_OK) {\r\n        aos_xml_error_status_set(s, res);\r\n    }\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_delete_object_tagging(const oss_request_options_t *options,\r\n    const aos_string_t *bucket,\r\n    const aos_string_t *object,\n    aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_table_t *headers = NULL;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n    oss_ensure_object_name_valid(object);\r\n\r\n    query_params = aos_table_create_if_null(options, query_params, 1);\r\n    apr_table_add(query_params, OSS_TAGGING, \"\");\r\n\r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n\r\n    oss_init_object_request(options, bucket, object, HTTP_DELETE,\n        &req, query_params, headers, NULL, 0, &resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n    oss_fill_read_response_header(resp, resp_headers);\r\n\r\n    return s;\r\n}"
  },
  {
    "path": "oss_c_sdk/oss_resumable.c",
    "content": "#include \"aos_log.h\"\r\n#include \"aos_define.h\"\r\n#include \"aos_util.h\"\r\n#include \"aos_string.h\"\r\n#include \"aos_status.h\"\r\n#include \"aos_crc64.h\"\r\n#include \"oss_auth.h\"\r\n#include \"oss_util.h\"\r\n#include \"oss_xml.h\"\r\n#include \"oss_api.h\"\r\n#include \"oss_resumable.h\"\r\n\r\nint32_t oss_get_thread_num(oss_resumable_clt_params_t *clt_params)\r\n{\r\n    if ((NULL == clt_params) || (clt_params->thread_num <= 0 || clt_params->thread_num > 1024)) {\r\n        return 1;\r\n    }\r\n    return clt_params->thread_num;\r\n}\r\n\r\nvoid oss_get_upload_checkpoint_path(oss_resumable_clt_params_t *clt_params, const aos_string_t *filepath, \r\n                             aos_pool_t *pool, aos_string_t *checkpoint_path)\r\n{\r\n    if ((NULL == checkpoint_path) || (NULL == clt_params) || (!clt_params->enable_checkpoint)) {\r\n        return;\r\n    }\r\n\r\n    if (aos_is_null_string(&clt_params->checkpoint_path)) {\r\n        int len = filepath->len + strlen(\".ucp\") + 1;\r\n        char *buffer = (char *)aos_pcalloc(pool, len);\r\n        apr_snprintf(buffer, len, \"%.*s.ucp\", filepath->len, filepath->data);\r\n        aos_str_set(checkpoint_path , buffer);\r\n        return;\r\n    }\r\n\r\n    checkpoint_path->data = clt_params->checkpoint_path.data;\r\n    checkpoint_path->len = clt_params->checkpoint_path.len;\r\n}\r\n\r\nvoid oss_get_download_checkpoint_path(oss_resumable_clt_params_t *clt_params, const aos_string_t *filepath, \r\n                             aos_pool_t *pool, aos_string_t *checkpoint_path)\r\n{\r\n    if ((NULL == checkpoint_path) || (NULL == clt_params) || (!clt_params->enable_checkpoint)) {\r\n        return;\r\n    }\r\n\r\n    if (aos_is_null_string(&clt_params->checkpoint_path)) {\r\n        int len = filepath->len + strlen(\".dcp\") + 1;\r\n        char *buffer = (char *)aos_pcalloc(pool, len);\r\n        apr_snprintf(buffer, len, \"%.*s.dcp\", filepath->len, filepath->data);\r\n        aos_str_set(checkpoint_path , buffer);\r\n        return;\r\n    }\r\n\r\n    checkpoint_path->data = clt_params->checkpoint_path.data;\r\n    checkpoint_path->len = clt_params->checkpoint_path.len;\r\n}\r\n\r\nint oss_get_file_info(const aos_string_t *filepath, aos_pool_t *pool, apr_finfo_t *finfo) \r\n{\r\n    apr_status_t s;\r\n    char buf[256];\r\n    apr_file_t *thefile;\r\n\r\n    s = apr_file_open(&thefile, filepath->data, APR_READ, APR_UREAD | APR_GREAD, pool);\r\n    if (s != APR_SUCCESS) {\r\n        aos_error_log(\"apr_file_open failure, code:%d %s.\", s, apr_strerror(s, buf, sizeof(buf)));\r\n        return s;\r\n    }\r\n\r\n    s = apr_file_info_get(finfo, APR_FINFO_SIZE | APR_FINFO_MTIME, thefile);\r\n    if (s != APR_SUCCESS) {\r\n        apr_file_close(thefile);\r\n        aos_error_log(\"apr_file_info_get failure, code:%d %s.\", s, apr_strerror(s, buf, sizeof(buf)));\r\n        return s;\r\n    }\r\n    apr_file_close(thefile);\r\n\r\n    return AOSE_OK;\r\n}\r\n\r\nint oss_does_file_exist(const aos_string_t *filepath, aos_pool_t *pool) \r\n{\r\n    apr_status_t s;\r\n    apr_file_t *thefile;\r\n\r\n    s = apr_file_open(&thefile, filepath->data, APR_READ, APR_UREAD | APR_GREAD, pool);\r\n    if (s != APR_SUCCESS) {\r\n        return AOS_FALSE;\r\n    }\r\n\r\n    apr_file_close(thefile);\r\n    return AOS_TRUE;\r\n}\r\n\r\nint oss_open_checkpoint_file(aos_pool_t *pool,  aos_string_t *checkpoint_path, oss_checkpoint_t *checkpoint) \r\n{\r\n    apr_status_t s;\r\n    apr_file_t *thefile;\r\n    char buf[256];\r\n    s = apr_file_open(&thefile, checkpoint_path->data, APR_CREATE | APR_WRITE, APR_UREAD | APR_UWRITE | APR_GREAD, pool);\r\n    if (s == APR_SUCCESS) {\r\n        checkpoint->thefile = thefile;\r\n    } else {\r\n        aos_error_log(\"apr_file_open failure, code:%d %s.\", s, apr_strerror(s, buf, sizeof(buf)));\r\n    }\r\n    return s;\r\n}\r\n\r\nint oss_get_part_num(int64_t file_size, int64_t part_size)\r\n{\r\n    int64_t num = 0;\r\n    int64_t left = 0;\r\n    left = (file_size % part_size == 0) ? 0 : 1;\r\n    num = file_size / part_size + left;\r\n    return (int)num;\r\n}\r\n\r\nvoid oss_build_parts(int64_t file_size, int64_t part_size, oss_checkpoint_part_t *parts)\r\n{\r\n    int i = 0;\r\n    for (; i * part_size < file_size; i++) {\r\n        parts[i].index = i;\r\n        parts[i].offset = i * part_size;\r\n        parts[i].size = aos_min(part_size, (file_size - i * part_size));\r\n        parts[i].completed = AOS_FALSE;\r\n    }\r\n}\r\n\r\nvoid oss_build_thread_params(oss_thread_params_t *thd_params, int part_num, \r\n                             aos_pool_t *parent_pool, oss_request_options_t *options, \r\n                             aos_string_t *bucket, aos_string_t *object, aos_string_t *filepath,\r\n                             aos_string_t *upload_id, oss_checkpoint_part_t *parts,\r\n                             oss_part_task_result_t *result) \r\n{\r\n    int i = 0;\r\n    aos_pool_t *subpool = NULL;\r\n    oss_config_t *config = NULL;\r\n    aos_http_controller_t *ctl;\r\n    for (; i < part_num; i++) {\r\n        aos_pool_create(&subpool, parent_pool); \r\n        config = oss_config_create(subpool);\r\n        memcpy(config, options->config, sizeof(oss_config_t));\r\n        ctl = aos_http_controller_create(subpool, 0);\r\n        thd_params[i].options.config = config;\r\n        thd_params[i].options.ctl = ctl;\r\n        thd_params[i].options.ctl->options = options->ctl->options;\r\n        thd_params[i].options.pool = subpool;\r\n        thd_params[i].bucket = bucket;\r\n        thd_params[i].object = object;\r\n        thd_params[i].filepath = filepath;\r\n        thd_params[i].upload_id = upload_id;\r\n        thd_params[i].part = parts + i;\r\n        thd_params[i].result = result + i;\r\n        thd_params[i].result->part = thd_params[i].part;\r\n    }\r\n}\r\n\r\nvoid oss_destroy_thread_pool(oss_thread_params_t *thd_params, int part_num) \r\n{\r\n    int i = 0;\r\n    for (; i < part_num; i++) {\r\n        aos_pool_destroy(thd_params[i].options.pool);\r\n    }\r\n}\r\n\r\nvoid oss_set_task_tracker(oss_thread_params_t *thd_params, int part_num, \r\n                          apr_uint32_t *launched, apr_uint32_t *failed, apr_uint32_t *completed,\r\n                          apr_queue_t *failed_parts, apr_queue_t *completed_parts) \r\n{\r\n    int i = 0;\r\n    for (; i < part_num; i++) {\r\n        thd_params[i].launched = launched;\r\n        thd_params[i].failed = failed;\r\n        thd_params[i].completed = completed;\r\n        thd_params[i].failed_parts = failed_parts;\r\n        thd_params[i].completed_parts = completed_parts;\r\n    }\r\n}\r\n\r\nint oss_verify_checkpoint_md5(aos_pool_t *pool, const oss_checkpoint_t *checkpoint)\r\n{\r\n    return AOS_TRUE;\r\n}\r\n\r\nvoid oss_build_upload_checkpoint(aos_pool_t *pool, oss_checkpoint_t *checkpoint, aos_string_t *file_path, \r\n                                 apr_finfo_t *finfo, aos_string_t *upload_id, int64_t part_size) \r\n{\r\n    int i = 0;\r\n\r\n    checkpoint->cp_type = OSS_CP_UPLOAD;\r\n    aos_str_set(&checkpoint->file_path, aos_pstrdup(pool, file_path));\r\n    checkpoint->file_size = finfo->size;\r\n    checkpoint->file_last_modified = finfo->mtime;\r\n    aos_str_set(&checkpoint->upload_id, aos_pstrdup(pool, upload_id));\r\n\r\n    checkpoint->part_size = part_size;\r\n    for (; i * part_size < finfo->size; i++) {\r\n        checkpoint->parts[i].index = i;\r\n        checkpoint->parts[i].offset = i * part_size;\r\n        checkpoint->parts[i].size = aos_min(part_size, (finfo->size - i * part_size));\r\n        checkpoint->parts[i].completed = AOS_FALSE;\r\n        aos_str_set(&checkpoint->parts[i].etag , \"\");\r\n    }\r\n    checkpoint->part_num = i;\r\n}\r\n\r\nvoid oss_build_download_checkpoint(aos_pool_t *pool, oss_checkpoint_t *checkpoint, aos_string_t *file_path, \r\n        const char *object_name, int64_t object_size, const char *object_last_modified, \r\n        const char *object_etag, int64_t part_size) \r\n{\r\n    int i = 0;\r\n\r\n    checkpoint->cp_type = OSS_CP_DOWNLOAD;\r\n    checkpoint->thefile = NULL;\r\n    aos_str_set(&checkpoint->file_path, aos_pstrdup(pool, file_path));\r\n    aos_str_set(&checkpoint->object_name, object_name);\r\n    checkpoint->object_size = object_size;\r\n    aos_str_set(&checkpoint->object_last_modified, object_last_modified);\r\n    aos_str_set(&checkpoint->object_etag, object_etag);\r\n\r\n    checkpoint->part_size = part_size;\r\n    for (; i * part_size < object_size; i++) {\r\n        checkpoint->parts[i].index = i;\r\n        checkpoint->parts[i].offset = i * part_size;\r\n        checkpoint->parts[i].size = aos_min(part_size, (object_size - i * part_size));\r\n        checkpoint->parts[i].completed = AOS_FALSE;\r\n        aos_str_set(&checkpoint->parts[i].etag , \"\");\r\n    }\r\n    checkpoint->part_num = i;\r\n}\r\n\r\n\r\nint oss_dump_checkpoint(aos_pool_t *pool, const oss_checkpoint_t *checkpoint) \r\n{\r\n    char *xml_body = NULL;\r\n    apr_status_t s;\r\n    char buf[256];\r\n    apr_size_t len;\r\n    \r\n    // to xml\r\n    xml_body = oss_build_checkpoint_xml(pool, checkpoint);\r\n    if (NULL == xml_body) {\r\n        return AOSE_OUT_MEMORY;\r\n    }\r\n\r\n    // truncate to empty\r\n    s = apr_file_trunc(checkpoint->thefile, 0);\r\n    if (s != APR_SUCCESS) {\r\n        aos_error_log(\"apr_file_write failure, code:%d %s.\", s, apr_strerror(s, buf, sizeof(buf)));\r\n        return AOSE_FILE_TRUNC_ERROR;\r\n    }\r\n   \r\n    // write to file\r\n    len = strlen(xml_body);\r\n    s = apr_file_write(checkpoint->thefile, xml_body, &len);\r\n    if (s != APR_SUCCESS) {\r\n        aos_error_log(\"apr_file_write failure, code:%d %s.\", s, apr_strerror(s, buf, sizeof(buf)));\r\n        return AOSE_FILE_WRITE_ERROR;\r\n    }\r\n\r\n    // flush file\r\n    s = apr_file_flush(checkpoint->thefile);\r\n    if (s != APR_SUCCESS) {\r\n        aos_error_log(\"apr_file_flush failure, code:%d %s.\", s, apr_strerror(s, buf, sizeof(buf)));\r\n        return AOSE_FILE_FLUSH_ERROR;\r\n    }\r\n\r\n    return AOSE_OK;\r\n}\r\n\r\nint oss_load_checkpoint(aos_pool_t *pool, const aos_string_t *filepath, oss_checkpoint_t *checkpoint) \r\n{\r\n    apr_status_t s;\r\n    char buf[256];\r\n    apr_size_t len;\r\n    apr_finfo_t finfo;\r\n    char *xml_body = NULL;\r\n    apr_file_t *thefile;\r\n\r\n    // open file\r\n    s = apr_file_open(&thefile, filepath->data, APR_READ, APR_UREAD | APR_GREAD, pool);\r\n    if (s != APR_SUCCESS) {\r\n        aos_error_log(\"apr_file_open failure, code:%d %s.\", s, apr_strerror(s, buf, sizeof(buf)));\r\n        return AOSE_OPEN_FILE_ERROR;\r\n    }\r\n\r\n    // get file stat\r\n    s = apr_file_info_get(&finfo, APR_FINFO_SIZE, thefile);\r\n    if (s != APR_SUCCESS) {\r\n        aos_error_log(\"apr_file_info_get failure, code:%d %s.\", s, apr_strerror(s, buf, sizeof(buf)));\r\n        apr_file_close(thefile);\r\n        return AOSE_FILE_INFO_ERROR;\r\n    }\r\n\r\n    xml_body = (char *)aos_palloc(pool, (apr_size_t)(finfo.size + 1));\r\n\r\n    // read\r\n    s = apr_file_read_full(thefile, xml_body, (apr_size_t)finfo.size, &len);\r\n    if (s != APR_SUCCESS) {\r\n        aos_error_log(\"apr_file_read_full failure, code:%d %s.\", s, apr_strerror(s, buf, sizeof(buf)));\r\n        apr_file_close(thefile);\r\n        return AOSE_FILE_READ_ERROR;\r\n    }\r\n    apr_file_close(thefile);\r\n    xml_body[len] = '\\0';\r\n\r\n    // parse\r\n    return oss_checkpoint_parse_from_body(pool, xml_body, checkpoint);\r\n}\r\n\r\nint oss_is_upload_checkpoint_valid(aos_pool_t *pool, oss_checkpoint_t *checkpoint, apr_finfo_t *finfo)\r\n{\r\n    if (oss_verify_checkpoint_md5(pool, checkpoint) && \r\n            (checkpoint->cp_type == OSS_CP_UPLOAD) && \r\n            (checkpoint->file_size == finfo->size) && \r\n            (checkpoint->file_last_modified == finfo->mtime)) {\r\n        return AOS_TRUE;\r\n    }\r\n    return AOS_FALSE;\r\n}\r\n\r\nint oss_is_download_checkpoint_valid(aos_pool_t *pool, \r\n        oss_checkpoint_t *checkpoint, const char *object_name, \r\n        int64_t object_size, const char *object_last_modified, \r\n        const char *object_etag)\r\n{\r\n    if (oss_verify_checkpoint_md5(pool, checkpoint) && \r\n            (checkpoint->cp_type == OSS_CP_DOWNLOAD) && \r\n            (checkpoint->object_size == object_size) && \r\n            !strcmp(checkpoint->object_last_modified.data, object_last_modified) &&\r\n            !strcasecmp(checkpoint->object_etag.data, object_etag)) {\r\n        return AOS_TRUE;\r\n    }\r\n    return AOS_FALSE;\r\n}\r\n\r\n\r\n\r\nvoid oss_update_checkpoint(aos_pool_t *pool, oss_checkpoint_t *checkpoint, \r\n        int32_t part_index, aos_string_t *etag, uint64_t crc64) \r\n{\r\n    char *p = NULL;\r\n    checkpoint->parts[part_index].completed = AOS_TRUE;\r\n    p = apr_pstrdup(pool, etag->data);\r\n    aos_str_set(&checkpoint->parts[part_index].etag, p);\r\n    checkpoint->parts[part_index].crc64 = crc64;\r\n}\r\n\r\nvoid oss_get_checkpoint_todo_parts(oss_checkpoint_t *checkpoint, int *part_num, oss_checkpoint_part_t *parts)\r\n{\r\n    int i = 0;\r\n    int idx = 0;\r\n    for (; i < checkpoint->part_num; i++) {\r\n        if (!checkpoint->parts[i].completed) {\r\n            parts[idx].index = checkpoint->parts[i].index;\r\n            parts[idx].offset = checkpoint->parts[i].offset;\r\n            parts[idx].size = checkpoint->parts[i].size;\r\n            parts[idx].completed = checkpoint->parts[i].completed;\r\n            parts[idx].crc64 = checkpoint->parts[i].crc64;\r\n            idx++;\r\n        }\r\n    }\r\n    *part_num = idx;\r\n}\r\n\r\nstatic void oss_get_checkpoint_done_parts_size(oss_checkpoint_t *checkpoint, int64_t *size)\r\n{\r\n    int i = 0;\r\n    int64_t total = 0;\r\n    for (; i < checkpoint->part_num; i++) {\r\n        if (checkpoint->parts[i].completed) {\r\n            total += checkpoint->parts[i].size;\r\n        }\r\n    }\r\n    *size = total;\r\n}\r\n\r\nvoid * APR_THREAD_FUNC upload_part(apr_thread_t *thd, void *data) \r\n{\r\n    aos_status_t *s = NULL;\r\n    oss_thread_params_t *params = NULL;\r\n    oss_upload_file_t *upload_file = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    int part_num;\r\n    char *etag;\r\n    \r\n    params = (oss_thread_params_t *)data;\r\n    if (apr_atomic_read32(params->failed) > 0) {\r\n        apr_atomic_inc32(params->launched);\r\n        return NULL;\r\n    }\r\n\r\n    part_num = params->part->index + 1;\r\n    upload_file = oss_create_upload_file(params->options.pool);\r\n    aos_str_set(&upload_file->filename, params->filepath->data);\r\n    upload_file->file_pos = params->part->offset;\r\n    upload_file->file_last = params->part->offset + params->part->size;\r\n\r\n    s = oss_upload_part_from_file(&params->options, params->bucket, params->object, params->upload_id,\r\n        part_num, upload_file, &resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        apr_atomic_inc32(params->failed);\r\n        params->result->s = s;\r\n        apr_queue_push(params->failed_parts, params->result);\r\n        return s;\r\n    }\r\n\r\n    etag = apr_pstrdup(params->options.pool, (char*)apr_table_get(resp_headers, \"ETag\"));\r\n    aos_str_set(&params->result->etag, etag);\r\n    apr_atomic_inc32(params->completed);\r\n    apr_queue_push(params->completed_parts, params->result);\r\n    return NULL;\r\n}\r\n\r\naos_status_t *oss_resumable_upload_file_without_cp(oss_request_options_t *options,\r\n                                                   aos_string_t *bucket, \r\n                                                   aos_string_t *object, \r\n                                                   aos_string_t *filepath,                           \r\n                                                   aos_table_t *headers,\r\n                                                   aos_table_t *params,\r\n                                                   int32_t thread_num,\r\n                                                   int64_t part_size,\r\n                                                   apr_finfo_t *finfo,\r\n                                                   oss_progress_callback progress_callback,\r\n                                                   aos_table_t **resp_headers,\r\n                                                   aos_list_t *resp_body) \r\n{\r\n    aos_pool_t *subpool = NULL;\r\n    aos_pool_t *parent_pool = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_status_t *ret = NULL;\r\n    aos_list_t completed_part_list;\r\n    oss_complete_part_content_t *complete_content = NULL;\r\n    aos_string_t upload_id;\r\n    oss_checkpoint_part_t *parts;\r\n    oss_part_task_result_t *results;\r\n    oss_part_task_result_t *task_res;\r\n    oss_thread_params_t *thd_params;\r\n    aos_table_t *cb_headers = NULL;\r\n    apr_thread_pool_t *thdp;\r\n    apr_uint32_t launched = 0;\r\n    apr_uint32_t failed = 0;\r\n    apr_uint32_t completed = 0;\r\n    apr_uint32_t total_num = 0;\r\n    apr_queue_t *failed_parts;\r\n    apr_queue_t *completed_parts;\r\n    int64_t consume_bytes = 0;\r\n    void *task_result;\r\n    char *part_num_str;\r\n    char *etag;\r\n    int part_num = 0;\r\n    int i = 0;\r\n    int rv;\r\n\r\n    // prepare\r\n    parent_pool = options->pool;\r\n    ret = aos_status_create(parent_pool);\r\n    part_num = oss_get_part_num(finfo->size, part_size);\r\n    parts = (oss_checkpoint_part_t *)aos_palloc(parent_pool, sizeof(oss_checkpoint_part_t) * part_num);\r\n    oss_build_parts(finfo->size, part_size, parts);\r\n    results = (oss_part_task_result_t *)aos_palloc(parent_pool, sizeof(oss_part_task_result_t) * part_num);\r\n    thd_params = (oss_thread_params_t *)aos_palloc(parent_pool, sizeof(oss_thread_params_t) * part_num);\r\n    oss_build_thread_params(thd_params, part_num, parent_pool, options, bucket, object, filepath, &upload_id, parts, results);\r\n    \r\n    // init upload\r\n    aos_pool_create(&subpool, parent_pool);\r\n    options->pool = subpool;\r\n    s = oss_init_multipart_upload(options, bucket, object, &upload_id, headers, resp_headers);\r\n    if (!aos_status_is_ok(s)) {\r\n        s = aos_status_dup(parent_pool, s);\r\n        aos_pool_destroy(subpool);\r\n        options->pool = parent_pool;\r\n        return s;\r\n    }\r\n    aos_str_set(&upload_id, apr_pstrdup(parent_pool, upload_id.data));\r\n    options->pool = parent_pool;\r\n    aos_pool_destroy(subpool);\r\n\r\n    // upload parts    \r\n    rv = apr_thread_pool_create(&thdp, 0, thread_num, parent_pool);\r\n    if (APR_SUCCESS != rv) {\r\n        aos_status_set(ret, rv, AOS_CREATE_THREAD_POOL_ERROR_CODE, NULL); \r\n        return ret;\r\n    }\r\n\r\n    rv = apr_queue_create(&failed_parts, part_num, parent_pool);\r\n    if (APR_SUCCESS != rv) {\r\n        aos_status_set(ret, rv, AOS_CREATE_QUEUE_ERROR_CODE, NULL); \r\n        return ret;\r\n    }\r\n\r\n    rv = apr_queue_create(&completed_parts, part_num, parent_pool);\r\n    if (APR_SUCCESS != rv) {\r\n        aos_status_set(ret, rv, AOS_CREATE_QUEUE_ERROR_CODE, NULL); \r\n        return ret;\r\n    }\r\n\r\n    // launch\r\n    oss_set_task_tracker(thd_params, part_num, &launched, &failed, &completed, failed_parts, completed_parts);\r\n    for (i = 0; i < part_num; i++) {\r\n        apr_thread_pool_push(thdp, upload_part, thd_params + i, 0, NULL);\r\n    }\r\n\r\n    // wait until all tasks exit\r\n    total_num = apr_atomic_read32(&launched) + apr_atomic_read32(&failed) + apr_atomic_read32(&completed);\r\n    for ( ; total_num < (apr_uint32_t)part_num; ) {\r\n        rv = apr_queue_trypop(completed_parts, &task_result);\r\n        if (rv == APR_EINTR || rv == APR_EAGAIN) {\r\n            apr_sleep(1000);\r\n        } else if(rv == APR_EOF) {\r\n            break;\r\n        } else if(rv == APR_SUCCESS) {\r\n            task_res = (oss_part_task_result_t*)task_result;\r\n            if (NULL != progress_callback) {\r\n                consume_bytes += task_res->part->size;\r\n                progress_callback(consume_bytes, finfo->size);\r\n            }\r\n        }\r\n        total_num = apr_atomic_read32(&launched) + apr_atomic_read32(&failed) + apr_atomic_read32(&completed);\r\n    }\r\n\r\n    // deal with left successful parts\r\n    while(APR_SUCCESS == apr_queue_trypop(completed_parts, &task_result)) {\r\n        task_res = (oss_part_task_result_t*)task_result;\r\n        if (NULL != progress_callback) {\r\n            consume_bytes += task_res->part->size;\r\n            progress_callback(consume_bytes, finfo->size);\r\n        }\r\n    }\r\n\r\n    // failed\r\n    if (apr_atomic_read32(&failed) > 0) {\r\n        apr_queue_pop(failed_parts, &task_result);\r\n        task_res = (oss_part_task_result_t*)task_result;\r\n        s = aos_status_dup(parent_pool, task_res->s);\r\n        oss_destroy_thread_pool(thd_params, part_num);\r\n        return s;\r\n    }\r\n\r\n    // successful\r\n    aos_pool_create(&subpool, parent_pool);\r\n    aos_list_init(&completed_part_list);\r\n    for (i = 0; i < part_num; i++) {\r\n        complete_content = oss_create_complete_part_content(subpool);\r\n        part_num_str = apr_psprintf(subpool, \"%d\", thd_params[i].part->index + 1);\r\n        aos_str_set(&complete_content->part_number, part_num_str);\r\n        etag = apr_pstrdup(subpool, thd_params[i].result->etag.data);\r\n        aos_str_set(&complete_content->etag, etag);\r\n        aos_list_add_tail(&complete_content->node, &completed_part_list);\r\n    }\r\n    oss_destroy_thread_pool(thd_params, part_num);\r\n\r\n    // complete upload\r\n    options->pool = subpool;\r\n    if (NULL != headers && NULL != apr_table_get(headers, OSS_CALLBACK)) {\r\n        cb_headers = aos_table_make(subpool, 2);\r\n        apr_table_set(cb_headers, OSS_CALLBACK, apr_table_get(headers, OSS_CALLBACK));\r\n        if (NULL != apr_table_get(headers, OSS_CALLBACK_VAR)) {\r\n            apr_table_set(cb_headers, OSS_CALLBACK_VAR, apr_table_get(headers, OSS_CALLBACK_VAR));\r\n        }\r\n    }\r\n    s = oss_do_complete_multipart_upload(options, bucket, object, &upload_id, \r\n        &completed_part_list, cb_headers, NULL, resp_headers, resp_body);\r\n    s = aos_status_dup(parent_pool, s);\r\n    aos_pool_destroy(subpool);\r\n    options->pool = parent_pool;\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_resumable_upload_file_with_cp(oss_request_options_t *options,\r\n                                                aos_string_t *bucket, \r\n                                                aos_string_t *object, \r\n                                                aos_string_t *filepath,                           \r\n                                                aos_table_t *headers,\r\n                                                aos_table_t *params,\r\n                                                int32_t thread_num,\r\n                                                int64_t part_size,\r\n                                                aos_string_t *checkpoint_path,\r\n                                                apr_finfo_t *finfo,\r\n                                                oss_progress_callback progress_callback,\r\n                                                aos_table_t **resp_headers,\r\n                                                aos_list_t *resp_body) \r\n{\r\n    aos_pool_t *subpool = NULL;\r\n    aos_pool_t *parent_pool = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_status_t *ret = NULL;\r\n    aos_list_t completed_part_list;\r\n    oss_complete_part_content_t *complete_content = NULL;\r\n    aos_string_t upload_id;\r\n    oss_checkpoint_part_t *parts;\r\n    oss_part_task_result_t *results;\r\n    oss_part_task_result_t *task_res;\r\n    oss_thread_params_t *thd_params;\r\n    aos_table_t *cb_headers = NULL;\r\n    apr_thread_pool_t *thdp;\r\n    apr_uint32_t launched = 0;\r\n    apr_uint32_t failed = 0;\r\n    apr_uint32_t completed = 0;\r\n    apr_uint32_t total_num = 0;\r\n    apr_queue_t *failed_parts;\r\n    apr_queue_t *completed_parts;\r\n    oss_checkpoint_t *checkpoint = NULL;\r\n    int need_init_upload = AOS_TRUE;\r\n    int has_left_result = AOS_FALSE;\r\n    int64_t consume_bytes = 0;\r\n    void *task_result;\r\n    char *part_num_str;\r\n    int part_num = 0;\r\n    int i = 0;\r\n    int rv;\r\n\r\n    // checkpoint\r\n    parent_pool = options->pool;\r\n    ret = aos_status_create(parent_pool);\r\n    checkpoint = oss_create_checkpoint_content(parent_pool);\r\n    if(oss_does_file_exist(checkpoint_path, parent_pool)) {\r\n        if (AOSE_OK == oss_load_checkpoint(parent_pool, checkpoint_path, checkpoint) && \r\n            oss_is_upload_checkpoint_valid(parent_pool, checkpoint, finfo)) {\r\n                aos_str_set(&upload_id, checkpoint->upload_id.data);\r\n                need_init_upload = AOS_FALSE;\r\n        } else {\r\n            apr_file_remove(checkpoint_path->data, parent_pool);\r\n        }\r\n    }\r\n\r\n    if (need_init_upload) {\r\n        // init upload \r\n        aos_pool_create(&subpool, parent_pool);\r\n        options->pool = subpool;\r\n        s = oss_init_multipart_upload(options, bucket, object, &upload_id, headers, resp_headers);\r\n        if (!aos_status_is_ok(s)) {\r\n            s = aos_status_dup(parent_pool, s);\r\n            aos_pool_destroy(subpool);\r\n            options->pool = parent_pool;\r\n            return s;\r\n        }\r\n        aos_str_set(&upload_id, apr_pstrdup(parent_pool, upload_id.data));\r\n        options->pool = parent_pool;\r\n        aos_pool_destroy(subpool);\r\n\r\n        // build checkpoint\r\n        oss_build_upload_checkpoint(parent_pool, checkpoint, filepath, finfo, &upload_id, part_size);\r\n    }\r\n\r\n    rv = oss_open_checkpoint_file(parent_pool, checkpoint_path, checkpoint);\r\n    if (rv != APR_SUCCESS) {\r\n        aos_status_set(ret, rv, AOS_OPEN_FILE_ERROR_CODE, NULL);\r\n        return ret;\r\n    }\r\n\r\n    // prepare\r\n    ret = aos_status_create(parent_pool);\r\n    parts = (oss_checkpoint_part_t *)aos_palloc(parent_pool, sizeof(oss_checkpoint_part_t) * (checkpoint->part_num));\r\n    oss_get_checkpoint_todo_parts(checkpoint, &part_num, parts);\r\n    oss_get_checkpoint_done_parts_size(checkpoint, &consume_bytes);\r\n    results = (oss_part_task_result_t *)aos_palloc(parent_pool, sizeof(oss_part_task_result_t) * part_num);\r\n    thd_params = (oss_thread_params_t *)aos_palloc(parent_pool, sizeof(oss_thread_params_t) * part_num);\r\n    oss_build_thread_params(thd_params, part_num, parent_pool, options, bucket, object, filepath, &upload_id, parts, results);\r\n\r\n    // upload parts    \r\n    rv = apr_thread_pool_create(&thdp, 0, thread_num, parent_pool);\r\n    if (APR_SUCCESS != rv) {\r\n        aos_status_set(ret, rv, AOS_CREATE_THREAD_POOL_ERROR_CODE, NULL); \r\n        return ret;\r\n    }\r\n\r\n    rv = apr_queue_create(&failed_parts, part_num, parent_pool);\r\n    if (APR_SUCCESS != rv) {\r\n        aos_status_set(ret, rv, AOS_CREATE_QUEUE_ERROR_CODE, NULL); \r\n        return ret;\r\n    }\r\n\r\n    rv = apr_queue_create(&completed_parts, part_num, parent_pool);\r\n    if (APR_SUCCESS != rv) {\r\n        aos_status_set(ret, rv, AOS_CREATE_QUEUE_ERROR_CODE, NULL); \r\n        return ret;\r\n    }\r\n\r\n    // launch\r\n    oss_set_task_tracker(thd_params, part_num, &launched, &failed, &completed, failed_parts, completed_parts);\r\n    for (i = 0; i < part_num; i++) {\r\n        apr_thread_pool_push(thdp, upload_part, thd_params + i, 0, NULL);\r\n    }\r\n\r\n    // wait until all tasks exit\r\n    total_num = apr_atomic_read32(&launched) + apr_atomic_read32(&failed) + apr_atomic_read32(&completed);\r\n    for ( ; total_num < (apr_uint32_t)part_num; ) {\r\n        rv = apr_queue_trypop(completed_parts, &task_result);\r\n        if (rv == APR_EINTR || rv == APR_EAGAIN) {\r\n            apr_sleep(1000);\r\n        } else if(rv == APR_EOF) {\r\n            break;\r\n        } else if(rv == APR_SUCCESS) {\r\n            task_res = (oss_part_task_result_t*)task_result;\r\n            oss_update_checkpoint(parent_pool, checkpoint, task_res->part->index, &task_res->etag, 0);\r\n            rv = oss_dump_checkpoint(parent_pool, checkpoint);\r\n            if (rv != AOSE_OK) {\r\n                int idx = task_res->part->index;\r\n                aos_status_set(ret, rv, AOS_WRITE_FILE_ERROR_CODE, NULL);\r\n                apr_atomic_inc32(&failed);\r\n                thd_params[idx].result->s = ret;\r\n                apr_queue_push(failed_parts, thd_params[idx].result);\r\n            }\r\n            if (NULL != progress_callback) {\r\n                consume_bytes += task_res->part->size;\r\n                progress_callback(consume_bytes, finfo->size);\r\n            }\r\n        }\r\n        total_num = apr_atomic_read32(&launched) + apr_atomic_read32(&failed) + apr_atomic_read32(&completed);\r\n    }\r\n\r\n    // deal with left successful parts\r\n    while(APR_SUCCESS == apr_queue_trypop(completed_parts, &task_result)) {\r\n        task_res = (oss_part_task_result_t*)task_result;\r\n        oss_update_checkpoint(parent_pool, checkpoint, task_res->part->index, &task_res->etag, 0);\r\n        consume_bytes += task_res->part->size;\r\n        has_left_result = AOS_TRUE;\r\n    }\r\n    if (has_left_result) {\r\n        rv = oss_dump_checkpoint(parent_pool, checkpoint);\r\n        if (rv != AOSE_OK) {\r\n            aos_status_set(ret, rv, AOS_WRITE_FILE_ERROR_CODE, NULL);\r\n            return ret;\r\n        }\r\n        if (NULL != progress_callback) {\r\n            progress_callback(consume_bytes, finfo->size);\r\n        }\r\n    }\r\n    apr_file_close(checkpoint->thefile);\r\n\r\n    // failed\r\n    if (apr_atomic_read32(&failed) > 0) {\r\n        apr_queue_pop(failed_parts, &task_result);\r\n        task_res = (oss_part_task_result_t*)task_result;\r\n        s = aos_status_dup(parent_pool, task_res->s);\r\n        oss_destroy_thread_pool(thd_params, part_num);\r\n        return s;\r\n    }\r\n    \r\n    // successful\r\n    aos_pool_create(&subpool, parent_pool);\r\n    aos_list_init(&completed_part_list);\r\n    for (i = 0; i < checkpoint->part_num; i++) {\r\n        complete_content = oss_create_complete_part_content(subpool);\r\n        part_num_str = apr_psprintf(subpool, \"%d\", checkpoint->parts[i].index + 1);\r\n        aos_str_set(&complete_content->part_number, part_num_str);\r\n        aos_str_set(&complete_content->etag, checkpoint->parts[i].etag.data);\r\n        aos_list_add_tail(&complete_content->node, &completed_part_list);\r\n    }\r\n    oss_destroy_thread_pool(thd_params, part_num);\r\n\r\n    // complete upload\r\n    options->pool = subpool;\r\n    if (NULL != headers && NULL != apr_table_get(headers, OSS_CALLBACK)) {\r\n        cb_headers = aos_table_make(subpool, 2);\r\n        apr_table_set(cb_headers, OSS_CALLBACK, apr_table_get(headers, OSS_CALLBACK));\r\n        if (NULL != apr_table_get(headers, OSS_CALLBACK_VAR)) {\r\n            apr_table_set(cb_headers, OSS_CALLBACK_VAR, apr_table_get(headers, OSS_CALLBACK_VAR));\r\n        }\r\n    }\r\n    s = oss_do_complete_multipart_upload(options, bucket, object, &upload_id, \r\n        &completed_part_list, cb_headers, NULL, resp_headers, resp_body);\r\n    s = aos_status_dup(parent_pool, s);\r\n    aos_pool_destroy(subpool);\r\n    options->pool = parent_pool;\r\n\r\n    // remove chepoint file\r\n    apr_file_remove(checkpoint_path->data, parent_pool);\r\n    \r\n    return s;\r\n}\r\n\r\naos_status_t *oss_resumable_upload_file(oss_request_options_t *options,\r\n                                        aos_string_t *bucket, \r\n                                        aos_string_t *object, \r\n                                        aos_string_t *filepath,                           \r\n                                        aos_table_t *headers,\r\n                                        aos_table_t *params,\r\n                                        oss_resumable_clt_params_t *clt_params, \r\n                                        oss_progress_callback progress_callback,\r\n                                        aos_table_t **resp_headers,\r\n                                        aos_list_t *resp_body) \r\n{\r\n    int32_t thread_num = 0;\r\n    int64_t part_size = 0;\r\n    aos_string_t checkpoint_path;\r\n    aos_pool_t *sub_pool;\r\n    apr_finfo_t finfo;\r\n    aos_status_t *s;\r\n    int res;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    thread_num = oss_get_thread_num(clt_params);\r\n\r\n    aos_pool_create(&sub_pool, options->pool);\r\n    res = oss_get_file_info(filepath, sub_pool, &finfo);\r\n    if (res != AOSE_OK) {\r\n        aos_error_log(\"Open read file fail, filename:%s\\n\", filepath->data);\r\n        s = aos_status_create(options->pool);\r\n        aos_file_error_status_set(s, res);\r\n        aos_pool_destroy(sub_pool);\r\n        return s;\r\n    }\r\n    part_size = clt_params->part_size;\r\n    oss_get_part_size(finfo.size, &part_size);\r\n\r\n    if (NULL != clt_params && clt_params->enable_checkpoint) {\r\n        oss_get_upload_checkpoint_path(clt_params, filepath, sub_pool, &checkpoint_path);\r\n        s = oss_resumable_upload_file_with_cp(options, bucket, object, filepath, headers, params, thread_num, \r\n            part_size, &checkpoint_path, &finfo, progress_callback, resp_headers, resp_body);\r\n    } else {\r\n        s = oss_resumable_upload_file_without_cp(options, bucket, object, filepath, headers, params, thread_num, \r\n            part_size, &finfo, progress_callback, resp_headers, resp_body);\r\n    }\r\n\r\n    aos_pool_destroy(sub_pool);\r\n    return s;\r\n}\r\n\r\n\r\nstatic void download_part(oss_request_options_t *options,\r\n                          const aos_string_t *bucket, \r\n                          const aos_string_t *object, \r\n                          oss_checkpoint_part_t *part, \r\n                          const aos_string_t *filepath, \r\n                          oss_part_task_result_t *result)\r\n{\r\n    aos_status_t *s = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n\r\n    int rv;\r\n    aos_http_request_t *req = NULL;\r\n    aos_http_response_t *resp = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_table_t *query_params = NULL;\r\n    aos_file_buf_t *fb = NULL;\r\n    apr_off_t offset = 0;\r\n   \r\n    headers = aos_table_create_if_null(options, headers, 0);\r\n    query_params = aos_table_create_if_null(options, query_params, 0);\r\n\r\n    oss_headers_add_range(options->pool, headers, part->offset, part->size);\r\n\r\n    fb = aos_create_file_buf(options->pool);\r\n   \r\n    if ((rv = aos_open_file_for_write_notrunc(options->pool, \r\n                    filepath->data, fb)) != AOSE_OK) {\r\n        aos_error_log(\"Open write file fail, filename:%s\\n\", filepath->data);\r\n        \r\n        result->s = aos_status_create(options->pool);\r\n        aos_file_error_status_set(result->s, rv);\r\n\r\n        return;\r\n    }\r\n    offset = part->offset;\r\n    apr_file_seek(fb->file, APR_SET, &offset);\r\n\r\n    oss_init_object_request(options, bucket, object, HTTP_GET,\r\n            &req, query_params, headers, NULL, 0, &resp);\r\n    oss_init_read_response_body_to_fb(fb, filepath, resp);\r\n\r\n    s = oss_process_request(options, req, resp);\r\n\r\n    if (!aos_status_is_ok(s)) {\r\n        result->s = s; \r\n    } else {\r\n        // success\r\n        const char *etag;\r\n\r\n        oss_fill_read_response_header(resp, &resp_headers);\r\n        \r\n        etag = apr_table_get(resp_headers, \"Etag\");\r\n        if (etag) {\r\n            aos_str_set(&result->etag, apr_pstrdup(options->pool, etag));\r\n        }\r\n\r\n        result->crc64 = resp->crc64;\r\n        result->s = s;\r\n    }\r\n    apr_file_close(fb->file);\r\n\r\n    return;\r\n}\r\n\r\nvoid *APR_THREAD_FUNC download_part_thread(apr_thread_t *thd, void *data)\r\n{\r\n    apr_queue_t *task_queue = (apr_queue_t *)data;\r\n\r\n    while (1) {\r\n        apr_status_t status;\r\n        oss_thread_params_t *params;\r\n\r\n        status = apr_queue_trypop(task_queue, (void **)&params);\r\n        if (status != APR_SUCCESS)\r\n            break;\r\n\r\n        if (apr_atomic_read32(params->failed) > 0) {\r\n            // skip unstarted parts if parts failure happened\r\n            apr_queue_push(params->task_result_queue, NULL);\r\n        } else {\r\n            download_part(&params->options, \r\n                    params->bucket, params->object,\r\n                    params->part, params->filepath,\r\n                    params->result);\r\n\r\n            apr_queue_push(params->task_result_queue, params->result);\r\n        }\r\n    }\r\n    return NULL;\r\n}\r\n\r\naos_status_t *oss_resumable_download_file_internal(oss_request_options_t *options,\r\n                                                   aos_string_t *bucket, \r\n                                                   aos_string_t *object, \r\n                                                   aos_string_t *filepath,                           \r\n                                                   aos_table_t *headers,\r\n                                                   aos_table_t *params,\r\n                                                   int32_t thread_num,\r\n                                                   int64_t part_size,\r\n                                                   aos_string_t *checkpoint_path,\r\n                                                   oss_progress_callback progress_callback,\r\n                                                   aos_table_t **resp_headers)\r\n{\r\n    aos_status_t *s = NULL;\r\n    int need_init_download = AOS_TRUE;\r\n    oss_checkpoint_t *checkpoint = NULL;\r\n\r\n    aos_table_t *head_resp_headers = NULL;\r\n    aos_string_t tmp_filename;\r\n    \r\n    int i = 0;\r\n    int part_num = 0;\r\n    int64_t object_size = 0;\r\n    const char *object_size_str = NULL;\r\n    const char *object_last_modified = NULL;\r\n    const char *object_etag = NULL;\r\n    const char *crc64_str = NULL;\r\n    oss_checkpoint_part_t *parts;\r\n    oss_part_task_result_t *results;\r\n    oss_part_task_result_t *task_res;\r\n    oss_thread_params_t *thd_params;\r\n    apr_uint32_t failed = 0;\r\n    apr_queue_t *failed_parts;\r\n    apr_queue_t *completed_parts;\r\n    apr_queue_t *task_queue;\r\n    apr_queue_t *task_result_queue;\r\n    int64_t consume_bytes = 0;\r\n    aos_file_buf_t *fb = NULL;\r\n    apr_thread_t **thd_ids = NULL;\r\n    int rv = AOSE_OK;\r\n    \r\n    oss_get_temporary_file_name(options->pool, filepath, &tmp_filename);\r\n\r\n    // head object info\r\n    s = oss_head_object(options, bucket, object, headers, &head_resp_headers);\r\n    *resp_headers = head_resp_headers;\r\n    if (!aos_status_is_ok(s))\r\n        return s;\r\n\r\n    object_last_modified = apr_table_get(head_resp_headers, \"Last-Modified\");\r\n    object_etag = apr_table_get(head_resp_headers, \"ETag\");\r\n    object_size_str = apr_table_get(head_resp_headers, OSS_CONTENT_LENGTH);\r\n    crc64_str = apr_table_get(head_resp_headers, OSS_HASH_CRC64_ECMA);\r\n\r\n    if (!object_last_modified || !object_etag || !object_size_str) {\r\n        // Invalid http response header \r\n        s = aos_status_create(options->pool);\r\n        aos_status_set(s, AOSE_INTERNAL_ERROR, AOS_SERVER_ERROR_CODE, \"Unexpected response header\");\r\n        return s;\r\n    }\r\n    object_size = aos_atoi64(object_size_str);\r\n    \r\n    // ensure part_num will not exceed OSS_MAX_PART_NUM\r\n    if (part_size * OSS_MAX_PART_NUM < object_size) {\r\n        part_size = (object_size + OSS_MAX_PART_NUM - 1) / OSS_MAX_PART_NUM;\r\n\r\n        aos_warn_log(\"Part number larger than max limit, \"\r\n                \"part size Changed to:%\" APR_INT64_T_FMT \"\\n\",\r\n                part_size);\r\n    }\r\n\r\n    need_init_download = AOS_TRUE;\r\n    checkpoint = oss_create_checkpoint_content(options->pool);\r\n    if (checkpoint_path) {\r\n        do {\r\n            apr_finfo_t tmp_finfo;\r\n\r\n            if (!oss_does_file_exist(checkpoint_path, options->pool))\r\n                break;\r\n\r\n            if (AOSE_OK != oss_load_checkpoint(options->pool, checkpoint_path, checkpoint))\r\n                break;\r\n            if (!oss_is_download_checkpoint_valid(options->pool, checkpoint, object->data, \r\n                        object_size, object_last_modified, object_etag))\r\n                break;\r\n\r\n            if (!oss_does_file_exist(&tmp_filename, options->pool))\r\n                break;\r\n            \r\n            if (apr_stat(&tmp_finfo, tmp_filename.data, APR_FINFO_SIZE, \r\n                        options->pool) != APR_SUCCESS || \r\n                    object_size != tmp_finfo.size)\r\n                break;\r\n            need_init_download = AOS_FALSE;\r\n        } while (0);\r\n    }\r\n\r\n    if (need_init_download) {\r\n        aos_debug_log(\"need init download\\n\");\r\n\r\n        // build checkpoint\r\n        oss_build_download_checkpoint(options->pool, checkpoint, filepath, object->data, \r\n                object_size, object_last_modified, object_etag, part_size);\r\n    }\r\n\r\n    if (checkpoint_path) {\r\n        if ((rv = oss_open_checkpoint_file(options->pool, checkpoint_path, checkpoint)) != APR_SUCCESS) {\r\n            s = aos_status_create(options->pool);\r\n            aos_status_set(s, rv, AOS_OPEN_FILE_ERROR_CODE, NULL);\r\n            return s;\r\n        }\r\n    }\r\n    \r\n    // Open and truncate the tmp file.\r\n    fb = aos_create_file_buf(options->pool);\r\n    if ((rv = aos_open_file_for_write_notrunc(options->pool, tmp_filename.data, fb)) != AOSE_OK) {\r\n        if (checkpoint->thefile)\r\n            apr_file_close(checkpoint->thefile);\r\n\r\n        aos_error_log(\"Open write file fail, filename:%s\\n\", tmp_filename.data);\r\n        aos_file_error_status_set(s, rv);\r\n        return s;\r\n    }\r\n    apr_file_trunc(fb->file, object_size);\r\n    apr_file_close(fb->file);\r\n\r\n    parts = (oss_checkpoint_part_t *)aos_palloc(options->pool, sizeof(*parts) * checkpoint->part_num);\r\n    oss_get_checkpoint_todo_parts(checkpoint, &part_num, parts);\r\n    oss_get_checkpoint_done_parts_size(checkpoint, &consume_bytes);\r\n    results = (oss_part_task_result_t *)aos_palloc(options->pool, sizeof(*results) * part_num);\r\n    thd_params = (oss_thread_params_t *)aos_palloc(options->pool, sizeof(*thd_params) * part_num);\r\n    oss_build_thread_params(thd_params, part_num, options->pool, options, bucket, object, &tmp_filename, NULL, parts, results);\r\n    thd_ids = (apr_thread_t **)aos_palloc(options->pool, sizeof(*thd_ids) * thread_num);\r\n\r\n    aos_debug_log(\"object_size: %\" APR_INT64_T_FMT \", total parts: %d, parts to download: %d\\n\", \r\n            object_size, checkpoint->part_num, part_num);\r\n\r\n    if ((rv = apr_queue_create(&failed_parts, part_num, options->pool)) != APR_SUCCESS || \r\n            (rv = apr_queue_create(&completed_parts, part_num, options->pool)) != APR_SUCCESS ||\r\n            (rv = apr_queue_create(&task_queue, part_num, options->pool)) != APR_SUCCESS ||\r\n            (rv = apr_queue_create(&task_result_queue, part_num, options->pool)) != APR_SUCCESS) {\r\n        if (checkpoint->thefile)\r\n            apr_file_close(checkpoint->thefile);\r\n\r\n        s = aos_status_create(options->pool);\r\n        aos_status_set(s, rv, AOS_CREATE_QUEUE_ERROR_CODE, NULL); \r\n        return s;\r\n    }\r\n    // launch\r\n    for (i = 0; i < part_num; i++) {\r\n        thd_params[i].failed = &failed;\r\n        thd_params[i].task_result_queue = task_result_queue;\r\n\r\n        apr_queue_push(task_queue, &thd_params[i]);\r\n    }\r\n\r\n    // download parts    \r\n    for (i = 0; i < thread_num; i++) {\r\n        apr_thread_create(&thd_ids[i], NULL, download_part_thread, (void *)task_queue, options->pool);\r\n    }\r\n\r\n    // wait until all tasks exit\r\n    for (i = 0 ; i < part_num; i++) {\r\n        rv = apr_queue_pop(task_result_queue, (void **)&task_res);\r\n        if (task_res && aos_status_is_ok(task_res->s) &&\r\n                !strcasecmp(object_etag, task_res->etag.data)) {\r\n            // completed part\r\n            oss_update_checkpoint(options->pool, checkpoint, task_res->part->index, \r\n                    &task_res->etag, task_res->crc64);\r\n            if (checkpoint->thefile) {\r\n                if ((rv = oss_dump_checkpoint(options->pool, checkpoint)) != AOSE_OK) {\r\n                    aos_warn_log(\"failed to persist checkpoint file %s: %d\\n\", \r\n                            checkpoint_path->data, rv);\r\n                }\r\n            }\r\n            apr_queue_push(completed_parts, task_res);\r\n\r\n            if (progress_callback) {\r\n                consume_bytes += task_res->part->size;\r\n                progress_callback(consume_bytes, object_size);\r\n            }\r\n        } else if (task_res) {\r\n            // failed parts\r\n            apr_atomic_inc32(&failed);\r\n            apr_queue_push(failed_parts, task_res);\r\n        } else {\r\n            // skipped parts\r\n        }\r\n    }\r\n    if (checkpoint->thefile) {\r\n        apr_file_close(checkpoint->thefile);\r\n        checkpoint->thefile = NULL;\r\n    }\r\n\r\n    aos_debug_log(\"completed: %u, failed: %u, skipped: %u\\n\", \r\n            apr_queue_size(completed_parts), apr_queue_size(failed_parts), \r\n            part_num - apr_queue_size(completed_parts) - apr_queue_size(failed_parts));\r\n\r\n    if (apr_atomic_read32(&failed) > 0) {\r\n        // any parts failure\r\n        apr_queue_pop(failed_parts, (void **)&task_res);\r\n        s = aos_status_dup(options->pool, task_res->s);\r\n    } else {\r\n        // complete download for all parts\r\n        rv = AOSE_OK;\r\n\r\n        if (is_enable_crc(options) && crc64_str) {\r\n            uint64_t iter_crc64 = 0;\r\n            for (i = 0; i < checkpoint->part_num; i++) {\r\n                iter_crc64 = aos_crc64_combine(iter_crc64, checkpoint->parts[i].crc64,\r\n                        checkpoint->parts[i].size);\r\n            }\r\n            if ((rv = oss_check_crc_consistent(iter_crc64, head_resp_headers, s)) != AOSE_OK) {\r\n                if (checkpoint_path) {\r\n                    // checkpoint file should be removed here, otherwise retry downloads will \r\n                    // always be skipped and failed here in crc64 check\r\n                    if (apr_file_remove(checkpoint_path->data, options->pool) != APR_SUCCESS) {\r\n                        aos_warn_log(\"Failed to remove checkpoint file %s\\n\", \r\n                                checkpoint_path->data);\r\n                    }\r\n                }\r\n                apr_file_remove(tmp_filename.data, options->pool);\r\n            }\r\n        }\r\n\r\n        if (rv == AOSE_OK) {\r\n            if (apr_file_rename(tmp_filename.data, filepath->data, options->pool) != APR_SUCCESS) {\r\n                s = aos_status_create(options->pool);\r\n                aos_status_set(s, rv, AOS_RENAME_FILE_ERROR_CODE, NULL);\r\n            } else {\r\n                if (checkpoint_path) {\r\n                    apr_file_remove(checkpoint_path->data, options->pool);\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    for (i = 0; i < thread_num; i++) {\r\n        apr_status_t retval;\r\n        apr_thread_join(&retval, thd_ids[i]);\r\n    }\r\n    oss_destroy_thread_pool(thd_params, part_num);\r\n\r\n    return s;\r\n}\r\n\r\naos_status_t *oss_resumable_download_file(oss_request_options_t *options,\r\n                                        aos_string_t *bucket, \r\n                                        aos_string_t *object, \r\n                                        aos_string_t *filepath,                           \r\n                                        aos_table_t *headers,\r\n                                        aos_table_t *params,\r\n                                        oss_resumable_clt_params_t *clt_params, \r\n                                        oss_progress_callback progress_callback,\r\n                                        aos_table_t **resp_headers) \r\n{\r\n    int32_t thread_num = 0;\r\n    int64_t part_size = 0;\r\n    aos_string_t checkpoint_path;\r\n    aos_pool_t *sub_pool;\r\n    aos_status_t *s;\r\n\r\n    oss_ensure_bucket_name_valid(bucket);\r\n\r\n    thread_num = oss_get_thread_num(clt_params);\r\n    aos_pool_create(&sub_pool, options->pool);\r\n    \r\n    part_size = clt_params->part_size;\r\n    \r\n    if (NULL != clt_params && clt_params->enable_checkpoint) {\r\n        oss_get_download_checkpoint_path(clt_params, filepath, sub_pool, &checkpoint_path);\r\n        s = oss_resumable_download_file_internal(options, bucket, object, filepath, headers, params, thread_num, \r\n            part_size, &checkpoint_path, progress_callback, resp_headers);\r\n    } else {\r\n        s = oss_resumable_download_file_internal(options, bucket, object, filepath, headers, params, thread_num, \r\n            part_size, NULL, progress_callback, resp_headers);\r\n    }\r\n\r\n    aos_pool_destroy(sub_pool);\r\n    return s;\r\n}\r\n"
  },
  {
    "path": "oss_c_sdk/oss_resumable.h",
    "content": "#ifndef LIBOSS_RESUMABLE_H\n#define LIBOSS_RESUMABLE_H\n\n#include \"aos_define.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"apr_atomic.h\"\n#include \"apr_queue.h\"\n#include \"apr_thread_pool.h\"\n#include \"oss_define.h\"\n\nAOS_CPP_START\n\n#define OSS_CP_UPLOAD   1\n#define OSS_CP_DOWNLOAD 2\n\ntypedef struct {\n    int32_t index;  // the index of part, start from 0\n    int64_t offset; // the offset point of part\n    int64_t size;   // the size of part\n    int completed;  // AOS_TRUE completed, AOS_FALSE uncompleted\n    aos_string_t etag; // the etag of part, for upload\n    uint64_t crc64;\n} oss_checkpoint_part_t;\n\ntypedef struct {\n    aos_string_t md5;      // the md5 of checkout content\n    int cp_type;           // 1 upload, 2 download\n    apr_file_t *thefile;   // the handle of checkpoint file\n\n    aos_string_t file_path;        // local file path \n    int64_t    file_size;          // local file size, for upload\n    apr_time_t file_last_modified; // local file last modified time, for upload\n    aos_string_t file_md5;         // the md5 of the local file content, for upload, reserved\n\n    aos_string_t object_name;          // object name\n    int64_t object_size;               // object size, for download\n    aos_string_t object_last_modified; // object last modified time, for download\n    aos_string_t object_etag;          // object etag, for download\n\n    aos_string_t upload_id;  // upload id\n\n    int  part_num;                 // the total number of parts\n    int64_t part_size;             // the part size, byte\n    oss_checkpoint_part_t *parts;  // the parts of local or object, from 0\n} oss_checkpoint_t;\n\ntypedef struct {\n    oss_checkpoint_part_t *part;\n    aos_status_t *s;\n    aos_string_t etag; \n    uint64_t crc64;\n} oss_part_task_result_t;\n\ntypedef struct {\n    oss_request_options_t options;\n    aos_string_t *bucket;\n    aos_string_t *object; \n    aos_string_t *upload_id;\n    aos_string_t *filepath;\n    oss_checkpoint_part_t *part;\n    oss_part_task_result_t *result;\n\n    apr_uint32_t *launched;        // the number of launched part tasks, use atomic\n    apr_uint32_t *failed;          // the number of failed part tasks, use atomic\n    apr_uint32_t *completed;       // the number of completed part tasks, use atomic\n    apr_queue_t  *failed_parts;    // the queue of failed parts tasks, thread safe\n    apr_queue_t  *completed_parts; // the queue of completed parts tasks, thread safe\n    apr_queue_t  *task_result_queue;\n} oss_thread_params_t;\n\nint32_t oss_get_thread_num(oss_resumable_clt_params_t *clt_params);\n\nvoid oss_get_upload_checkpoint_path(oss_resumable_clt_params_t *clt_params, const aos_string_t *filepath, \n                             aos_pool_t *pool, aos_string_t *checkpoint_path);\n\nvoid oss_get_download_checkpoint_path(oss_resumable_clt_params_t *clt_params, const aos_string_t *filepath, \n                             aos_pool_t *pool, aos_string_t *checkpoint_path);\n\nint oss_get_file_info(const aos_string_t *filepath, aos_pool_t *pool, apr_finfo_t *finfo);\n\nint oss_does_file_exist(const aos_string_t *filepath, aos_pool_t *pool); \n\nint oss_open_checkpoint_file(aos_pool_t *pool,  aos_string_t *checkpoint_path, oss_checkpoint_t *checkpoint);\n\nint oss_open_checkpoint_file(aos_pool_t *pool,  aos_string_t *checkpoint_path, oss_checkpoint_t *checkpoint); \n\nint oss_get_part_num(int64_t file_size, int64_t part_size);\n\nvoid oss_build_parts(int64_t file_size, int64_t part_size, oss_checkpoint_part_t *parts);\n\nvoid oss_build_thread_params(oss_thread_params_t *thr_params, int part_num, \n                             aos_pool_t *parent_pool, oss_request_options_t *options, \n                             aos_string_t *bucket, aos_string_t *object, aos_string_t *filepath,\n                             aos_string_t *upload_id, oss_checkpoint_part_t *parts,\n                             oss_part_task_result_t *result);\n\nvoid oss_destroy_thread_pool(oss_thread_params_t *thr_params, int part_num);\n\nvoid oss_set_task_tracker(oss_thread_params_t *thr_params, int part_num, \n                          apr_uint32_t *launched, apr_uint32_t *failed, apr_uint32_t *completed,\n                          apr_queue_t *failed_parts, apr_queue_t *completed_parts);\n\nint oss_verify_checkpoint_md5(aos_pool_t *pool, const oss_checkpoint_t *checkpoint);\n\nvoid oss_build_upload_checkpoint(aos_pool_t *pool, oss_checkpoint_t *checkpoint, aos_string_t *file_path, \n                                 apr_finfo_t *finfo, aos_string_t *upload_id, int64_t part_size);\n\nvoid oss_build_download_checkpoint(aos_pool_t *pool, oss_checkpoint_t *checkpoint, aos_string_t *file_path, \n        const char *object_name, int64_t object_size, const char *object_last_modified, \n        const char *object_etag, int64_t part_size);\n\nint oss_dump_checkpoint(aos_pool_t *pool, const oss_checkpoint_t *checkpoint);\n\nint oss_load_checkpoint(aos_pool_t *pool, const aos_string_t *filepath, oss_checkpoint_t *checkpoint);\n\nint oss_is_upload_checkpoint_valid(aos_pool_t *pool, oss_checkpoint_t *checkpoint, apr_finfo_t *finfo);\n\nint oss_is_download_checkpoint_valid(aos_pool_t *pool, oss_checkpoint_t *checkpoint, const char *object_name,\n    int64_t object_size, const char *object_last_modified,\n    const char *object_etag);\n\nvoid oss_update_checkpoint(aos_pool_t *pool, oss_checkpoint_t *checkpoint, int32_t part_index, \n        aos_string_t *etag, uint64_t crc64);\n\nvoid oss_get_checkpoint_todo_parts(oss_checkpoint_t *checkpoint, int *part_num, oss_checkpoint_part_t *parts);\n\nvoid *APR_THREAD_FUNC upload_part(apr_thread_t *thd, void *data);\n\naos_status_t *oss_resumable_upload_file_without_cp(oss_request_options_t *options,\n                                                   aos_string_t *bucket, \n                                                   aos_string_t *object, \n                                                   aos_string_t *filepath,                           \n                                                   aos_table_t *headers,\n                                                   aos_table_t *params,\n                                                   int32_t thread_num,\n                                                   int64_t part_size,\n                                                   apr_finfo_t *finfo,\n                                                   oss_progress_callback progress_callback,\n                                                   aos_table_t **resp_headers,\n                                                   aos_list_t *resp_body);\n\naos_status_t *oss_resumable_upload_file_with_cp(oss_request_options_t *options,\n                                                aos_string_t *bucket, \n                                                aos_string_t *object, \n                                                aos_string_t *filepath,                           \n                                                aos_table_t *headers,\n                                                aos_table_t *params,\n                                                int32_t thread_num,\n                                                int64_t part_size,\n                                                aos_string_t *checkpoint_path,\n                                                apr_finfo_t *finfo,\n                                                oss_progress_callback progress_callback,\n                                                aos_table_t **resp_headers,\n                                                aos_list_t *resp_body);\n\n\naos_status_t *oss_resumable_download_file_internal(oss_request_options_t *options,\n                                                   aos_string_t *bucket, \n                                                   aos_string_t *object, \n                                                   aos_string_t *filepath,                           \n                                                   aos_table_t *headers,\n                                                   aos_table_t *params,\n                                                   int32_t thread_num,\n                                                   int64_t part_size,\n                                                   aos_string_t *checkpoint_path,\n                                                   oss_progress_callback progress_callback,\n                                                   aos_table_t **resp_headers);\n\nAOS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/oss_util.c",
    "content": "#include \"aos_string.h\"\n#include \"aos_util.h\"\n#include \"aos_log.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"aos_crc64.h\"\n\n#ifndef WIN32\n#include<sys/socket.h>\n#include<netinet/in.h>\n#include<arpa/inet.h>\n#endif\n\nstatic char *default_content_type = \"application/octet-stream\";\n\nstatic oss_content_type_t file_type[] = {\n    {\"html\", \"text/html\"},\n    {\"htm\", \"text/html\"},\n    {\"shtml\", \"text/html\"},\n    {\"css\", \"text/css\"},\n    {\"xml\", \"text/xml\"},\n    {\"gif\", \"image/gif\"},\n    {\"jpeg\", \"image/jpeg\"},\n    {\"jpg\", \"image/jpeg\"},\n    {\"js\", \"application/x-javascript\"},\n    {\"atom\", \"application/atom+xml\"},\n    {\"rss\", \"application/rss+xml\"},\n    {\"mml\", \"text/mathml\"},\n    {\"txt\", \"text/plain\"},\n    {\"jad\", \"text/vnd.sun.j2me.app-descriptor\"},\n    {\"wml\", \"text/vnd.wap.wml\"},\n    {\"htc\", \"text/x-component\"},\n    {\"png\", \"image/png\"},\n    {\"tif\", \"image/tiff\"},\n    {\"tiff\", \"image/tiff\"},\n    {\"wbmp\", \"image/vnd.wap.wbmp\"},\n    {\"ico\", \"image/x-icon\"},\n    {\"jng\", \"image/x-jng\"},\n    {\"bmp\", \"image/x-ms-bmp\"},\n    {\"svg\", \"image/svg+xml\"},\n    {\"svgz\", \"image/svg+xml\"},\n    {\"webp\", \"image/webp\"},\n    {\"jar\", \"application/java-archive\"},\n    {\"war\", \"application/java-archive\"},\n    {\"ear\", \"application/java-archive\"},\n    {\"hqx\", \"application/mac-binhex40\"},\n    {\"doc \", \"application/msword\"},\n    {\"pdf\", \"application/pdf\"},\n    {\"ps\", \"application/postscript\"},\n    {\"eps\", \"application/postscript\"},\n    {\"ai\", \"application/postscript\"},\n    {\"rtf\", \"application/rtf\"},\n    {\"xls\", \"application/vnd.ms-excel\"},\n    {\"ppt\", \"application/vnd.ms-powerpoint\"},\n    {\"wmlc\", \"application/vnd.wap.wmlc\"},\n    {\"kml\", \"application/vnd.google-earth.kml+xml\"},\n    {\"kmz\", \"application/vnd.google-earth.kmz\"},\n    {\"7z\", \"application/x-7z-compressed\"},\n    {\"cco\", \"application/x-cocoa\"},\n    {\"jardiff\", \"application/x-java-archive-diff\"},\n    {\"jnlp\", \"application/x-java-jnlp-file\"},\n    {\"run\", \"application/x-makeself\"},\n    {\"pl\", \"application/x-perl\"},\n    {\"pm\", \"application/x-perl\"},\n    {\"prc\", \"application/x-pilot\"},\n    {\"pdb\", \"application/x-pilot\"},\n    {\"rar\", \"application/x-rar-compressed\"},\n    {\"rpm\", \"application/x-redhat-package-manager\"},\n    {\"sea\", \"application/x-sea\"},\n    {\"swf\", \"application/x-shockwave-flash\"},\n    {\"sit\", \"application/x-stuffit\"},\n    {\"tcl\", \"application/x-tcl\"},\n    {\"tk\", \"application/x-tcl\"},\n    {\"der\", \"application/x-x509-ca-cert\"},\n    {\"pem\", \"application/x-x509-ca-cert\"},\n    {\"crt\", \"application/x-x509-ca-cert\"},\n    {\"xpi\", \"application/x-xpinstall\"},\n    {\"xhtml\", \"application/xhtml+xml\"},\n    {\"zip\", \"application/zip\"},\n    {\"wgz\", \"application/x-nokia-widget\"},\n    {\"bin\", \"application/octet-stream\"},\n    {\"exe\", \"application/octet-stream\"},\n    {\"dll\", \"application/octet-stream\"},\n    {\"deb\", \"application/octet-stream\"},\n    {\"dmg\", \"application/octet-stream\"},\n    {\"eot\", \"application/octet-stream\"},\n    {\"iso\", \"application/octet-stream\"},\n    {\"img\", \"application/octet-stream\"},\n    {\"msi\", \"application/octet-stream\"},\n    {\"msp\", \"application/octet-stream\"},\n    {\"msm\", \"application/octet-stream\"},\n    {\"mid\", \"audio/midi\"},\n    {\"midi\", \"audio/midi\"},\n    {\"kar\", \"audio/midi\"},\n    {\"mp3\", \"audio/mpeg\"},\n    {\"ogg\", \"audio/ogg\"},\n    {\"m4a\", \"audio/x-m4a\"},\n    {\"ra\", \"audio/x-realaudio\"},\n    {\"3gpp\", \"video/3gpp\"},\n    {\"3gp\", \"video/3gpp\"},\n    {\"mp4\", \"video/mp4\"},\n    {\"mpeg\", \"video/mpeg\"},\n    {\"mpg\", \"video/mpeg\"},\n    {\"mov\", \"video/quicktime\"},\n    {\"webm\", \"video/webm\"},\n    {\"flv\", \"video/x-flv\"},\n    {\"m4v\", \"video/x-m4v\"},\n    {\"mng\", \"video/x-mng\"},\n    {\"asx\", \"video/x-ms-asf\"},\n    {\"asf\", \"video/x-ms-asf\"},\n    {\"wmv\", \"video/x-ms-wmv\"},\n    {\"avi\", \"video/x-msvideo\"},\n    {\"ts\", \"video/MP2T\"},\n    {\"m3u8\", \"application/x-mpegURL\"},\n    {\"apk\", \"application/vnd.android.package-archive\"},\n    {NULL, NULL}\n};\n\nstatic int starts_with(const aos_string_t *str, const char *prefix) {\n    uint32_t i;\n    if(NULL != str && prefix && str->len > 0 && strlen(prefix)) {\n        for(i = 0; str->data[i] != '\\0' && prefix[i] != '\\0'; i++) {\n            if(prefix[i] != str->data[i]) return 0;\n        }\n        return 1;\n    }\n    return 0;\n}\n\nstatic void generate_proto(const oss_request_options_t *options, \n                           aos_http_request_t *req) \n{\n    const char *proto;\n    proto = starts_with(&options->config->endpoint, AOS_HTTP_PREFIX) ? \n            AOS_HTTP_PREFIX : \"\";\n    proto = starts_with(&options->config->endpoint, AOS_HTTPS_PREFIX) ? \n            AOS_HTTPS_PREFIX : proto;\n    req->proto = apr_psprintf(options->pool, \"%.*s\", (int)strlen(proto), proto);\n}\n\nstatic void generate_rtmp_proto(const oss_request_options_t *options,\n                           aos_http_request_t *req)\n{\n    const char *proto = AOS_RTMP_PREFIX;\n    req->proto = apr_psprintf(options->pool, \"%.*s\", (int)strlen(proto), proto);\n}\n\nint is_valid_ip(const char *str)\n{\n    if (!str) {\n        return 0;\n    }\n\n    if (INADDR_NONE == inet_addr(str) || INADDR_ANY == inet_addr(str)) {\n        return 0;\n    }\n    return 1;\n}\n\nvoid oss_preprocess_endpoint(aos_string_t *endpoint)\n{\n    int i;\n    char *str;\n \n    if (aos_string_is_empty(endpoint)) {\n        return;\n    }\n   \n    str = endpoint->data;\n    i = 0;\n    for (i = 0; i < endpoint->len; i++) {\n        if (str[i] == '/' || str[i] == '?' || str[i] == '#') {\n            break;\n        }\n    }\n    endpoint->len = i;\r\n}\n\nchar* oss_get_host_from_authority(const oss_request_options_t *options, aos_string_t *authority)\n{\n    char *ptr, *host;\n \n    if (aos_string_is_empty(authority)) {\n        return NULL;\n    }\n\n    host = aos_pstrdup(options->pool, authority);\n\n    for (ptr = host; ptr && (*ptr != '\\0'); ptr++) {\n        if (*ptr == '@') {\n            host = ptr + 1;\n            break;\n        }\n    }\n\n    for (ptr = host; ptr && (*ptr != '\\0'); ptr++) {\n        if (*ptr == ':') {\n            *ptr = '\\0';\n            break;\n        }\n    }\n\n    return host;\n}\n\noss_config_t *oss_config_create(aos_pool_t *p)\n{\n    return (oss_config_t *)aos_pcalloc(p, sizeof(oss_config_t));\n}\n\nvoid oss_config_resolve(aos_pool_t *pool, oss_config_t *config, aos_http_controller_t *ctl)\n{\n    if(!aos_is_null_string(&config->proxy_host)) {\n        // proxy host:port\n        if (config->proxy_port == 0) {\n            ctl->options->proxy_host = apr_psprintf(pool, \"%.*s\", config->proxy_host.len, config->proxy_host.data);\n        } else {\n            ctl->options->proxy_host = apr_psprintf(pool, \"%.*s:%d\", config->proxy_host.len, config->proxy_host.data, \n                config->proxy_port);\n        }\n        // authorize user:passwd\n        if (!aos_is_null_string(&config->proxy_user) && !aos_is_null_string(&config->proxy_passwd)) {\n            ctl->options->proxy_auth = apr_psprintf(pool, \"%.*s:%.*s\", config->proxy_user.len, \n                config->proxy_user.data, config->proxy_passwd.len, config->proxy_passwd.data);\n        }\n    }\n}\n\noss_request_options_t *oss_request_options_create(aos_pool_t *p)\n{\n    int s;\n    oss_request_options_t *options;\n\n    if(p == NULL) {\n        if ((s = aos_pool_create(&p, NULL)) != APR_SUCCESS) {\n            aos_fatal_log(\"aos_pool_create failure.\");\n            return NULL;\n        }\n    }\n\n    options = (oss_request_options_t *)aos_pcalloc(p, sizeof(oss_request_options_t));\n    options->pool = p;\n\n    return options;\n}\n\nvoid oss_get_object_uri(const oss_request_options_t *options,\n                        const aos_string_t *bucket,\n                        const aos_string_t *object,\n                        aos_http_request_t *req)\n{\n    int32_t proto_len;\n    const char *raw_endpoint_str;\n    aos_string_t raw_endpoint;\n\n    generate_proto(options, req);\n\n    proto_len = strlen(req->proto);\n\n    req->resource = apr_psprintf(options->pool, \"%.*s/%.*s\", \n                                 bucket->len, bucket->data, \n                                 object->len, object->data);\n\n    raw_endpoint.len = options->config->endpoint.len - proto_len;\n    raw_endpoint.data = options->config->endpoint.data + proto_len;\n    oss_preprocess_endpoint(&raw_endpoint);\n    raw_endpoint_str = oss_get_host_from_authority(options, &raw_endpoint);\n\n    if (options->config->is_cname) {\n        req->host = apr_psprintf(options->pool, \"%.*s\",\n                raw_endpoint.len, raw_endpoint.data);\n        req->uri = object->data;\n    } else if (is_valid_ip(raw_endpoint_str)) {\n        req->host = apr_psprintf(options->pool, \"%.*s\",\n                raw_endpoint.len, raw_endpoint.data);\n        req->uri = apr_psprintf(options->pool, \"%.*s/%.*s\",\n                                bucket->len, bucket->data, \n                                object->len, object->data);\n    } else {\n        req->host = apr_psprintf(options->pool, \"%.*s.%.*s\",\n                bucket->len, bucket->data, \n                raw_endpoint.len, raw_endpoint.data);\n        req->uri = object->data;\n    }\n\n}\n\nvoid oss_get_service_uri(const oss_request_options_t *options, \n                        aos_http_request_t *req)\n{\n    int32_t proto_len;\n    const char *raw_endpoint_str;\n    aos_string_t raw_endpoint;\n\n    generate_proto(options, req);\n\n    proto_len = strlen(req->proto);\n    raw_endpoint.len = options->config->endpoint.len - proto_len;\n    raw_endpoint.data = options->config->endpoint.data + proto_len;\n    oss_preprocess_endpoint(&raw_endpoint);\n    raw_endpoint_str = oss_get_host_from_authority(options, &raw_endpoint);\n\n    if (options->config->is_cname || \n        is_valid_ip(raw_endpoint_str))\n    {\n        req->host = apr_psprintf(options->pool, \"%.*s\", \n                raw_endpoint.len, raw_endpoint.data);\n    } else {\n        req->host = apr_psprintf(options->pool, \"%.*s\", \n                raw_endpoint.len, raw_endpoint.data);\n    }\n    req->uri = apr_psprintf(options->pool, \"%s\", \"\");\n}\n\nvoid oss_get_bucket_uri(const oss_request_options_t *options, \n                        const aos_string_t *bucket,\n                        aos_http_request_t *req)\n{\n    int32_t proto_len;\n    const char *raw_endpoint_str;\n    aos_string_t raw_endpoint;\n\n    generate_proto(options, req);\n\n    proto_len = strlen(req->proto);\n    raw_endpoint.len = options->config->endpoint.len - proto_len;\n    raw_endpoint.data = options->config->endpoint.data + proto_len;\n    oss_preprocess_endpoint(&raw_endpoint);\n    raw_endpoint_str = oss_get_host_from_authority(options, &raw_endpoint);\n\n    if (is_valid_ip(raw_endpoint_str)) {\n        req->resource = apr_psprintf(options->pool, \"%.*s\", \n                bucket->len, bucket->data);\n    } else {\n        req->resource = apr_psprintf(options->pool, \"%.*s/\", \n                bucket->len, bucket->data);\n    }\n    \n    if (options->config->is_cname || \n        is_valid_ip(raw_endpoint_str))\n    {\n        req->host = apr_psprintf(options->pool, \"%.*s\", \n                raw_endpoint.len, raw_endpoint.data);\n        req->uri = apr_psprintf(options->pool, \"%.*s\", bucket->len, \n                                bucket->data);\n    } else {\n        req->host = apr_psprintf(options->pool, \"%.*s.%.*s\", \n                bucket->len, bucket->data, \n                raw_endpoint.len, raw_endpoint.data);\n        req->uri = apr_psprintf(options->pool, \"%s\", \"\");\n    }\n}\n\nvoid oss_get_rtmp_uri(const oss_request_options_t *options,\n                      const aos_string_t *bucket,\n                      const aos_string_t *live_channel_id,\n                      aos_http_request_t *req)\n{\n    int32_t proto_len = 0;\n    const char *raw_endpoint_str = NULL;\n    aos_string_t raw_endpoint;\n\n    generate_rtmp_proto(options, req);\n\n    proto_len = strlen(req->proto);\n\n    req->resource = apr_psprintf(options->pool, \"%.*s/%.*s\", bucket->len, bucket->data,\n        live_channel_id->len, live_channel_id->data);\n\n    raw_endpoint.len = options->config->endpoint.len - proto_len;\n    raw_endpoint.data = options->config->endpoint.data + proto_len;\n    oss_preprocess_endpoint(&raw_endpoint);\n    raw_endpoint_str = oss_get_host_from_authority(options, &raw_endpoint);\n\n    if (options->config->is_cname) {\n        req->host = apr_psprintf(options->pool, \"%.*s\",\n                raw_endpoint.len, raw_endpoint.data);\n        req->uri = apr_psprintf(options->pool, \"live/%.*s\",\n            live_channel_id->len, live_channel_id->data);\n    } else if (is_valid_ip(raw_endpoint_str)) {\n        req->host = apr_psprintf(options->pool, \"%.*s\",\n                raw_endpoint.len, raw_endpoint.data);\n        req->uri = apr_psprintf(options->pool, \"%.*s/live/%.*s\",\n                                bucket->len, bucket->data,\n                                live_channel_id->len, live_channel_id->data);\n    } else {\n        req->host = apr_psprintf(options->pool, \"%.*s.%.*s\",\n                bucket->len, bucket->data,\n                raw_endpoint.len, raw_endpoint.data);\n        req->uri = apr_psprintf(options->pool, \"live/%.*s\",\n            live_channel_id->len, live_channel_id->data);\n    }\n}\n\nvoid oss_write_request_body_from_buffer(aos_list_t *buffer, \n                                        aos_http_request_t *req)\n{\n    aos_list_movelist(buffer, &req->body);\n    req->body_len = aos_buf_list_len(&req->body);\n}\n\nint oss_write_request_body_from_file(aos_pool_t *p, \n                                     const aos_string_t *filename, \n                                     aos_http_request_t *req)\n{\n    int res = AOSE_OK;\n    aos_file_buf_t *fb = aos_create_file_buf(p);\n    res = aos_open_file_for_all_read(p, filename->data, fb);\n    if (res != AOSE_OK) {\n        aos_error_log(\"Open read file fail, filename:%s\\n\", filename->data);\n        return res;\n    }\n\n    req->body_len = fb->file_last;\n    req->file_path = filename->data;\n    req->file_buf = fb;\n    req->type = BODY_IN_FILE;\n    req->read_body = aos_read_http_body_file;\n\n    return res;\n}\n\nint oss_write_request_body_from_upload_file(aos_pool_t *p, \n                                            oss_upload_file_t *upload_file, \n                                            aos_http_request_t *req)\n{\n    int res = AOSE_OK;\n    aos_file_buf_t *fb = aos_create_file_buf(p);\n    res = aos_open_file_for_range_read(p, upload_file->filename.data, \n            upload_file->file_pos, upload_file->file_last, fb);\n    if (res != AOSE_OK) {\n        aos_error_log(\"Open read file fail, filename:%s\\n\", \n                      upload_file->filename.data);\n        return res;\n    }\n\n    req->body_len = fb->file_last - fb->file_pos;\n    req->file_path = upload_file->filename.data;\n    req->file_buf = fb;\n    req->type = BODY_IN_FILE;\n    req->read_body = aos_read_http_body_file;\n\n    return res;\n}\n\nvoid oss_fill_read_response_body(aos_http_response_t *resp, \n                                 aos_list_t *buffer)\n{\n    if (NULL != buffer) {\n        aos_list_movelist(&resp->body, buffer);\n    }\n}\n\nint oss_init_read_response_body_to_file(aos_pool_t *p, \n                                        const aos_string_t *filename, \n                                        aos_http_response_t *resp)\n{\n    int res = AOSE_OK;\n    aos_file_buf_t *fb = aos_create_file_buf(p);\n    res = aos_open_file_for_write(p, filename->data, fb);\n    if (res != AOSE_OK) {\n        aos_error_log(\"Open write file fail, filename:%s\\n\", filename->data);\n        return res;\n    }\n    resp->file_path = filename->data;\n    resp->file_buf = fb;\n    resp->write_body = aos_write_http_body_file;\n    resp->type = BODY_IN_FILE;\n\n    return res;\n}\n\nint oss_init_read_response_body_to_fb(aos_file_buf_t *fb,\n                                      const aos_string_t *filename,\n                                      aos_http_response_t *resp)\n{\n    int res = AOSE_OK;\n\n    resp->file_path = filename->data;\n    resp->file_buf = fb;\n    resp->write_body = aos_write_http_body_file;\n    resp->type = BODY_IN_FILE;\n\n    return res;\n}\n\nvoid oss_fill_read_response_header(aos_http_response_t *resp, \n                                   aos_table_t **headers)\n{\n    if (NULL != headers && NULL != resp) {        \n        *headers = resp->headers;\n    }\n}\n\nvoid *oss_create_api_result_content(aos_pool_t *p, size_t size)\n{\n    void *result_content = NULL;\n    if (NULL == p) {\n        return NULL;\n    }\n    result_content = aos_palloc(p, size);\n    if (NULL == result_content) {\n        return NULL;\n    }\n    \n    aos_list_init((aos_list_t *)result_content);\n\n    return result_content;\n}\n\noss_list_bucket_content_t *oss_create_list_bucket_content(aos_pool_t *p)\n{\n    return (oss_list_bucket_content_t *)oss_create_api_result_content(\n            p, sizeof(oss_list_bucket_content_t));\n}\n\noss_bucket_info_t *oss_create_bucket_info(aos_pool_t *p)\n{\n    return (oss_bucket_info_t *)oss_create_api_result_content(\n            p, sizeof(oss_bucket_info_t));\n}\n\noss_list_object_content_t *oss_create_list_object_content(aos_pool_t *p)\n{\n    return (oss_list_object_content_t *)oss_create_api_result_content(\n            p, sizeof(oss_list_object_content_t));\n}\n\noss_list_object_common_prefix_t *oss_create_list_object_common_prefix(aos_pool_t *p)\n{\n    return (oss_list_object_common_prefix_t *)oss_create_api_result_content(\n            p, sizeof(oss_list_object_common_prefix_t));\n}\n\noss_list_multipart_upload_content_t *oss_create_list_multipart_upload_content(aos_pool_t *p)\n{\n    return (oss_list_multipart_upload_content_t*)oss_create_api_result_content(\n            p, sizeof(oss_list_multipart_upload_content_t));\n}\n\noss_list_part_content_t *oss_create_list_part_content(aos_pool_t *p)\n{\n    oss_list_part_content_t *list_part_content = NULL;\n    list_part_content = (oss_list_part_content_t*)oss_create_api_result_content(p,\n        sizeof(oss_list_part_content_t));\n\n    return list_part_content;\n}\n\noss_complete_part_content_t *oss_create_complete_part_content(aos_pool_t *p)\n{\n    oss_complete_part_content_t *complete_part_content = NULL;\n    complete_part_content = (oss_complete_part_content_t*)oss_create_api_result_content(\n            p, sizeof(oss_complete_part_content_t));\n\n    return complete_part_content;\n}\n\noss_list_object_params_t *oss_create_list_object_params(aos_pool_t *p)\n{\n    oss_list_object_params_t * params;\n    params = (oss_list_object_params_t *)aos_pcalloc(\n            p, sizeof(oss_list_object_params_t));\n    aos_list_init(&params->object_list);\n    aos_list_init(&params->common_prefix_list);\n    aos_str_set(&params->prefix, \"\");\n    aos_str_set(&params->marker, \"\");\n    aos_str_set(&params->delimiter, \"\");\n    params->truncated = 1;\n    params->max_ret = OSS_PER_RET_NUM;\n    return params;\n}\n\noss_list_buckets_params_t *oss_create_list_buckets_params(aos_pool_t *p)\n{\n    oss_list_buckets_params_t * params;\n    params = (oss_list_buckets_params_t *)aos_pcalloc(\n            p, sizeof(oss_list_buckets_params_t));\n    aos_str_set(&params->prefix, \"\");\n    aos_str_set(&params->marker, \"\");\n    aos_str_set(&params->next_marker, \"\");\n    aos_str_set(&params->owner_id, \"\");\n    aos_str_set(&params->owner_name, \"\");\n    aos_list_init(&params->bucket_list);\n    params->truncated = 0;\n    params->max_keys= 0;\n    return params;\n}\n\noss_list_upload_part_params_t *oss_create_list_upload_part_params(aos_pool_t *p)\n{\n    oss_list_upload_part_params_t *params;\n    params = (oss_list_upload_part_params_t *)aos_pcalloc(\n            p, sizeof(oss_list_upload_part_params_t));\n    aos_list_init(&params->part_list);\n    aos_str_set(&params->part_number_marker, \"\");\n    params->max_ret = OSS_PER_RET_NUM;\n    params->truncated = 1;\n    return params;\n}\n\noss_list_multipart_upload_params_t *oss_create_list_multipart_upload_params(aos_pool_t *p)\n{\n    oss_list_multipart_upload_params_t *params;\n    params = (oss_list_multipart_upload_params_t *)aos_pcalloc(\n            p, sizeof(oss_list_multipart_upload_params_t));\n    aos_list_init(&params->upload_list);\n    aos_str_set(&params->prefix, \"\");\n    aos_str_set(&params->key_marker, \"\");\n    aos_str_set(&params->upload_id_marker, \"\");\n    aos_str_set(&params->delimiter, \"\");\n    params->truncated = 1;\n    params->max_ret = OSS_PER_RET_NUM;\n    return params;\n}\n\noss_upload_part_copy_params_t *oss_create_upload_part_copy_params(aos_pool_t *p)\n{\n    return (oss_upload_part_copy_params_t *)aos_pcalloc(\n            p, sizeof(oss_upload_part_copy_params_t));\n}\n\nstatic APR_INLINE void oss_init_lifecycle_rule_date(oss_lifecycle_rule_date_t *date)\n{\n    date->days = INT_MAX;\n    aos_str_set(&date->created_before_date, \"\");\n}\n\noss_logging_config_content_t *oss_create_logging_rule_content(aos_pool_t *p)\n{\n    oss_logging_config_content_t *rule;\n    rule = (oss_logging_config_content_t *)aos_pcalloc(\n            p, sizeof(oss_logging_config_content_t));\n    aos_str_set(&rule->prefix, \"\");\n    aos_str_set(&rule->target_bucket, \"\");\n    rule->logging_enabled = 0;\n    return rule;\n}\n\noss_lifecycle_rule_content_t *oss_create_lifecycle_rule_content(aos_pool_t *p)\n{\n    oss_lifecycle_rule_content_t *rule;\n    rule = (oss_lifecycle_rule_content_t *)aos_pcalloc(\n            p, sizeof(oss_lifecycle_rule_content_t));\n    aos_str_set(&rule->id, \"\");\n    aos_str_set(&rule->prefix, \"\");\n    aos_str_set(&rule->status, \"\");\n    aos_str_set(&rule->date, \"\");\n    aos_str_set(&rule->created_before_date, \"\");\n    rule->days = INT_MAX;\n    oss_init_lifecycle_rule_date(&rule->abort_multipart_upload_dt);\n    aos_list_init(&rule->tag_list);\n    return rule;\n}\n\nvoid oss_create_sub_cors_rule(aos_pool_t *p, aos_list_t *list, char *rule_content)\n{\n    oss_sub_cors_rule_t *sub_rule;\n    sub_rule = (oss_sub_cors_rule_t *)aos_pcalloc(p, sizeof(oss_sub_cors_rule_t));\n    aos_str_set(&sub_rule->rule, rule_content); \n    aos_list_add_tail(&sub_rule->node, list);\n}\n\noss_cors_rule_t *oss_create_cors_rule(aos_pool_t *p)\n{\n    oss_cors_rule_t *rule;\n    if (p == NULL) {\n        return NULL;\n    }\n    rule = (oss_cors_rule_t *)aos_pcalloc(p, sizeof(oss_cors_rule_t));\n    aos_list_init(&rule->allowed_origin_list);\n    aos_list_init(&rule->allowed_method_list);\n    aos_list_init(&rule->allowed_head_list);\n    aos_list_init(&rule->expose_head_list);\n    rule->max_age_seconds = INT_MAX;\n    return rule;\n}\n\noss_referer_t * oss_create_and_add_refer(aos_pool_t *p, oss_referer_config_t *refer_config, char *refer_str)\n{\n    oss_referer_t *refer;\n    refer = (oss_referer_t *)aos_pcalloc(\n            p, sizeof(oss_referer_t));\n    if (!refer) {\n        return refer;\n    }\n\n    aos_str_set(&refer->referer, refer_str);\n    aos_list_add_tail(&refer->node, &refer_config->referer_list);\n    return refer;\n}\n\noss_upload_file_t *oss_create_upload_file(aos_pool_t *p)\n{\n    return (oss_upload_file_t *)aos_pcalloc(p, sizeof(oss_upload_file_t));\n}\n\noss_object_key_t *oss_create_oss_object_key(aos_pool_t *p)\n{\n    return (oss_object_key_t *)aos_pcalloc(p, sizeof(oss_object_key_t));\n}\n\noss_live_channel_publish_url_t *oss_create_live_channel_publish_url(aos_pool_t *p)\n{\n    return (oss_live_channel_publish_url_t *)aos_pcalloc(p, sizeof(oss_live_channel_publish_url_t));\n}\n\noss_live_channel_play_url_t *oss_create_live_channel_play_url(aos_pool_t *p)\n{\n    return (oss_live_channel_play_url_t *)aos_pcalloc(p, sizeof(oss_live_channel_play_url_t));\n}\n\noss_live_channel_content_t *oss_create_list_live_channel_content(aos_pool_t *p)\n{\n    oss_live_channel_content_t *list_live_channel_content = NULL;\n    list_live_channel_content = (oss_live_channel_content_t*)oss_create_api_result_content(p,\n        sizeof(oss_live_channel_content_t));\n    aos_list_init(&list_live_channel_content->publish_url_list);\n    aos_list_init(&list_live_channel_content->play_url_list);\n    return list_live_channel_content;\n}\n\noss_live_record_content_t *oss_create_live_record_content(aos_pool_t *p)\n{\n    oss_live_record_content_t *live_record_content = NULL;\n    live_record_content = (oss_live_record_content_t*)oss_create_api_result_content(p,\n        sizeof(oss_live_record_content_t));\n    return live_record_content;\n}\n\noss_live_channel_configuration_t *oss_create_live_channel_configuration_content(aos_pool_t *p)\n{\n    oss_live_channel_configuration_t *config;\n    config = (oss_live_channel_configuration_t *)aos_pcalloc(\n            p, sizeof(oss_live_channel_configuration_t));\n\n    aos_str_set(&config->name, \"\");\n    aos_str_set(&config->description, \"\");\n    aos_str_set(&config->status, LIVE_CHANNEL_STATUS_ENABLED);\n    aos_str_set(&config->target.type, LIVE_CHANNEL_DEFAULT_TYPE);\n    aos_str_set(&config->target.play_list_name, LIVE_CHANNEL_DEFAULT_PLAYLIST);\n    config->target.frag_duration = LIVE_CHANNEL_DEFAULT_FRAG_DURATION;\n    config->target.frag_count = LIVE_CHANNEL_DEFAULT_FRAG_COUNT;\n\n    return config;\n}\n\noss_checkpoint_t *oss_create_checkpoint_content(aos_pool_t *p) \n{\n    oss_checkpoint_t *cp;\n    cp = (oss_checkpoint_t *)aos_pcalloc(p, sizeof(oss_checkpoint_t));\n    cp->parts = (oss_checkpoint_part_t *)aos_pcalloc(p, sizeof(oss_checkpoint_part_t) * OSS_MAX_PART_NUM);\n    aos_str_set(&cp->md5, \"\");\n    aos_str_set(&cp->file_path, \"\");\n    aos_str_set(&cp->file_md5, \"\");\n    aos_str_set(&cp->object_name, \"\");\n    aos_str_set(&cp->object_last_modified, \"\");\n    aos_str_set(&cp->object_etag, \"\");\n    aos_str_set(&cp->upload_id, \"\");\n    return cp;\n}\n\noss_resumable_clt_params_t *oss_create_resumable_clt_params_content(aos_pool_t *p, int64_t part_size, int32_t thread_num,\n                                                                    int enable_checkpoint, const char *checkpoint_path)\n{\n    oss_resumable_clt_params_t *clt;\n    clt = (oss_resumable_clt_params_t *)aos_pcalloc(p, sizeof(oss_resumable_clt_params_t));\n    clt->part_size = part_size;\n    clt->thread_num = thread_num;\n    clt->enable_checkpoint = enable_checkpoint;\n    if (enable_checkpoint && NULL != checkpoint_path) {\n        aos_str_set(&clt->checkpoint_path, checkpoint_path);\n    }\n    return clt;\n}\n\noss_list_live_channel_params_t *oss_create_list_live_channel_params(aos_pool_t *p)\n{\n    oss_list_live_channel_params_t *params;\n    params = (oss_list_live_channel_params_t *)aos_pcalloc(\n            p, sizeof(oss_list_live_channel_params_t));\n    aos_list_init(&params->live_channel_list);\n    aos_str_set(&params->prefix, \"\");\n    aos_str_set(&params->marker, \"\");\n    params->truncated = 1;\n    params->max_keys = OSS_PER_RET_NUM;\n    return params;\n}\n\noss_select_object_params_t *oss_create_select_object_params(aos_pool_t *p)\n{\n    oss_select_object_params_t *params;\n    params = (oss_select_object_params_t *)aos_pcalloc(\n        p, sizeof(oss_select_object_params_t));\n    //input\n    aos_str_set(&params->input_param.compression_type, \"\");\n    aos_str_set(&params->input_param.file_header_info, \"\");\n    aos_str_set(&params->input_param.record_delimiter, \"\");\n    aos_str_set(&params->input_param.field_delimiter, \"\");\n    aos_str_set(&params->input_param.quote_character, \"\");\n    aos_str_set(&params->input_param.comment_character, \"\");\n    aos_str_set(&params->input_param.range, \"\");\n    //output\n    aos_str_set(&params->output_param.record_delimiter, \"\");\n    aos_str_set(&params->output_param.field_delimiter, \"\");\n    params->output_param.keep_all_columns = OSS_INVALID_VALUE;\n    params->output_param.output_rawdata = OSS_INVALID_VALUE;\n    params->output_param.enable_payload_crc = OSS_INVALID_VALUE;\n    params->output_param.output_header = AOS_FALSE;\n    //option\n    params->option_param.skip_partial_data_record = AOS_FALSE;\n    return params;\n}\n\noss_select_object_meta_params_t *oss_create_select_object_meta_params(aos_pool_t *p)\n{\n    oss_select_object_meta_params_t *params;\n    params = (oss_select_object_meta_params_t *)aos_pcalloc(\n        p, sizeof(oss_select_object_meta_params_t));\n    aos_str_set(&params->compression_type, \"None\");\n    aos_str_set(&params->record_delimiter, \"\");\n    aos_str_set(&params->field_delimiter, \"\");\n    aos_str_set(&params->quote_character, \"\");\n    params->over_write_if_existing = OSS_INVALID_VALUE;\n    return params;\n}\n\nconst char *get_oss_acl_str(oss_acl_e oss_acl)\n{\n    switch (oss_acl) {\n        case OSS_ACL_PRIVATE:\n            return  \"private\";\n        case OSS_ACL_PUBLIC_READ:\n            return \"public-read\";\n        case OSS_ACL_PUBLIC_READ_WRITE:\n            return \"public-read-write\";\n        case OSS_ACL_DEFAULT:\n            return \"default\";\n        default:\n            return NULL;\n    }\n}\n\nconst char *get_oss_storage_class_str(oss_storage_class_type_e storage_class)\n{\n    switch (storage_class) {\n        case OSS_STORAGE_CLASS_STANDARD:\n            return  \"Standard\";\n        case OSS_STORAGE_CLASS_IA:\n            return \"IA\";\n        case OSS_STORAGE_CLASS_ARCHIVE:\n            return \"Archive\";\n        case OSS_STORAGE_CLASS_COLD_ARCHIVE:\n            return \"ColdArchive\";\n        default:\n            return NULL;\n    }\n}\n\nconst char *get_oss_tier_type_str(oss_tier_type_e tier)\n{\n    switch (tier) {\n    case OSS_TIER_EXPEDITED:\n        return  \"Expedited\";\n    case OSS_TIER_STANDARD:\n        return \"Standard\";\n    case OSS_TIER_BULK:\n        return \"Bulk\";\n    default:\n        return NULL;\n    }\n}\n\nvoid oss_init_request(const oss_request_options_t *options, \n                      http_method_e method,\n                      aos_http_request_t **req, \n                      aos_table_t *params, \n                      aos_table_t *headers, \n                      aos_http_response_t **resp)\n{\n    *req = aos_http_request_create(options->pool);\n    *resp = aos_http_response_create(options->pool);\n    (*req)->method = method;\n    init_sts_token_header();\n    (*req)->headers = headers;\n    (*req)->query_params = params;\n}\n\nvoid oss_init_service_request(const oss_request_options_t *options, \n                             http_method_e method, \n                             aos_http_request_t **req, \n                             aos_table_t *params, \n                             aos_table_t *headers,\n                             aos_http_response_t **resp)\n{\n    oss_init_request(options, method, req, params, headers, resp);\n    oss_get_service_uri(options, *req);\n}\n\nvoid oss_init_bucket_request(const oss_request_options_t *options, \n                             const aos_string_t *bucket,\n                             http_method_e method, \n                             aos_http_request_t **req, \n                             aos_table_t *params, \n                             aos_table_t *headers,\n                             aos_http_response_t **resp)\n{\n    oss_init_request(options, method, req, params, headers, resp);\n    oss_get_bucket_uri(options, bucket, *req);\n}\n\nvoid oss_init_object_request(const oss_request_options_t *options, \n                             const aos_string_t *bucket,\n                             const aos_string_t *object, \n                             http_method_e method, \n                             aos_http_request_t **req, \n                             aos_table_t *params, \n                             aos_table_t *headers,\n                             oss_progress_callback cb,\n                             uint64_t init_crc,\n                             aos_http_response_t **resp)\n{\n    oss_init_request(options, method, req, params, headers, resp);\n    if (HTTP_GET == method) {\n        (*resp)->progress_callback = cb;\n    } else if (HTTP_PUT == method || HTTP_POST == method) {\n        (*req)->progress_callback = cb;\n        (*req)->crc64 = init_crc;\n    }\n\n    oss_get_object_uri(options, bucket, object, *req);\n}\n\nvoid oss_init_live_channel_request(const oss_request_options_t *options, \n                                   const aos_string_t *bucket,\n                                   const aos_string_t *live_channel,\n                                   http_method_e method,\n                                   aos_http_request_t **req,\n                                   aos_table_t *params,\n                                   aos_table_t *headers,\n                                   aos_http_response_t **resp)\n{\n    oss_init_request(options, method, req, params, headers, resp);\n    oss_get_object_uri(options, bucket, live_channel, *req);\n}\n\nvoid oss_init_signed_url_request(const oss_request_options_t *options, \n                                 const aos_string_t *signed_url,\n                                 http_method_e method, \n                                 aos_http_request_t **req, \n                                 aos_table_t *params, \n                                 aos_table_t *headers, \n                                 aos_http_response_t **resp)\n{\n    *req = aos_http_request_create(options->pool);\n    *resp = aos_http_response_create(options->pool);\n    (*req)->method = method;\n    (*req)->headers = headers;\n    (*req)->query_params = params;\n    (*req)->signed_url = signed_url->data;\n}\n\naos_status_t *oss_send_request(aos_http_controller_t *ctl, \n                               aos_http_request_t *req,\n                               aos_http_response_t *resp)\n{\n    aos_status_t *s;\n    const char *reason;\n    int res = AOSE_OK;\n\n    s = aos_status_create(ctl->pool);\n    res = aos_http_send_request(ctl, req, resp);\n\n    if (res != AOSE_OK) {\n        reason = aos_http_controller_get_reason(ctl);\n        aos_status_set(s, res, AOS_HTTP_IO_ERROR_CODE, reason);\n    } else if (!aos_http_is_ok(resp->status)) {\n        s = aos_status_parse_from_body(ctl->pool, &resp->body, resp->status, s);\n    } else {\n        s->code = resp->status;\n    }\n\n    s->req_id = (char*)(apr_table_get(resp->headers, \"x-oss-request-id\"));\n    if (s->req_id == NULL) {\n        s->req_id = (char*)(apr_table_get(resp->headers, \"x-img-request-id\"));\n        if (s->req_id == NULL) {\n            s->req_id = \"\";\n        }\n    }\n\n    return s;\n}\n\naos_status_t *oss_process_request(const oss_request_options_t *options,\n                                  aos_http_request_t *req, \n                                  aos_http_response_t *resp)\n{\n    int res = AOSE_OK;\n    aos_status_t *s;\n\n    s = aos_status_create(options->pool);\n    res = oss_sign_request(req, options->config);\n    if (res != AOSE_OK) {\n        aos_status_set(s, res, AOS_CLIENT_ERROR_CODE, NULL);\n        return s;\n    }\n\n    if (!oss_is_valid_host(req->host)) {\n        aos_status_set(s, AOSE_INVALID_ARGUMENT, AOS_CLIENT_ERROR_CODE, \"The endpoint is invalid.\");\n        return s;\n    }\n\n    return oss_send_request(options->ctl, req, resp);\n}\n\naos_status_t *oss_process_signed_request(const oss_request_options_t *options,\n                                         aos_http_request_t *req, \n                                         aos_http_response_t *resp)\n{\n    return oss_send_request(options->ctl, req, resp);\n}\n\nvoid oss_get_part_size(int64_t filesize, int64_t *part_size)\n{\n    if (filesize > (*part_size) * OSS_MAX_PART_NUM) {\n        *part_size = (filesize + OSS_MAX_PART_NUM - \n                      filesize % OSS_MAX_PART_NUM) / OSS_MAX_PART_NUM;\n\n        aos_warn_log(\"Part number larger than max limit, \"\n                     \"part size Changed to:%\" APR_INT64_T_FMT \"\\n\",\n                     *part_size);\n    } \n}\n\nint part_sort_cmp(const void *a, const void *b)\n{\n    return (((oss_upload_part_t*)a)->part_num -\n            ((oss_upload_part_t*)b)->part_num > 0 ? 1 : -1);\n}\n\n\nvoid oss_headers_add_range(apr_pool_t *pool, apr_table_t *headers, int64_t offset, int64_t size)\n{\n    char *range;\n    range = apr_psprintf(pool, \"bytes=%\" APR_INT64_T_FMT \"-%\" APR_INT64_T_FMT, \n            offset, offset + size - 1);\n    apr_table_set(headers, \"Range\", range);\n}\n\n\nchar *get_content_type_by_suffix(const char *suffix)\n{\n    oss_content_type_t *content_type;\n\n    for (content_type = file_type; content_type->suffix; ++content_type) {\n        if (strcasecmp(content_type->suffix, suffix) == 0)\n        {\n            return content_type->type;\n        }\n    }\n    return default_content_type;\n}\n\nchar *get_content_type(const char *name)\n{\n    char *begin;\n    char *content_type = NULL;\n    begin = strrchr(name, '.');\n    if (begin) {\n        content_type = get_content_type_by_suffix(begin + 1);\n    }\n    return content_type;\n}\n\nvoid set_content_type(const char* file_name,\n                      const char* key,\n                      aos_table_t *headers)\n{\n    char *user_content_type = NULL;\n    char *content_type = NULL;\n    const char *mime_key = NULL;\n\n    mime_key = file_name == NULL ? key : file_name;\n\n    user_content_type = (char*)apr_table_get(headers, OSS_CONTENT_TYPE);\n    if (NULL == user_content_type && mime_key != NULL) {\n        content_type = get_content_type(mime_key);\n        if (content_type) {\n            apr_table_set(headers, OSS_CONTENT_TYPE, content_type);\n        } else {\n            apr_table_set(headers, OSS_CONTENT_TYPE, default_content_type);\n        }\n    }\n}\n\naos_table_t* aos_table_create_if_null(const oss_request_options_t *options, \n                                      aos_table_t *table, \n                                      int table_size) \n{\n    if (table == NULL) {\n        table = aos_table_make(options->pool, table_size);\n    }\n    return table;\n}\n\nint is_enable_crc(const oss_request_options_t *options) \n{\n    return options->ctl->options->enable_crc;\n}\n\nint has_crc_in_response(const aos_http_response_t *resp) \n{\n    if (NULL != apr_table_get(resp->headers, OSS_HASH_CRC64_ECMA)) {\n        return AOS_TRUE;\n    }\n\n    return AOS_FALSE;\n}\n\nint has_range_or_process_in_request(const aos_http_request_t *req) \n{\n    if (NULL != apr_table_get(req->headers, \"Range\") || \n        NULL != apr_table_get(req->query_params, OSS_PROCESS)) {\n        return AOS_TRUE;\n    }\n\n    return AOS_FALSE;\n}\n\nstatic int check_crc(uint64_t crc, const apr_table_t *headers) \n{\n    char * srv_crc = (char*)(apr_table_get(headers, OSS_HASH_CRC64_ECMA));\n    if (NULL != srv_crc && crc != aos_atoui64(srv_crc)) {\n        return AOSE_CRC_INCONSISTENT_ERROR;\n    }\n    return AOSE_OK;\n}\n\nint oss_check_crc_consistent(uint64_t crc, const apr_table_t *resp_headers, aos_status_t *s) \n{\n    int res = check_crc(crc, resp_headers);\n    if (res != AOSE_OK) {\n        aos_inconsistent_error_status_set(s, res);\n    }\n    return res;\n}\n\nint oss_get_temporary_file_name(aos_pool_t *p, const aos_string_t *filename, aos_string_t *temp_file_name)\n{\n    int len = filename->len + 1;\n    char *temp_file_name_ptr = NULL;\n\n    len += strlen(AOS_TEMP_FILE_SUFFIX);\n    temp_file_name_ptr = aos_pcalloc(p, len);\n\n    apr_snprintf(temp_file_name_ptr, len, \"%.*s%s\", filename->len, filename->data, AOS_TEMP_FILE_SUFFIX);\n    aos_str_set(temp_file_name, temp_file_name_ptr);\n\n    return len;\n}\n\nint oss_temp_file_rename(aos_status_t *s, const char *from_path, const char *to_path, apr_pool_t *pool)\n{\n    int res = -1;\n\n    if (s != NULL) {\n        if (aos_status_is_ok(s)) {\n            res = apr_file_rename(from_path, to_path, pool);\n        } else {\n            res = apr_file_remove(from_path, pool);\n        }\n    }\n\n    return res;\n}\n\n#define FRAME_HEADER_LEN   (12+8)\n#define SELECT_OBJECT_MAGIC  0xFF123456\n\ntypedef struct\n{\n    uint32_t magic;\n    int32_t select_output_raw;\n    uint8_t header[FRAME_HEADER_LEN]; // header + payload offset: 12 + 8\n    int32_t header_len;\n    uint8_t tail[4];\n    int32_t tail_len;\n    int32_t payload_remains;\n    uint32_t header_crc32;        //not use now\n    uint32_t payload_crc32;\n    uint8_t end_frame[256];\n    uint32_t end_frame_size;\n} select_object_depack_frame;\n\nstatic void oss_init_depack_frame(aos_http_response_t *resp)\n{\n    select_object_depack_frame *depack = (select_object_depack_frame *)resp->user_data;\n    if (depack && depack->select_output_raw < 0) {\n        char *select_output_raw = NULL;\n        select_output_raw = (char*)apr_table_get(resp->headers, OSS_SELECT_OBJECT_OUTPUT_RAW);\n        if (select_output_raw && !strncasecmp(select_output_raw, \"true\", 4)) {\n            depack->select_output_raw = AOS_TRUE;\n        } else {\n            depack->select_output_raw = AOS_FALSE;\n        }\n        depack->payload_remains = 0;\n        depack->header_len = 0;\n        depack->end_frame_size = 0;\n    }\n}\n\nstatic int oss_depack_frame(select_object_depack_frame *depack, const char *in_buf, int len, \n    int *frame_type, char **payload_buf, int *payload_len)\n{\n    int remain = len;\n    const char *ptr = in_buf;\n    if (!depack || !frame_type || !payload_buf || !payload_len) {\n        return len;\n    }\n    *frame_type = 0;\n    *payload_buf = NULL;\n    *payload_len = 0;\n    //Version | Frame - Type | Payload Length | Header Checksum | Payload | Payload Checksum\n    //<1 byte> <--3 bytes-->   <-- 4 bytes --> <------4 bytes--> <variable><----4bytes------>\n    //Payload \n    //<offset | data>\n    //<8 types><variable>\n    //header\n    if (depack->header_len < FRAME_HEADER_LEN) {\n        int copy = FRAME_HEADER_LEN - depack->header_len;\n        copy = aos_min(copy, remain);\n        memcpy(depack->header + depack->header_len, ptr, copy);\n        depack->header_len += copy;\n        ptr += copy;\n        remain -= copy;\n\n        if (depack->header_len == FRAME_HEADER_LEN) {\n            uint32_t payload_length;\n            payload_length = depack->header[4];\n            payload_length = (payload_length << 8) | depack->header[5];\n            payload_length = (payload_length << 8) | depack->header[6];\n            payload_length = (payload_length << 8) | depack->header[7];\n            depack->payload_remains = payload_length - 8;\n            depack->payload_crc32 = aos_crc32(0, depack->header + 12, 8);\n        }\n    }\n\n    //payload\n    if (depack->payload_remains > 0) {\n        uint32_t type;\n        int copy = aos_min(depack->payload_remains, remain);\n        type = depack->header[1];\n        type = (type << 8) | depack->header[2];\n        type = (type << 8) | depack->header[3];\n        *frame_type   = type;\n        *payload_buf = (char *)ptr;\n        *payload_len = copy;\n        remain -= copy;\n        depack->payload_remains -= copy;\n        depack->payload_crc32 = aos_crc32(depack->payload_crc32, ptr, copy);\n        return len - remain;\n    }\n\n    //tail\n    if (depack->tail_len < 4) {\n        int copy = 4 - depack->tail_len;\n        copy = aos_min(copy, remain);\n        memcpy(depack->tail + depack->tail_len, ptr, copy);\n        depack->tail_len += copy;\n        ptr += copy;\n        remain -= copy;\n    }\n\n    return len - remain;\n}\n\nstatic int oss_write_select_object_to(aos_http_response_t *resp, const char *buffer, int len)\n{\n    if (resp->type == BODY_IN_FILE) {\n        return aos_write_http_body_file(resp, buffer, len);\n    } else if (resp->type == BODY_IN_MEMORY ){\n        return aos_write_http_body_memory(resp, buffer, len);\n    }\n    return AOSE_INVALID_OPERATION;\n}\n\nstatic int oss_write_select_object_body(aos_http_response_t *resp, const char *buffer, int len)\n{\n    select_object_depack_frame *depack = (select_object_depack_frame *)resp->user_data;\n\n    //init select_output_raw\n    oss_init_depack_frame(resp);\n\n    //depack frame\n    if (depack->select_output_raw == AOS_FALSE) {\n        int remain = len;\n        const char *ptr = buffer;\n        int frame_type;\n        char *payload_buf;\n        int payload_len;\n        int ret;\n        while (remain > 0) {\n            ret = oss_depack_frame(depack, ptr, remain, &frame_type, &payload_buf, &payload_len);\n            switch (frame_type)\n            {\n            case 0x800001: //Data Frame\n            {\n                int wlen = oss_write_select_object_to(resp, payload_buf, payload_len);\n                if (wlen != payload_len) {\n                    return wlen;\n                }\n            }\n                break;\n            case 0x800004: //Continuous Frame\n                break;\n            case 0x800005: //Select object End Frame\n            case 0x800006: //Create Meta End Frame\n            {\n                int32_t left = sizeof(depack->end_frame) - depack->end_frame_size;\n                int32_t copy = aos_min(left, payload_len);\n                if (copy > 0) {\n                    memcpy(depack->end_frame + depack->end_frame_size, payload_buf, copy);\n                    depack->end_frame_size += copy;\n                }\n            }\n                break;\n            default:\n                //get payload checksum\n                if (depack->tail_len == 4) {\n                    //compare check sum\n                    uint32_t payload_crc32;\n                    payload_crc32 = depack->tail[0];\n                    payload_crc32 = (payload_crc32 << 8) | depack->tail[1];\n                    payload_crc32 = (payload_crc32 << 8) | depack->tail[2];\n                    payload_crc32 = (payload_crc32 << 8) | depack->tail[3];\n                    if (payload_crc32 != 0 && payload_crc32 != depack->payload_crc32) {\n                        return AOSE_SELECT_OBJECT_CRC_ERROR;\n                    }\n\n                    //reset to get next frame\n                    depack->header_len = 0;\n                    depack->tail_len = 0;\n                }\n                break;\n            }\n            ptr += ret;\n            remain -= ret;\n        }\n    } else {\n        len = oss_write_select_object_to(resp, buffer, len);\n    }\n\n    return len;\n}\n\nint oss_init_select_object_read_response_body(aos_pool_t *p, aos_http_response_t *resp)\n{\n    int res = AOSE_OK;\n    select_object_depack_frame *depack;\n\n    if (!p || !resp || resp->type == BODY_IN_CALLBACK) {\n        return res;\n    }\n\n    depack = (select_object_depack_frame *)aos_pcalloc(p, sizeof(select_object_depack_frame));\n    depack->magic = SELECT_OBJECT_MAGIC;\n    depack->select_output_raw = OSS_INVALID_VALUE;\n    resp->user_data  = (void *)depack;\n    resp->write_body = oss_write_select_object_body;\n\n    return res;\n}\n\nvoid oss_check_select_object_status(aos_http_response_t *resp, aos_status_t *s)\n{\n    select_object_depack_frame *depack;\n    if (!resp || !s) {\n        return;\n    }\n\n    if (!aos_status_is_ok(s)) {\n        return;\n    }\n\n    depack = (select_object_depack_frame *)resp->user_data;\n    if (depack && \n        (depack->magic == SELECT_OBJECT_MAGIC) &&\n        (depack->select_output_raw == AOS_FALSE)) {\n       \n        uint32_t http_code;\n        http_code = depack->end_frame[8];\n        http_code = (http_code << 8) | depack->end_frame[9];\n        http_code = (http_code << 8) | depack->end_frame[10];\n        http_code = (http_code << 8) | depack->end_frame[11];\n        \n        if (!aos_http_is_ok(http_code)) {\n            char *error_msg = NULL;\n            if (depack->end_frame_size > 12) {\n                error_msg = apr_pstrmemdup(resp->pool, (const char *)depack->end_frame + 12, depack->end_frame_size - 12);\n            }\n            aos_status_set(s, http_code, AOS_SELECT_OBJECT_ERROR, error_msg);\n        } else {\n            //update the httpcode\n            s->code = http_code;\n        }\n    }\n}\n\nint oss_init_create_select_object_meta_read_response_body(aos_pool_t *p, aos_http_response_t *resp)\n{\n    int res = AOSE_OK;\n    select_object_depack_frame *depack;\n\n    if (!p || !resp || resp->type == BODY_IN_CALLBACK) {\n        return res;\n    }\n\n    depack = (select_object_depack_frame *)aos_pcalloc(p, sizeof(select_object_depack_frame));\n    depack->magic = SELECT_OBJECT_MAGIC;\n    depack->select_output_raw = AOS_FALSE;\n    resp->user_data = (void *)depack;\n    resp->write_body = oss_write_select_object_body;\n\n    return res;\n}\n\nvoid oss_check_create_select_object_meta_status(aos_http_response_t *resp, aos_status_t *s,\n    oss_select_object_meta_params_t *meta_params)\n{\n    select_object_depack_frame *depack;\n    if (!resp || !s) {\n        return;\n    }\n\n    if (!aos_status_is_ok(s)) {\n        return;\n    }\n\n    /**\n    * Format of end frame\n    * |--total scan size(8 bytes)--|\n    * |--status code(4 bytes)--|--total splits count(4 bytes)--|\n    * |--total lines(8 bytes)--|--columns count(4 bytes)--|--error message(optional)--|\n    */\n    depack = (select_object_depack_frame *)resp->user_data;\n    if (depack &&\n        (depack->magic == SELECT_OBJECT_MAGIC) &&\n        (depack->select_output_raw == AOS_FALSE)) {\n\n        uint32_t http_code;\n        uint32_t splits_count;\n        uint64_t rows_count;\n        uint32_t columns_count;\n\n        http_code = depack->end_frame[8];\n        http_code = (http_code << 8) | depack->end_frame[9];\n        http_code = (http_code << 8) | depack->end_frame[10];\n        http_code = (http_code << 8) | depack->end_frame[11];\n\n        splits_count = depack->end_frame[12];\n        splits_count = (splits_count << 8) | depack->end_frame[13];\n        splits_count = (splits_count << 8) | depack->end_frame[14];\n        splits_count = (splits_count << 8) | depack->end_frame[15];\n\n        rows_count = depack->end_frame[16];\n        rows_count = (rows_count << 8) | depack->end_frame[17];\n        rows_count = (rows_count << 8) | depack->end_frame[18];\n        rows_count = (rows_count << 8) | depack->end_frame[19];\n        rows_count = (rows_count << 8) | depack->end_frame[20];\n        rows_count = (rows_count << 8) | depack->end_frame[21];\n        rows_count = (rows_count << 8) | depack->end_frame[22];\n        rows_count = (rows_count << 8) | depack->end_frame[23];\n\n        columns_count = depack->end_frame[24];\n        columns_count = (columns_count << 8) | depack->end_frame[25];\n        columns_count = (columns_count << 8) | depack->end_frame[26];\n        columns_count = (columns_count << 8) | depack->end_frame[27];\n\n        if (!aos_http_is_ok(http_code)) {\n            char *error_msg = NULL;\n            if (depack->end_frame_size > 28) {\n                error_msg = apr_pstrmemdup(resp->pool, (const char *)depack->end_frame + 12, depack->end_frame_size - 12);\n            }\n            aos_status_set(s, http_code, AOS_CREATE_SELECT_OBJECT_META_ERROR, error_msg);\n        }\n        else {\n            //update the httpcode\n            s->code = http_code;\n            if (meta_params) {\n                meta_params->splits_count = splits_count;\n                meta_params->rows_count = rows_count;\n                meta_params->columns_count = columns_count;\n            }\n        }\n    }\n}\n\noss_tag_content_t *oss_create_tag_content(aos_pool_t *p)\n{\n    return (oss_tag_content_t *)aos_pcalloc(p, sizeof(oss_tag_content_t));\n}\n\nint oss_is_valid_bucket_name(const aos_string_t *str)\n{\n    int i;\n\n    if (aos_string_is_empty(str)) {\n        return 0;\n    }\n\n    if (str->len < 3 || str->len > 63) {\n        return 0;\n    }\n\n    if (str->data[0] == '-' || str->data[str->len - 1] == '-') {\n        return 0;\n    }\n\n    for (i = 0; i < str->len; i++) {\n        char c = str->data[i];\n        if (!((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '-')) {\r\n            return 0;\r\n        }\r\n    }\n    return 1;\n}\n\naos_status_t *oss_get_bucket_name_invalid_error()\n{\n    static aos_status_t oss_bucket_name_invalid_error = {\n        AOSE_INVALID_ARGUMENT,\n        (char *)AOS_BUCKET_NAME_INVALID_ERROR,\n        \"The bucket name is invalid, please check.\",\n        NULL\n    };\n\n    return &oss_bucket_name_invalid_error;\n}\n\nint oss_is_valid_object_name(const aos_string_t* str)\n{\n    if (aos_string_is_empty(str)) {\n        return 0;\n    }\n    return 1;\n}\n\nint oss_is_valid_object_name_ex(const aos_string_t* str, int strict)\n{\n\n    if (aos_string_is_empty(str)) {\n        return 0;\n    }\n\n    if (strict && str->data[0] == '?') {\n        return 0;\n    }\n\n    return 1;\n}\n\naos_status_t* oss_get_object_name_invalid_error()\n{\n    static aos_status_t oss_object_name_invalid_error = {\n        AOSE_INVALID_ARGUMENT,\n        (char*)AOS_OBJECT_NAME_INVALID_ERROR,\n        \"The object name is invalid, please check.\",\n        NULL\n    };\n\n    return &oss_object_name_invalid_error;\n}\n\nint oss_is_valid_host(const char *host)\n{\n    //format like: userinfo@host:port, just check host\n    const char *ptr;\n    const char *prevptr;\n    if (host == NULL) {\n        return 0;\n    }\n\n    prevptr = host;\n    //find @\n    for (ptr = prevptr; *ptr != '\\0'; ptr++) {\n        if (*ptr == '@') {\n            prevptr = ptr + 1;\n            break;\n        }\n    }\n\n    //find :\n    for (ptr = prevptr; *ptr != '\\0'; ptr++) {\n        if (*ptr == ':') {\n            break;\n        }\n    }\n\n    if (prevptr == ptr) {\n        return 0;\n    }\n\n    while (prevptr != ptr) {\n        char c = *prevptr;\n        if (!((c >= 'a' && c <= 'z') ||\r\n            (c >= '0' && c <= '9') ||\r\n            (c >= 'A' && c <= 'Z') ||\r\n            (c == '_') ||\r\n            (c == '-') ||\r\n            (c == '.'))) {\r\n            return 0;\r\n        }\n        prevptr++;\n    }\n\n    return 1;\n}\n\nint is_verify_object_strict(const oss_request_options_t* options)\n{\n    if (options->config->signature_version == 4) {\n        return 0;\n    }\n    return options->ctl->options->verify_object_strict;\n}\n"
  },
  {
    "path": "oss_c_sdk/oss_util.h",
    "content": "#ifndef LIBOSS_UTIL_H\n#define LIBOSS_UTIL_H\n\n#include \"aos_string.h\"\n#include \"aos_transport.h\"\n#include \"aos_status.h\"\n#include \"oss_define.h\"\n#include \"oss_resumable.h\"\n\nOSS_CPP_START\n\n#define init_sts_token_header() do { \\\n        if (options->config->sts_token.data != NULL) {\\\n            apr_table_set(headers, OSS_STS_SECURITY_TOKEN, options->config->sts_token.data);\\\n        }\\\n    } while(0)\n\n/**\n  * @brief  check hostname ends with specific oss domain suffix.\n**/\nint is_oss_domain(const aos_string_t *str);\n\n/**\n  * @brief  check hostname is ip.\n**/\nint is_valid_ip(const char *str);\n\n/**\n  * @brief  get oss acl str according oss_acl\n  * @param[in]  oss_acl the oss bucket acl\n  * @return oss acl str\n**/\nconst char *get_oss_acl_str(oss_acl_e oss_acl);\n\n/**\n  * @brief  get oss storage type str according oss_storage_class\n  * @param[in] storage_class the oss bucket storage class\n  * @return oss storage class str\n**/\nconst char *get_oss_storage_class_str(oss_storage_class_type_e storage_class);\n\n/**\n  * @brief  get oss tier type str according oss_tier_type_e\n  * @param[in] tier the oss bucket tier type\n  * @return oss tier type str\n**/\nconst char *get_oss_tier_type_str(oss_tier_type_e tier);\n\n/**\n  * @brief  create oss config including host, port, access_key_id, access_key_secret, is_oss_domain\n**/\noss_config_t *oss_config_create(aos_pool_t *p);\n\n/** \n  * @brief evaluate config to curl\n**/\nvoid oss_config_resolve(aos_pool_t *pool, oss_config_t *config, aos_http_controller_t *ctl);\n\n/**\n  * @brief  create oss request options\n  * @return oss request options\n**/\noss_request_options_t *oss_request_options_create(aos_pool_t *p);\n\n/**\n  * @brief  init oss request\n**/\nvoid oss_init_request(const oss_request_options_t *options, http_method_e method,\n        aos_http_request_t **req, aos_table_t *params, aos_table_t *headers, aos_http_response_t **resp);\n\n/**\n  * @brief  init oss bucket request\n**/\nvoid oss_init_bucket_request(const oss_request_options_t *options, const aos_string_t *bucket,\n        http_method_e method, aos_http_request_t **req, aos_table_t *params, aos_table_t *headers,\n        aos_http_response_t **resp);\n \n/**\n  * @brief  init oss service request\n**/\nvoid oss_init_service_request(const oss_request_options_t *options, \n                             http_method_e method, \n                             aos_http_request_t **req, \n                             aos_table_t *params, \n                             aos_table_t *headers,\n                             aos_http_response_t **resp);\n/**\n  * @brief  init oss object request\n**/\nvoid oss_init_object_request(const oss_request_options_t *options, const aos_string_t *bucket,\n        const aos_string_t *object, http_method_e method, aos_http_request_t **req, \n        aos_table_t *params, aos_table_t *headers, oss_progress_callback cb, uint64_t initcrc,\n        aos_http_response_t **resp);\n\n/**\n  * @brief  init oss live channel request\n**/\nvoid oss_init_live_channel_request(const oss_request_options_t *options,\n    const aos_string_t *bucket, const aos_string_t *live_channel,\n    http_method_e method, aos_http_request_t **req, aos_table_t *params,\n    aos_table_t *headers, aos_http_response_t **resp);\n\n/**\n  * @brief  init oss request with signed_url\n**/\nvoid oss_init_signed_url_request(const oss_request_options_t *options, const aos_string_t *signed_url,\n        http_method_e method, aos_http_request_t **req,\n        aos_table_t *params, aos_table_t *headers, aos_http_response_t **resp);\n\n/**\n  * @brief  oss send request\n**/\naos_status_t *oss_send_request(aos_http_controller_t *ctl, aos_http_request_t *req,\n        aos_http_response_t *resp);\n\n/**\n  * @brief process oss request including sign request, send request, get response\n**/\naos_status_t *oss_process_request(const oss_request_options_t *options,\n        aos_http_request_t *req, aos_http_response_t *resp);\n\n/**\n  * @brief process oss request with signed_url including send request, get response\n**/\naos_status_t *oss_process_signed_request(const oss_request_options_t *options, \n        aos_http_request_t *req, aos_http_response_t *resp);\n\n/**\n  * @brief  get object uri using third-level domain if hostname is oss domain, otherwise second-level domain\n**/\nvoid oss_get_object_uri(const oss_request_options_t *options,\n                        const aos_string_t *bucket,\n                        const aos_string_t *object,\n                        aos_http_request_t *req);\n\n/**\n  * @brief   bucket uri using third-level domain if hostname is oss domain, otherwise second-level domain\n**/\nvoid oss_get_bucket_uri(const oss_request_options_t *options, \n                        const aos_string_t *bucket,\n                        aos_http_request_t *req);\n\n/**\n  * @brief  get rtmp uri using third-level domain if hostname is oss domain, otherwise second-level domain\n**/\nvoid oss_get_rtmp_uri(const oss_request_options_t *options,\n                      const aos_string_t *bucket,\n                      const aos_string_t *live_channel_id,\n                      aos_http_request_t *req);\n\n/**\n  * @brief  write body content into oss request body from buffer\n**/\nvoid oss_write_request_body_from_buffer(aos_list_t *buffer, aos_http_request_t *req);\n\n/**\n  * @brief   write body content into oss request body from file\n**/\nint oss_write_request_body_from_file(aos_pool_t *p, const aos_string_t *filename, aos_http_request_t *req);\n\n/**\n  * @brief   write body content into oss request body from multipart upload file\n**/\nint oss_write_request_body_from_upload_file(aos_pool_t *p, oss_upload_file_t *upload_file, aos_http_request_t *req);\n\n/**\n  * @brief  read body content from oss response body to buffer\n**/\nvoid oss_fill_read_response_body(aos_http_response_t *resp, aos_list_t *buffer);\n\n/**\n  * @brief  read body content from oss response body to file\n**/\nint oss_init_read_response_body_to_file(aos_pool_t *p, const aos_string_t *filename, aos_http_response_t *resp);\n\n/**\n  * @brief  read body content from oss response body to file buffer\n**/\nint oss_init_read_response_body_to_fb(aos_file_buf_t *fb, const aos_string_t *filename, aos_http_response_t *resp);\n\n/**\n  * @brief  read response header if headers is not null\n**/\nvoid oss_fill_read_response_header(aos_http_response_t *resp, aos_table_t **headers);\n\n/**\n  * @brief  create oss api result content\n  * @return oss api result content\n**/\nvoid *oss_create_api_result_content(aos_pool_t *p, size_t size);\noss_list_object_content_t *oss_create_list_object_content(aos_pool_t *p);\noss_list_object_common_prefix_t *oss_create_list_object_common_prefix(aos_pool_t *p);\noss_list_part_content_t *oss_create_list_part_content(aos_pool_t *p);\noss_list_multipart_upload_content_t *oss_create_list_multipart_upload_content(aos_pool_t *p);\noss_complete_part_content_t *oss_create_complete_part_content(aos_pool_t *p);\n\n\n/**\n  * @brief  create oss api bucket list result content\n  * @return oss api bucket list result content\n**/\noss_list_bucket_content_t *oss_create_list_bucket_content(aos_pool_t *p);\n\n/**\n  * @brief  create oss api bucket info result \n  * @return oss api bucket info result \n**/\noss_bucket_info_t *oss_create_bucket_info(aos_pool_t *p);\n\n/**\n  * @brief  create oss api list parameters\n  * @return oss api list parameters\n**/\noss_list_object_params_t *oss_create_list_object_params(aos_pool_t *p);\n\n/**\n  * @brief  create oss api list bucket parameters\n  * @return oss api list bucket parameters\n**/\noss_list_buckets_params_t *oss_create_list_buckets_params(aos_pool_t *p);\n\noss_list_upload_part_params_t *oss_create_list_upload_part_params(aos_pool_t *p);\noss_list_multipart_upload_params_t *oss_create_list_multipart_upload_params(aos_pool_t *p);\noss_list_live_channel_params_t *oss_create_list_live_channel_params(aos_pool_t *p);\n\n/**\n  * @brief  create upload part copy params\n  * @return upload part copy params struct for upload part copy\n**/\noss_upload_part_copy_params_t *oss_create_upload_part_copy_params(aos_pool_t *p);\n\n/**\n  * @brief  create upload file struct for range multipart upload\n  * @return upload file struct for range multipart upload\n**/\noss_upload_file_t *oss_create_upload_file(aos_pool_t *p);\n\n/**\n  * @brief  create lifecycle rule content\n  * @return lifecycle rule content\n**/\noss_lifecycle_rule_content_t *oss_create_lifecycle_rule_content(aos_pool_t *p);\n\n\n/**\n  * @brief  create cors rule content\n  * @return cors rule content\n**/\nvoid oss_create_sub_cors_rule(aos_pool_t *p, aos_list_t *list, char *rule_content);\noss_cors_rule_t *oss_create_cors_rule(aos_pool_t *p);\n\n/**\n  * @brief  create and add refer\n  * @return new refer\n**/\noss_referer_t * oss_create_and_add_refer(aos_pool_t *p, oss_referer_config_t *refer_config, char *refer_str);\n\n/**\n  * @brief  create logging rule content\n  * @return logging rule content\n**/\noss_logging_config_content_t *oss_create_logging_rule_content(aos_pool_t *p);\n\n/**\n  * @brief  create oss object content for delete objects\n  * @return oss object content\n**/\noss_object_key_t *oss_create_oss_object_key(aos_pool_t *p);\n\n/**\n  * @brief  create oss live channel publish url content for delete objects\n  * @return oss live channel publish url content\n**/\noss_live_channel_publish_url_t *oss_create_live_channel_publish_url(aos_pool_t *p);\n\n/**\n  * @brief  create oss live channel play url content for delete objects\n  * @return oss live channel play url content\n**/\noss_live_channel_play_url_t *oss_create_live_channel_play_url(aos_pool_t *p);\n\n/**\n  * @brief  create oss list live channel content for delete objects\n  * @return oss list live channel content\n**/\noss_live_channel_content_t *oss_create_list_live_channel_content(aos_pool_t *p);\n\n/**\n  * @brief  create oss live recored content for delete objects\n  * @return oss live record content\n**/\noss_live_record_content_t *oss_create_live_record_content(aos_pool_t *p);\n\n/**\n  * @brief  create live channel configuration content\n  * @return live channel configuration content\n**/\noss_live_channel_configuration_t *oss_create_live_channel_configuration_content(aos_pool_t *p);\n\n/**\n  * @brief  create oss checkpoint content\n  * @return oss checkpoint content\n**/\noss_checkpoint_t *oss_create_checkpoint_content(aos_pool_t *p);\n\n/**\n  * @brief  create oss resumable clt params content\n  * @return oss checkpoint content\n**/\noss_resumable_clt_params_t *oss_create_resumable_clt_params_content(aos_pool_t *p, int64_t part_size, int32_t thread_num,\n                                                                    int enable_checkpoint, const char *checkpoint_path);\n\n/**\n* @brief  create select object params\n* @return oss select object params\n**/\noss_select_object_params_t *oss_create_select_object_params(aos_pool_t *p);\n\n/**\n* @brief  create select object meta params\n* @return oss select object meta params\n**/\noss_select_object_meta_params_t *oss_create_select_object_meta_params(aos_pool_t *p);\n\n/**\n  * @brief  get part size for multipart upload\n**/\nvoid oss_get_part_size(int64_t filesize, int64_t *part_size);\n\n/**\n  * @brief  compare function for part sort\n**/\nint part_sort_cmp(const void *a, const void *b);\n\n\n/**\n  * @brief  add range in http request\n**/\nvoid oss_headers_add_range(apr_pool_t *pool, apr_table_t *headers, int64_t offset, int64_t size);\n\n/**\n  * @brief  set content type for object according to objectname\n  * @return oss content type\n**/\nchar *get_content_type(const char *name);\nchar *get_content_type_by_suffix(const char *suffix);\n\n/**\n  * @brief  set content type for object according to  filename\n**/\nvoid set_content_type(const char* filename, const char* key, aos_table_t *headers);\n\naos_table_t* aos_table_create_if_null(const oss_request_options_t *options, \n                                      aos_table_t *table, int table_size);\n\nint is_enable_crc(const oss_request_options_t *options);\n\nint has_crc_in_response(const aos_http_response_t *resp);\n\nint has_range_or_process_in_request(const aos_http_request_t *req) ;\n\n/**\n * @brief check crc consistent between client and server\n**/\nint oss_check_crc_consistent(uint64_t crc, const apr_table_t *resp_headers, aos_status_t *s);\n\nint oss_get_temporary_file_name(aos_pool_t *p, const aos_string_t *filename, aos_string_t *temp_file_name);\n\nint oss_temp_file_rename(aos_status_t *s, const char *from_path, const char *to_path, apr_pool_t *pool);\n\n/**\n* @brief  read select object body content from oss response body \n**/\nint oss_init_select_object_read_response_body(aos_pool_t *p, aos_http_response_t *resp);\n\n/**\n* @brief check select object result after getting all body\n**/\nvoid oss_check_select_object_status(aos_http_response_t *resp, aos_status_t *s);\n\n/**\n* @brief  read create select object meta body content from oss response body \n**/\nint oss_init_create_select_object_meta_read_response_body(aos_pool_t *p, aos_http_response_t *resp);\n\n/**\n* @brief check create select object result after getting all body\n**/\nvoid oss_check_create_select_object_meta_status(aos_http_response_t *resp, aos_status_t *s,\n    oss_select_object_meta_params_t *meta_params);\n\n/**\n* @brief  create oss tag content for tagging\n* @return oss tag content\n**/\noss_tag_content_t *oss_create_tag_content(aos_pool_t *p);\n\n/**\n  * @brief  check if bucket name is valid.\n**/\nint oss_is_valid_bucket_name(const aos_string_t *str);\n\n/**\n  * @brief  check if object name is valid.\n**/\nint oss_is_valid_object_name(const aos_string_t *str);\nint oss_is_valid_object_name_ex(const aos_string_t* str, int strict);\n\n/**\n  * @brief  pre-process endpoint, just keep host and port.\n**/\nvoid oss_preprocess_endpoint(aos_string_t *endpoint);\n\n/**\n  * @brief  get host form the authority of url\n**/\nchar* oss_get_host_from_authority(const oss_request_options_t *options, aos_string_t *authority);\n\naos_status_t *oss_get_bucket_name_invalid_error();\n\n#define oss_ensure_bucket_name_valid(a) do {       \\\n        if (!oss_is_valid_bucket_name(a)) {        \\\n            return oss_get_bucket_name_invalid_error(); \\\n        } \\\n    } while(0) \n\naos_status_t* oss_get_object_name_invalid_error();\n\n#define oss_ensure_object_name_valid(a) do {       \\\n        if (!oss_is_valid_object_name(a)) {        \\\n            return oss_get_object_name_invalid_error(); \\\n        } \\\n    } while(0) \n\n\n/**\n  * @brief  check if the host is valid.\n**/\nint oss_is_valid_host(const char *host);\n\nint is_verify_object_strict(const oss_request_options_t * options);\n\n\nOSS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk/oss_xml.c",
    "content": "#include \"aos_string.h\"\n#include \"aos_list.h\"\n#include \"aos_buf.h\"\n#include \"aos_util.h\"\n#include \"aos_log.h\"\n#include \"aos_status.h\"\n#include \"oss_util.h\"\n#include \"oss_auth.h\"\n#include \"oss_xml.h\"\n#include \"oss_define.h\"\n\nstatic int get_truncated_from_xml(aos_pool_t *p, mxml_node_t *xml_node, const char *truncated_xml_path);\n\nint get_truncated_from_xml(aos_pool_t *p, mxml_node_t *xml_node, const char *truncated_xml_path)\n{\n    char *is_truncated;\n    int truncated = 0;\n    is_truncated = get_xmlnode_value(p, xml_node, truncated_xml_path);\n    if (is_truncated) {\n        truncated = strcasecmp(is_truncated, \"false\") == 0 ? 0 : 1;\n    }\n    return truncated;\n}\n\nstatic char* new_xml_buff(mxml_node_t *doc);\n\nchar* new_xml_buff(mxml_node_t *doc)\n{\n    int\tbytes;\t\t\t\t\n    char buffer[8192];\n    char *s;\n\n    bytes = mxmlSaveString(doc, buffer, sizeof(buffer), MXML_NO_CALLBACK);\n    if (bytes <= 0) {\n        return (NULL);\n    }\n\n    if (bytes < (int)(sizeof(buffer) - 1)) {\n        return (strdup(buffer));\n    }\n\n    if ((s = malloc(bytes + 1)) == NULL) {\n        return (NULL);\n    }\n    mxmlSaveString(doc, s, bytes + 1, MXML_NO_CALLBACK);\n\n    return (s);\n}\n\nint get_xmldoc(aos_list_t *bc, mxml_node_t **root)\n{\n    int res;\n\n    if (aos_list_empty(bc)) {\n        return AOSE_XML_PARSE_ERROR;\n    }\n\n    if ((res = aos_parse_xml_body(bc, root)) != AOSE_OK) {\n        return AOSE_XML_PARSE_ERROR;\n    }\n\n    return AOSE_OK;\n}\n\nchar *get_xmlnode_value(aos_pool_t *p, mxml_node_t *xml_node, const char *xml_path)\n{\n    char *value = NULL;\n    mxml_node_t *node;\n    const char *node_content;\n\n    node = mxmlFindElement(xml_node, xml_node, xml_path, NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (node_content != NULL) {\n        value = apr_pstrdup(p, node_content);\n    }\n\n    return value;\n}\n\nint oss_acl_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_string_t *oss_acl)\n{\n    int res;\n    mxml_node_t *doc = NULL;\n    const char xml_path[] = \"Grant\";\n    char *acl;\n\n    res = get_xmldoc(bc, &doc);\n    if (res == AOSE_OK) {\n        acl = get_xmlnode_value(p, doc, xml_path);\n        if (acl) {\n            aos_str_set(oss_acl, acl);\n        }\n        mxmlDelete(doc);\n    }\n\n    return res;\n}\n\nint oss_location_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_string_t *oss_location)\n{\n    int res;\n    mxml_node_t *doc = NULL;\n    const char xml_path[] = \"LocationConstraint\";\n    char *location;\n\n    res = get_xmldoc(bc, &doc);\n    if (res == AOSE_OK) {\n        location = get_xmlnode_value(p, doc, xml_path);\n        if (location) {\n            aos_str_set(oss_location, location);\n        }\n        mxmlDelete(doc);\n    }\n\n    return res;\n}\n\nint oss_storage_capacity_parse_from_body(aos_pool_t *p, aos_list_t *bc, long *storage_capacity)\n{\n    int res;\n    mxml_node_t *doc = NULL;\n    const char xml_path[] = \"StorageCapacity\";\n    char *capacity_str;\n\n    res = get_xmldoc(bc, &doc);\n    if (res == AOSE_OK) {\n        capacity_str = get_xmlnode_value(p, doc, xml_path);\n        if (capacity_str) {\n            *storage_capacity = atol(capacity_str);\n        }\n        mxmlDelete(doc);\n    }\n\n    return res;\n}\n\nint oss_logging_parse_from_body(aos_pool_t *p, aos_list_t *bc, oss_logging_config_content_t *rule_content)\n{\n    const char xml_logging_status_path[] = \"BucketLoggingStatus\";\n    const char xml_logging_state_path[] = \"LoggingEnabled\";\n    const char xml_target_bucket_path[] = \"TargetBucket\";\n    const char xml_log_prefix_path[] = \"TargetPrefix\";\n    mxml_node_t *doc = NULL;\n    mxml_node_t *logging_node;\n    mxml_node_t *enabled_node;\n    int res;\n\n    res = get_xmldoc(bc, &doc);\n    if (res == AOSE_OK) {\n        logging_node = mxmlFindElement(doc, doc, xml_logging_status_path, NULL, NULL, MXML_DESCEND);\n        if (logging_node) {\n            enabled_node = mxmlFindElement(logging_node, doc, xml_logging_state_path, NULL, NULL, MXML_DESCEND);\n            if (enabled_node) {\n                char *prefix = NULL;\n                char *target_bucket = NULL;\n                rule_content->logging_enabled = 1;\n\n                target_bucket = get_xmlnode_value(p, enabled_node, xml_target_bucket_path);\n                if (target_bucket) {\n                    aos_str_set(&rule_content->target_bucket, target_bucket);\n                }\n\n                prefix =  get_xmlnode_value(p, enabled_node, xml_log_prefix_path);\n                if (prefix) {\n                    aos_str_set(&rule_content->prefix, prefix);\n                }\n            }\n        }\n    }\n\n    mxmlDelete(doc);\n    return res;\n}\n\n\nvoid oss_list_objects_owner_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_list_object_content_t *content)\n{\n    mxml_node_t *node;\n    const char *node_content;\n    char *owner_id;\n    char *owner_display_name;\n\n    node = mxmlFindElement(xml_node, xml_node, \"ID\",NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        owner_id = apr_pstrdup(p, node_content);\n        aos_str_set(&content->owner_id, owner_id);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"DisplayName\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        owner_display_name = apr_pstrdup(p, node_content);\n        aos_str_set(&content->owner_display_name, owner_display_name);\n    }\n}\n\nvoid oss_list_objects_content_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_list_object_content_t *content)\n{\n    char *key;\n    char *last_modified;\n    char *etag;\n    char *size;\n    const char *node_content;\n    mxml_node_t *node;\n    char *str_value;\n\n    node = mxmlFindElement(xml_node, xml_node, \"Key\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        key = apr_pstrdup(p, node_content);\n        aos_str_set(&content->key, key);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"LastModified\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        last_modified = apr_pstrdup(p, node_content);\n        aos_str_set(&content->last_modified, last_modified);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"ETag\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        etag = apr_pstrdup(p, node_content);\n        aos_str_set(&content->etag, etag);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Size\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        size = apr_pstrdup(p, node_content);\n        aos_str_set(&content->size, size);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Owner\", NULL, NULL, MXML_DESCEND);\n    if (NULL != node) {\n        oss_list_objects_owner_parse(p, node, content);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"StorageClass\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    aos_str_null(&content->storage_class);\n    if (NULL != node_content) {\n        str_value = apr_pstrdup(p, node_content);\n        aos_str_set(&content->storage_class, str_value);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Type\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    aos_str_null(&content->type);\n    if (NULL != node_content) {\n        str_value = apr_pstrdup(p, node_content);\n        aos_str_set(&content->type, str_value);\n    }\n}\n\nvoid oss_list_objects_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    aos_list_t *object_list)\n{\n    mxml_node_t *content_node;\n    oss_list_object_content_t *content;\n\n    content_node = mxmlFindElement(root, root, xml_path, NULL, NULL, MXML_DESCEND);\n    for ( ; content_node != NULL; ) {\n        content = oss_create_list_object_content(p);\n        oss_list_objects_content_parse(p, content_node, content);\n        aos_list_add_tail(&content->node, object_list);\n        content_node = mxmlFindElement(content_node, root, xml_path, NULL, NULL, MXML_DESCEND);\n    }\n}\n\nvoid oss_list_objects_prefix_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_list_object_common_prefix_t *common_prefix)\n{\n    char *prefix;\n    mxml_node_t *node;\n    const char *node_content;\n    \n    node = mxmlFindElement(xml_node, xml_node, \"Prefix\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        prefix = apr_pstrdup(p, node_content);\n        aos_str_set(&common_prefix->prefix, prefix);\n    }\n}\n\nvoid oss_list_objects_common_prefix_parse(aos_pool_t *p, mxml_node_t *xml_node, const char *xml_path,\n            aos_list_t *common_prefix_list)\n{\n    mxml_node_t *node;\n    oss_list_object_common_prefix_t *common_prefix;\n\n    node = mxmlFindElement(xml_node, xml_node, xml_path, NULL, NULL, MXML_DESCEND);\n    for ( ; node != NULL; ) {\n        common_prefix = oss_create_list_object_common_prefix(p);\n        oss_list_objects_prefix_parse(p, node, common_prefix);\n        aos_list_add_tail(&common_prefix->node, common_prefix_list);\n        node = mxmlFindElement(node, xml_node, xml_path, NULL, NULL, MXML_DESCEND);\n    }\n}\n\nint oss_list_objects_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    aos_list_t *object_list, aos_list_t *common_prefix_list, aos_string_t *marker, int *truncated)\n{\n    int res;\n    mxml_node_t *root;\n    const char next_marker_xml_path[] = \"NextMarker\";\n    const char truncated_xml_path[] = \"IsTruncated\";\n    const char buckets_xml_path[] = \"Contents\";\n    const char common_prefix_xml_path[] = \"CommonPrefixes\";\n    char* next_marker;\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        next_marker = get_xmlnode_value(p, root, next_marker_xml_path);\n        if (next_marker) {\n            aos_str_set(marker, next_marker);\n        }\n\n        *truncated = get_truncated_from_xml(p, root, truncated_xml_path);\n        \n        oss_list_objects_contents_parse(p, root, buckets_xml_path, object_list);\n        oss_list_objects_common_prefix_parse(p, root, common_prefix_xml_path, common_prefix_list);\n\n        mxmlDelete(root);\n    }\n    \n    return res;\n}\n\nvoid oss_list_buckets_content_parse(aos_pool_t *p, mxml_node_t *xml_node, aos_list_t *node_list)\n{\n    char* value;\n    const char *xml_value;\n    mxml_node_t *node; \n    oss_list_bucket_content_t *content;\n    content = oss_create_list_bucket_content(p);\n    if (content == NULL) {\n        aos_error_log(\"malloc memory for list bucket failed\\n\");\n        return;\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Name\", NULL, NULL, MXML_DESCEND);\n    xml_value = mxmlGetOpaque(node);\n    if (NULL != xml_value) {\n        value = apr_pstrdup(p, xml_value);\n        aos_str_set(&content->name, value);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"CreationDate\", NULL, NULL, MXML_DESCEND);\n    xml_value = mxmlGetOpaque(node);\n    if (NULL != xml_value) {\n        value = apr_pstrdup(p, xml_value);\n        aos_str_set(&content->create_date, value);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"ExtranetEndpoint\", NULL, NULL, MXML_DESCEND);\n    xml_value = mxmlGetOpaque(node);\n    if (NULL != xml_value) {\n        value = apr_pstrdup(p, xml_value);\n        aos_str_set(&content->extranet_endpoint, value);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"IntranetEndpoint\", NULL, NULL, MXML_DESCEND);\n    xml_value = mxmlGetOpaque(node);\n    if (NULL != xml_value) {\n        value = apr_pstrdup(p, xml_value);\n        aos_str_set(&content->intranet_endpoint, value);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Location\", NULL, NULL, MXML_DESCEND);\n    xml_value = mxmlGetOpaque(node);\n    if (NULL != xml_value) {\n        value = apr_pstrdup(p, xml_value);\n        aos_str_set(&content->location, value);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"StorageClass\", NULL, NULL, MXML_DESCEND);\n    xml_value = mxmlGetOpaque(node);\n    if (NULL != xml_value) {\n        value = apr_pstrdup(p, xml_value);\n        aos_str_set(&content->storage_class, value);\n    }\n\n    aos_list_add_tail(&content->node, node_list);\n}\n\nvoid oss_list_node_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n     aos_list_t *node_list, NODE_PARSE_FUN parse_funptr)\n{\n    mxml_node_t *content_node;\n    content_node = mxmlFindElement(root, root, xml_path, NULL, NULL, MXML_DESCEND);\n    for ( ; content_node != NULL; ) {\n        parse_funptr(p, content_node, node_list);\n        content_node = mxmlFindElement(content_node, root, xml_path, NULL, NULL, MXML_DESCEND);\n    }\n}\n\nvoid oss_list_buckets_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n     aos_list_t *buckets_list)\n{\n    oss_list_node_contents_parse(p, root, xml_path, buckets_list, oss_list_buckets_content_parse);\n}\n\nint oss_list_buckets_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    oss_list_buckets_params_t *params)\n{\n    int res = AOSE_OK;\n    mxml_node_t *root;\n    const char next_marker_xml_path[] = \"NextMarker\";\n    const char truncated_xml_path[] = \"IsTruncated\";\n    const char owner_id_xml_path[] = \"ID\";\n    const char owner_name_xml_path[] = \"DisplayName\";\n    const char buckets_xml_path[] = \"Bucket\";\n    char *next_marker, *owner_id, *owner_name;\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        next_marker = get_xmlnode_value(p, root, next_marker_xml_path);\n        if (next_marker) {\n            aos_str_set(&params->next_marker, next_marker);\n        }\n\n        params->truncated = get_truncated_from_xml(p, root, truncated_xml_path);\n\n        owner_id = get_xmlnode_value(p, root, owner_id_xml_path);\n        if (owner_id) {\n            aos_str_set(&params->owner_id, owner_id);\n        }\n\n        owner_name = get_xmlnode_value(p, root, owner_name_xml_path);\n        if (owner_name) {\n            aos_str_set(&params->owner_name, owner_name);\n        }\n        \n        oss_list_buckets_contents_parse(p, root, buckets_xml_path, &params->bucket_list);\n        mxmlDelete(root);\n    }\n \n    return res;\n}\n\nint oss_get_bucket_info_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    oss_bucket_info_t *bucket_info)\n{\n    int res = AOSE_OK;\n    mxml_node_t *root;\n    char *value;\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        value = get_xmlnode_value(p, root, \"CreationDate\");\n        if (NULL != value) {\n            aos_str_set(&bucket_info->created_date, value);\n        }\n\n        value = get_xmlnode_value(p, root, \"ExtranetEndpoint\");\n        if (NULL != value) {\n            aos_str_set(&bucket_info->extranet_endpoint, value);\n        }\n\n        value = get_xmlnode_value(p, root, \"IntranetEndpoint\");\n        if (NULL != value) {\n            aos_str_set(&bucket_info->intranet_endpoint, value);\n        }\n\n        value = get_xmlnode_value(p, root, \"Location\");\n        if (NULL != value) {\n            aos_str_set(&bucket_info->location, value);\n        }\n        \n        value = get_xmlnode_value(p, root, \"DisplayName\");\n        if (NULL != value) {\n            aos_str_set(&bucket_info->owner_name, value);\n        }\n\n        value = get_xmlnode_value(p, root, \"ID\");\n        if (NULL != value) {\n            aos_str_set(&bucket_info->owner_id, value);\n        }\n \n        value = get_xmlnode_value(p, root, \"Grant\");\n        if (NULL != value) {\n            aos_str_set(&bucket_info->acl, value);\n        }\n\n        value = get_xmlnode_value(p, root, \"StorageClass\");\n        aos_str_null(&bucket_info->storage_class);\n        if (NULL != value) {\n            aos_str_set(&bucket_info->storage_class, value);\n        }\n\n        mxmlDelete(root);\n    }\n \n    return res;\n}\n\nint oss_get_bucket_stat_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    oss_bucket_stat_t *bucket_stat)\n{\n    int res = AOSE_OK;\n    mxml_node_t *root;\n    char *value;\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        value = get_xmlnode_value(p, root, \"Storage\");\n        if (NULL != value) {\n            bucket_stat->storage_in_bytes = aos_atoui64(value);\n        }\n\n        value = get_xmlnode_value(p, root, \"ObjectCount\");\n        if (NULL != value) {\n            bucket_stat->object_count = aos_atoui64(value);\n        }\n\n        value = get_xmlnode_value(p, root, \"MultipartUploadCount\");\n        if (NULL != value) {\n            bucket_stat->multipart_upload_count = aos_atoui64(value);\n        }\n\n        mxmlDelete(root);\n    }\n \n    return res;\n}\n\nint oss_get_bucket_website_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    oss_website_config_t *website_config)\n{\n    int res = AOSE_OK;\n    mxml_node_t *root;\n    char *value;\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        value = get_xmlnode_value(p, root, \"Suffix\");\n        if (NULL != value) {\n            aos_str_set(&website_config->suffix_str, value);\n        }\n\n        value = get_xmlnode_value(p, root, \"Key\");\n        if (NULL != value) {\n            aos_str_set(&website_config->key_str, value);\n        }\n\n        mxmlDelete(root);\n    }\n \n    return res;\n}\n\nvoid parse_referer_str(aos_pool_t *p, mxml_node_t *xml_node, aos_list_t *referer_config_ptr)\n{\n    char* value;\n    const char* node_content;\n    oss_referer_config_t *referer_config = (oss_referer_config_t *)referer_config_ptr;\n    node_content = mxmlGetOpaque(xml_node);\n    value = apr_pstrdup(p, node_content);\n    if (NULL != value) {\n        oss_create_and_add_refer(p, referer_config, value);\n    }\n}\n\nint oss_get_bucket_referer_config_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    oss_referer_config_t *referer_config)\n{\n    int res = AOSE_OK;\n    mxml_node_t *root;\n    char *value;\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        value = get_xmlnode_value(p, root, \"AllowEmptyReferer\");\n        if (NULL != value) {\n            if (!strncmp(value, \"true\", 4)) {\n                referer_config->allow_empty_referer = 1;\n            } else {\n                referer_config->allow_empty_referer = 0;\n            }\n        }\n\n        oss_list_node_contents_parse(p, root, \"Referer\", (aos_list_t *)referer_config, \n                                     parse_referer_str);\n        mxmlDelete(root);\n    }\n \n    return res;\n}\n\nvoid parse_sub_ctors_rule(aos_pool_t *p, mxml_node_t *xml_node, aos_list_t *sub_rule_list)\n{\n    char* value;\n    const char* node_content;\n    node_content = mxmlGetOpaque(xml_node);\n    value = apr_pstrdup(p, node_content);\n    if (NULL != value) {\n        oss_create_sub_cors_rule(p, sub_rule_list, value);\n    }\n}\n\nvoid oss_cors_rule_content_parse(aos_pool_t *p, mxml_node_t *xml_node, aos_list_t *node_list)\n{\n    const char *xml_value;\n    mxml_node_t *node; \n    oss_cors_rule_t *content;\n    content = oss_create_cors_rule(p);\n    if (content == NULL) {\n        aos_error_log(\"malloc memory for list bucket failed\\n\");\n        return;\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"MaxAgeSeconds\", NULL, NULL, MXML_DESCEND);\n    xml_value = mxmlGetOpaque(node);\n    if (NULL != xml_value) {\n        content->max_age_seconds = atoi(xml_value);\n    }\n\n    oss_list_node_contents_parse(p, xml_node, \"AllowedOrigin\", &content->allowed_origin_list, \n                                     parse_sub_ctors_rule);\n    \n    oss_list_node_contents_parse(p, xml_node, \"AllowedMethod\", &content->allowed_method_list, \n                                     parse_sub_ctors_rule);\n\n    oss_list_node_contents_parse(p, xml_node, \"AllowedHeader\", &content->allowed_head_list, \n                                     parse_sub_ctors_rule);\n\n    oss_list_node_contents_parse(p, xml_node, \"ExposeHeader\", &content->expose_head_list, \n                                     parse_sub_ctors_rule);\n\n    aos_list_add_tail(&content->node, node_list);\n}\n\nint oss_get_bucket_cors_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    aos_list_t *rule_list)\n{\n    int res = AOSE_OK;\n    mxml_node_t *root;\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        oss_list_node_contents_parse(p, root, \"CORSRule\", rule_list,\n                                     oss_cors_rule_content_parse);\n        mxmlDelete(root);\n    }\n \n    return res;\n}\n\nint oss_upload_id_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_string_t *upload_id)\n{\n    int res;\n    mxml_node_t *root;\n    const char xml_path[] = \"UploadId\";\n    char *id;\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        id = get_xmlnode_value(p, root, xml_path);\n        if (id) {\n            aos_str_set(upload_id, id);\n        }\n        mxmlDelete(root);\n    }\n\n    return res;\n}\n\nvoid oss_list_parts_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path, \n    aos_list_t *part_list)\n{\n    mxml_node_t *content_node;\n    oss_list_part_content_t *content;\n\n    content_node = mxmlFindElement(root, root, xml_path, NULL, NULL, MXML_DESCEND);\n    for ( ; content_node != NULL; ) {\n        content = oss_create_list_part_content(p);\n        oss_list_parts_content_parse(p, content_node, content);\n        aos_list_add_tail(&content->node, part_list);\n        content_node = mxmlFindElement(content_node, root, xml_path, NULL, NULL, MXML_DESCEND);\n    }\n}\n\nvoid oss_list_parts_content_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_list_part_content_t *content)\n{\n    char *part_number;\n    char *last_modified;\n    char *etag;\n    char *size;\n    const char *node_content;\n    mxml_node_t *node;\n\n    node = mxmlFindElement(xml_node, xml_node, \"PartNumber\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        part_number = apr_pstrdup(p, node_content);\n        aos_str_set(&content->part_number, part_number);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"LastModified\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        last_modified = apr_pstrdup(p, node_content);\n        aos_str_set(&content->last_modified, last_modified);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"ETag\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        etag = apr_pstrdup(p, node_content);\n        aos_str_set(&content->etag, etag);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Size\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        size = apr_pstrdup(p, node_content);\n        aos_str_set(&content->size, size);\n    }\n}\n\nint oss_list_parts_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    aos_list_t *part_list, aos_string_t *partnumber_marker, int *truncated)\n{\n    int res;\n    mxml_node_t *root;\n    const char next_partnumber_marker_xml_path[] = \"NextPartNumberMarker\";\n    const char truncated_xml_path[] = \"IsTruncated\";\n    const char parts_xml_path[] = \"Part\";\n    char *next_partnumber_marker;\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        next_partnumber_marker = get_xmlnode_value(p, root,\n                next_partnumber_marker_xml_path);\n        if (next_partnumber_marker) {\n            aos_str_set(partnumber_marker, next_partnumber_marker);\n        }\n\n        *truncated = get_truncated_from_xml(p, root, truncated_xml_path);\n\n        oss_list_parts_contents_parse(p, root, parts_xml_path, part_list);\n\n        mxmlDelete(root);\n    }\n\n    return res;\n}\n\nvoid oss_list_multipart_uploads_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    aos_list_t *upload_list)\n{\n    mxml_node_t *content_node;\n    oss_list_multipart_upload_content_t *content;\n\n    content_node = mxmlFindElement(root, root, xml_path, NULL, NULL, MXML_DESCEND);\n    for ( ; content_node != NULL; ) {\n        content = oss_create_list_multipart_upload_content(p);\n        oss_list_multipart_uploads_content_parse(p, content_node, content);\n        aos_list_add_tail(&content->node, upload_list);\n        content_node = mxmlFindElement(content_node, root, xml_path, NULL, NULL, MXML_DESCEND);\n    }\n}\n\nvoid oss_list_multipart_uploads_content_parse(aos_pool_t *p, mxml_node_t *xml_node, \n    oss_list_multipart_upload_content_t *content)\n{\n    char *key;\n    char *upload_id;\n    char *initiated;\n    const char *node_content;\n    mxml_node_t *node;\n\n    node = mxmlFindElement(xml_node, xml_node, \"Key\",NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        key = apr_pstrdup(p, node_content);\n        aos_str_set(&content->key, key);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"UploadId\",NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        upload_id = apr_pstrdup(p, node_content);\n        aos_str_set(&content->upload_id, upload_id);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Initiated\",NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        initiated = apr_pstrdup(p, node_content);\n        aos_str_set(&content->initiated, initiated);\n    }\n}\n\nint oss_list_multipart_uploads_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    aos_list_t *upload_list, aos_string_t *key_marker,\n    aos_string_t *upload_id_marker, int *truncated)\n{\n    int res;\n    mxml_node_t *root;\n    const char next_key_marker_xml_path[] = \"NextKeyMarker\";\n    const char next_upload_id_marker_xml_path[] = \"NextUploadIdMarker\";\n    const char truncated_xml_path[] = \"IsTruncated\";\n    const char uploads_xml_path[] = \"Upload\";\n    char *next_key_marker;\n    char *next_upload_id_marker;\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        next_key_marker = get_xmlnode_value(p, root, next_key_marker_xml_path);\n        if (next_key_marker) {\n            aos_str_set(key_marker, next_key_marker);\n        }\n\n        next_upload_id_marker = get_xmlnode_value(p, root, next_upload_id_marker_xml_path);\n        if (next_upload_id_marker) {\n            aos_str_set(upload_id_marker, next_upload_id_marker);\n        }\n\n        *truncated = get_truncated_from_xml(p, root, truncated_xml_path);\n\n        oss_list_multipart_uploads_contents_parse(p, root, uploads_xml_path, upload_list);\n\n        mxmlDelete(root);\n    }\n\n    return res;\n}\n\nchar *build_complete_multipart_upload_xml(aos_pool_t *p, aos_list_t *bc)\n{\n    char *xml_buff;\n    char *complete_part_xml;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node;\n    oss_complete_part_content_t *content;\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"CompleteMultipartUpload\");\n    aos_list_for_each_entry(oss_complete_part_content_t, content, bc, node) {\n        mxml_node_t *part_node = mxmlNewElement(root_node, \"Part\");\n        mxml_node_t *part_number_node = mxmlNewElement(part_node, \"PartNumber\");\n        mxml_node_t *etag_node = mxmlNewElement(part_node, \"ETag\");\n        mxmlNewText(part_number_node, 0, content->part_number.data);\n        mxmlNewText(etag_node, 0, content->etag.data);\n    }\n    \n    xml_buff = new_xml_buff(doc);\n    if (xml_buff == NULL) {\n        return NULL;\n    }\n    aos_str_set(&xml_doc, xml_buff);\n    complete_part_xml = aos_pstrdup(p, &xml_doc);\n\n    free(xml_buff);\n    mxmlDelete(doc);\n\n    return complete_part_xml;\n}\n\nvoid build_complete_multipart_upload_body(aos_pool_t *p, aos_list_t *part_list, aos_list_t *body)\n{\n    char *complete_multipart_upload_xml;\n    aos_buf_t *b;\n    \n    complete_multipart_upload_xml = build_complete_multipart_upload_xml(p, part_list);\n    aos_list_init(body);\n    b = aos_buf_pack(p, complete_multipart_upload_xml, strlen(complete_multipart_upload_xml));\n    aos_list_add_tail(&b->node, body);\n}\n\nchar *build_bucket_logging_xml(aos_pool_t *p, oss_logging_config_content_t *content)\n{\n    char *logging_xml;\n    char *xml_buff;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node, *log_node;\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"BucketLoggingStatus\");\n    log_node = mxmlNewElement(root_node, \"LoggingEnabled\");\n    if (!aos_string_is_empty(&content->target_bucket)) {\n        mxml_node_t *target_bucket_node = mxmlNewElement(log_node, \"TargetBucket\");\n        mxmlNewText(target_bucket_node, 0, content->target_bucket.data);\n    }\n\n    if (!aos_string_is_empty(&content->prefix)) {\n        mxml_node_t *prefix_node = mxmlNewElement(log_node, \"TargetPrefix\");\n        mxmlNewText(prefix_node, 0, content->prefix.data);\n    }\n    \n    xml_buff = new_xml_buff(doc);\n    if (xml_buff == NULL) {\n        return NULL;\n    }\n    aos_str_set(&xml_doc, xml_buff);\n    logging_xml = aos_pstrdup(p, &xml_doc);\n    \n    free(xml_buff);\n    mxmlDelete(doc);\n\n    return logging_xml;\n}\n\nvoid build_bucket_logging_body(aos_pool_t *p, oss_logging_config_content_t *content, aos_list_t *body)\n{\n    char *logging_xml;\n    aos_buf_t *b;\n    logging_xml = build_bucket_logging_xml(p, content);\n    aos_list_init(body);\n    b = aos_buf_pack(p, logging_xml, strlen(logging_xml));\n    aos_list_add_tail(&b->node, body);\n}\n\nchar *build_lifecycle_xml(aos_pool_t *p, aos_list_t *lifecycle_rule_list)\n{\n    char *lifecycle_xml;\n    char *xml_buff;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node;\n    oss_lifecycle_rule_content_t *content;\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"LifecycleConfiguration\");\n    aos_list_for_each_entry(oss_lifecycle_rule_content_t, content, lifecycle_rule_list, node) {\n        oss_tag_content_t *tag = NULL;\n        mxml_node_t *rule_node = mxmlNewElement(root_node, \"Rule\");\n        mxml_node_t *id_node = mxmlNewElement(rule_node, \"ID\");\n        mxml_node_t *prefix_node = mxmlNewElement(rule_node, \"Prefix\");\n        mxml_node_t *status_node = mxmlNewElement(rule_node, \"Status\");\n        mxml_node_t *expire_node = mxmlNewElement(rule_node, \"Expiration\");\n        mxmlNewText(id_node, 0, content->id.data);\n        mxmlNewText(prefix_node, 0, content->prefix.data);\n        mxmlNewText(status_node, 0, content->status.data);\n        if (content->days != INT_MAX) {\n            char value_str[64];\n            mxml_node_t *days_node = mxmlNewElement(expire_node, \"Days\");\n            apr_snprintf(value_str, sizeof(value_str), \"%d\", content->days);\n            mxmlNewText(days_node, 0, value_str);\n        } else if (content->date.len != 0 && strcmp(content->date.data, \"\") != 0) {\n            mxml_node_t *date_node = mxmlNewElement(expire_node, \"Date\");\n            mxmlNewText(date_node, 0, content->date.data);\n        } else if (content->created_before_date.len != 0 && strcmp(content->created_before_date.data, \"\") != 0) {\n            mxml_node_t *cbd_node = mxmlNewElement(expire_node, \"CreatedBeforeDate\");\n            mxmlNewText(cbd_node, 0, content->created_before_date.data);\n        }\n\n        if (content->abort_multipart_upload_dt.days != INT_MAX) {\n            char value_str[64];\n            mxml_node_t *abort_mulpart_node = mxmlNewElement(rule_node, \"AbortMultipartUpload\");\n            mxml_node_t *abort_days_node = mxmlNewElement(abort_mulpart_node, \"Days\");\n            apr_snprintf(value_str, sizeof(value_str), \"%d\", content->abort_multipart_upload_dt.days);\n            mxmlNewText(abort_days_node, 0, value_str);\n        } else if (!aos_string_is_empty(&content->abort_multipart_upload_dt.created_before_date)) {\n            mxml_node_t *abort_mulpart_node = mxmlNewElement(rule_node, \"AbortMultipartUpload\");\n            mxml_node_t *abort_date_node = mxmlNewElement(abort_mulpart_node, \"CreatedBeforeDate\");\n            mxmlNewText(abort_date_node, 0, content->abort_multipart_upload_dt.created_before_date.data);\n        }\n        \n        //tag\n        aos_list_for_each_entry(oss_tag_content_t, tag, &content->tag_list, node) {\n            mxml_node_t *tag_node = mxmlNewElement(rule_node, \"Tag\");\n            mxml_node_t *key_node = mxmlNewElement(tag_node, \"Key\");\n            mxml_node_t *value_node = mxmlNewElement(tag_node, \"Value\");\n            mxmlNewText(key_node, 0, tag->key.data);\n            mxmlNewText(value_node, 0, tag->value.data);\n        }\n    }\n    \n    xml_buff = new_xml_buff(doc);\n    if (xml_buff == NULL) {\n        return NULL;\n    }\n    aos_str_set(&xml_doc, xml_buff);\n    lifecycle_xml = aos_pstrdup(p, &xml_doc);\n    \n    free(xml_buff);\n    mxmlDelete(doc);\n\n    return lifecycle_xml;\n}\n\nvoid build_lifecycle_body(aos_pool_t *p, aos_list_t *lifecycle_rule_list, aos_list_t *body)\n{\n    char *lifecycle_xml;\n    aos_buf_t *b;\n    lifecycle_xml = build_lifecycle_xml(p, lifecycle_rule_list);\n    aos_list_init(body);\n    b = aos_buf_pack(p, lifecycle_xml, strlen(lifecycle_xml));\n    aos_list_add_tail(&b->node, body);\n}\n\nchar *build_referer_config_xml(aos_pool_t *p, oss_referer_config_t *referer_config)\n{\n    char *referer_config_xml;\n    char *xml_buff;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node;\n    mxml_node_t *sub_node;\n    oss_referer_t *referer;\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"RefererConfiguration\");\n    sub_node = mxmlNewElement(root_node, \"AllowEmptyReferer\");\n    mxmlNewText(sub_node, 0, referer_config->allow_empty_referer ? \"true\" : \"false\");\n    sub_node = mxmlNewElement(root_node, \"RefererList\");\n\n    aos_list_for_each_entry(oss_referer_t, referer, &referer_config->referer_list, node) {\n        mxml_node_t *referer_node = mxmlNewElement(sub_node, \"Referer\");\n        mxmlNewText(referer_node, 0, referer->referer.data);\n    }\n    \n    xml_buff = new_xml_buff(doc);\n    if (xml_buff == NULL) {\n        return NULL;\n    }\n    aos_str_set(&xml_doc, xml_buff);\n    referer_config_xml = aos_pstrdup(p, &xml_doc);\n    \n    free(xml_buff);\n    mxmlDelete(doc);\n\n    return referer_config_xml;\n}\n\nvoid build_referer_config_body(aos_pool_t *p, oss_referer_config_t *referer_config, aos_list_t *body)\n{\n    char *referer_config_xml;\n    aos_buf_t *b;\n    referer_config_xml = build_referer_config_xml(p, referer_config);\n    aos_list_init(body);\n    b = aos_buf_pack(p, referer_config_xml, strlen(referer_config_xml));\n    aos_list_add_tail(&b->node, body);\n}\n\nchar *build_cors_rule_xml(aos_pool_t *p, aos_list_t *rule_list)\n{\n    char *cors_rule_xml;\n    char *xml_buff;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node;\n    mxml_node_t *sub_node;\n    oss_cors_rule_t *cors_rule;\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"CORSConfiguration\");\n    aos_list_for_each_entry(oss_cors_rule_t, cors_rule, rule_list, node) {\n        oss_sub_cors_rule_t *sub_cors_rule;\n        sub_node = mxmlNewElement(root_node, \"CORSRule\");\n\n        aos_list_for_each_entry(oss_sub_cors_rule_t, sub_cors_rule, &cors_rule->allowed_origin_list, node) {\n            mxml_node_t *list_node = mxmlNewElement(sub_node, \"AllowedOrigin\");\n            mxmlNewText(list_node, 0, sub_cors_rule->rule.data);\n        }\n\n        aos_list_for_each_entry(oss_sub_cors_rule_t, sub_cors_rule, &cors_rule->allowed_method_list, node) {\n            mxml_node_t *list_node = mxmlNewElement(sub_node, \"AllowedMethod\");\n            mxmlNewText(list_node, 0, sub_cors_rule->rule.data);\n        }\n\n        aos_list_for_each_entry(oss_sub_cors_rule_t, sub_cors_rule, &cors_rule->allowed_head_list, node) {\n            mxml_node_t *list_node = mxmlNewElement(sub_node, \"AllowedHeader\");\n            mxmlNewText(list_node, 0, sub_cors_rule->rule.data);\n        }\n\n        aos_list_for_each_entry(oss_sub_cors_rule_t, sub_cors_rule, &cors_rule->expose_head_list, node) {\n            mxml_node_t *list_node = mxmlNewElement(sub_node, \"ExposeHeader\");\n            mxmlNewText(list_node, 0, sub_cors_rule->rule.data);\n        }\n\n        if (cors_rule->max_age_seconds != INT_MAX) {\n            char value_str[64];\n            mxml_node_t *list_node = mxmlNewElement(sub_node, \"MaxAgeSeconds\");\n            apr_snprintf(value_str, sizeof(value_str), \"%d\", cors_rule->max_age_seconds);\n            mxmlNewText(list_node, 0, value_str);\n        }\n    }\n\n    xml_buff = new_xml_buff(doc);\n    if (xml_buff == NULL) {\n        return NULL;\n    }\n    aos_str_set(&xml_doc, xml_buff);\n    cors_rule_xml = aos_pstrdup(p, &xml_doc);\n    \n    free(xml_buff);\n    mxmlDelete(doc);\n\n    return cors_rule_xml;\n}\n\nvoid build_cors_rule_body(aos_pool_t *p, aos_list_t *rule_list, aos_list_t *body)\n{\n    char *cors_rule_xml;\n    aos_buf_t *b;\n    cors_rule_xml = build_cors_rule_xml(p, rule_list);\n    aos_list_init(body);\n    b = aos_buf_pack(p, cors_rule_xml, strlen(cors_rule_xml));\n    aos_list_add_tail(&b->node, body);\n}\n\nchar *build_website_config_xml(aos_pool_t *p, oss_website_config_t *website_config)\n{\n    char *website_config_xml;\n    char *xml_buff;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node;\n    mxml_node_t *sub_node, *suffix_node, *key_node;\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"WebsiteConfiguration\");\n    sub_node = mxmlNewElement(root_node, \"IndexDocument\");\n    suffix_node = mxmlNewElement(sub_node, \"Suffix\");\n    mxmlNewText(suffix_node, 0, website_config->suffix_str.data);\n    if (!aos_string_is_empty(&website_config->key_str)) {\n        sub_node = mxmlNewElement(root_node, \"ErrorDocument\");\n        key_node = mxmlNewElement(sub_node, \"Key\");\n        mxmlNewText(key_node, 0, website_config->key_str.data);\n    }\n\n    xml_buff = new_xml_buff(doc);\n    if (xml_buff == NULL) {\n        return NULL;\n    }\n    aos_str_set(&xml_doc, xml_buff);\n    website_config_xml = aos_pstrdup(p, &xml_doc);\n    \n    free(xml_buff);\n    mxmlDelete(doc);\n\n    return website_config_xml;\n}\n\nvoid build_website_config_body(aos_pool_t *p, oss_website_config_t *website_config, aos_list_t *body)\n{\n    char *website_config_xml;\n    aos_buf_t *b;\n    website_config_xml = build_website_config_xml(p, website_config);\n    aos_list_init(body);\n    b = aos_buf_pack(p, website_config_xml, strlen(website_config_xml));\n    aos_list_add_tail(&b->node, body);\n}\n\nchar *build_bucket_storage_class_xml(aos_pool_t *p, oss_storage_class_type_e storage_class)\n{\n    char *bucket_storage_class_xml;\n    char *xml_buff;\n    const char *storage_class_str;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node;\n    mxml_node_t *storage_node;\n\n    storage_class_str = get_oss_storage_class_str(storage_class);\n    if (!storage_class_str) {\n        return NULL;\n    }\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"CreateBucketConfiguration\");\n    storage_node = mxmlNewElement(root_node, \"StorageClass\");\n    mxmlNewText(storage_node, 0, storage_class_str);\n    \n    xml_buff = new_xml_buff(doc);\n    if (xml_buff == NULL) {\n        return NULL;\n    }\n    aos_str_set(&xml_doc, xml_buff);\n    bucket_storage_class_xml = aos_pstrdup(p, &xml_doc);\n    \n    free(xml_buff);\n    mxmlDelete(doc);\n\n    return bucket_storage_class_xml;\n}\n\nvoid build_bucket_storage_class(aos_pool_t *p, oss_storage_class_type_e storage_class, aos_list_t *body)\n{\n    char *bucket_storage_class_xml;\n    aos_buf_t *b;\n    bucket_storage_class_xml = build_bucket_storage_class_xml(p, storage_class);\n    if (bucket_storage_class_xml)\n    {\n        aos_list_init(body);\n        b = aos_buf_pack(p, bucket_storage_class_xml, strlen(bucket_storage_class_xml));\n        aos_list_add_tail(&b->node, body);\n    }\n}\n\nchar *build_bucket_storage_capacity_xml(aos_pool_t *p, long storage_capacity)\n{\n    char *bucket_storage_capacity_xml;\n    char *xml_buff;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node;\n    mxml_node_t *storage_node;\n    char value_str[64];\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"BucketUserQos\");\n    apr_snprintf(value_str, sizeof(value_str), \"%ld\", storage_capacity);\n    storage_node = mxmlNewElement(root_node, \"StorageCapacity\");\n    mxmlNewText(storage_node, 0, value_str);\n\n    xml_buff = new_xml_buff(doc);\n    if (xml_buff == NULL) {\n        return NULL;\n    }\n    aos_str_set(&xml_doc, xml_buff);\n    bucket_storage_capacity_xml = aos_pstrdup(p, &xml_doc);\n    \n    free(xml_buff);\n    mxmlDelete(doc);\n\n    return bucket_storage_capacity_xml;\n}\n\nvoid build_bucket_storage_capacity_body(aos_pool_t *p, long storage_capacity, aos_list_t *body)\n{\n    char *bucket_storage_capacity_xml;\n    aos_buf_t *b;\n    bucket_storage_capacity_xml = build_bucket_storage_capacity_xml(p, storage_capacity);\n    if (bucket_storage_capacity_xml)\n    {\n        aos_list_init(body);\n        b = aos_buf_pack(p, bucket_storage_capacity_xml, strlen(bucket_storage_capacity_xml));\n        aos_list_add_tail(&b->node, body);\n    }\n}\n\nint oss_lifecycle_rules_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_list_t *lifecycle_rule_list)\n{\n    int res;\n    mxml_node_t *root = NULL;\n    const char rule_xml_path[] = \"Rule\";\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        oss_lifecycle_rule_contents_parse(p, root, rule_xml_path, lifecycle_rule_list);\n        mxmlDelete(root);\n    }\n\n    return res;\n}\n\nvoid oss_lifecycle_rule_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    aos_list_t *lifecycle_rule_list)\n{\n    mxml_node_t *node;\n    oss_lifecycle_rule_content_t *content;\n\n    node = mxmlFindElement(root, root, xml_path, NULL, NULL, MXML_DESCEND);\n    for ( ; node != NULL; ) {\n        content = oss_create_lifecycle_rule_content(p);\n        oss_lifecycle_rule_content_parse(p, node, content);\n        aos_list_add_tail(&content->node, lifecycle_rule_list);\n        node = mxmlFindElement(node, root, xml_path, NULL, NULL, MXML_DESCEND);\n    }\n}\n\nvoid oss_lifecycle_rule_content_parse(aos_pool_t *p, mxml_node_t * xml_node,\n    oss_lifecycle_rule_content_t *content)\n{\n    char *id;\n    char *prefix;\n    char *status;\n    const char *node_content;\n    mxml_node_t *node;\n\n    node = mxmlFindElement(xml_node, xml_node, \"ID\",NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        id = apr_pstrdup(p, node_content);\n        aos_str_set(&content->id, id);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Prefix\",NULL, NULL,MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        prefix = apr_pstrdup(p, node_content);\n        aos_str_set(&content->prefix, prefix);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Status\",NULL, NULL,MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        status = apr_pstrdup(p, node_content);\n        aos_str_set(&content->status, status);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Expiration\",NULL, NULL,MXML_DESCEND);\n    if (NULL != node) {\n        oss_lifecycle_rule_expire_parse(p, node, content);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"AbortMultipartUpload\",NULL, NULL,MXML_DESCEND);\n    if (NULL != node) {\n        oss_lifecycle_rule_date_parse(p, node, &content->abort_multipart_upload_dt);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Tag\", NULL, NULL, MXML_DESCEND);\n    for (; node != NULL; ) {\n        oss_tag_content_t *tag = oss_create_tag_content(p);\n        oss_lifecycle_rule_tag_parse(p, node, tag);\n        aos_list_add_tail(&tag->node, &content->tag_list);\n        node = mxmlFindElement(node, xml_node, \"Tag\", NULL, NULL, MXML_DESCEND);\n    }\n}\n\nvoid oss_lifecycle_rule_date_parse(aos_pool_t *p, mxml_node_t * xml_node,\n    oss_lifecycle_rule_date_t *rule_date)\n{\n    char* days;\n    char *created_before_date;\n    mxml_node_t *node;\n    const char *node_content;\n\n    node = mxmlFindElement(xml_node, xml_node, \"Days\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        days = apr_pstrdup(p, node_content);\n        rule_date->days = atoi(days);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"CreatedBeforeDate\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        created_before_date = apr_pstrdup(p, node_content);\n        aos_str_set(&rule_date->created_before_date, created_before_date);\n    } \n}\n\n\nvoid oss_lifecycle_rule_expire_parse(aos_pool_t *p, mxml_node_t * xml_node,\n    oss_lifecycle_rule_content_t *content)\n{\n    char* days;\n    char *date;\n    char *created_before_date;\n    mxml_node_t *node;\n    const char *node_content;\n\n    node = mxmlFindElement(xml_node, xml_node, \"Days\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        days = apr_pstrdup(p, node_content);\n        content->days = atoi(days);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Date\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node) {\n        date = apr_pstrdup(p, node_content);\n        aos_str_set(&content->date, date);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"CreatedBeforeDate\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        created_before_date = apr_pstrdup(p, node_content);\n        aos_str_set(&content->created_before_date, created_before_date);\n    } \n}\n\nvoid oss_lifecycle_rule_tag_parse(aos_pool_t *p, mxml_node_t * xml_node,\n    oss_tag_content_t *tag)\n{\n    mxml_node_t *node;\n    const char *node_content;\n\n    node = mxmlFindElement(xml_node, xml_node, \"Key\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        char *key;\n        key = apr_pstrdup(p, node_content);\n        aos_str_set(&tag->key, key);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Value\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        char *value;\n        value = apr_pstrdup(p, node_content);\n        aos_str_set(&tag->value, value);\n    }\n}\n\nvoid oss_delete_objects_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    aos_list_t *object_list)\n{\n    mxml_node_t *node;\n\n    node = mxmlFindElement(root, root, xml_path, NULL, NULL, MXML_DESCEND);\n    for ( ; node != NULL; ) {\n        oss_object_key_t *content = oss_create_oss_object_key(p);\n        oss_object_key_parse(p, node, content);\n        aos_list_add_tail(&content->node, object_list);\n        node = mxmlFindElement(node, root, xml_path, NULL, NULL, MXML_DESCEND);\n    }\n}\n\nvoid oss_object_key_parse(aos_pool_t *p, mxml_node_t * xml_node,\n    oss_object_key_t *content)\n{   \n    char *key;\n    char *encoded_key;\n    const char *node_content;\n    mxml_node_t *node;\n    \n    node = mxmlFindElement(xml_node, xml_node, \"Key\",NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        encoded_key = (char*)node_content;\n        key = (char *) aos_palloc(p, strlen(encoded_key) + 1);\n        aos_url_decode(encoded_key, key);\n        aos_str_set(&content->key, key);\n    }\n}\n\nint oss_delete_objects_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_list_t *object_list)\n{\n    int res;\n    mxml_node_t *root = NULL;\n    const char deleted_xml_path[] = \"Deleted\";\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        oss_delete_objects_contents_parse(p, root, deleted_xml_path, object_list);\n        mxmlDelete(root);\n    }\n\n    return res;\n}\n\nvoid oss_publish_url_parse(aos_pool_t *p, mxml_node_t *node, oss_live_channel_publish_url_t *content)\n{   \n    char *url;\n    const char *node_content;\n    \n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        url = apr_pstrdup(p, node_content);\n        aos_str_set(&content->publish_url, url);\n    }\n}\n\nvoid oss_play_url_parse(aos_pool_t *p, mxml_node_t *node, oss_live_channel_play_url_t *content)\n{   \n    char *url;\n    const char *node_content;\n    \n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        url = apr_pstrdup(p, node_content);\n        aos_str_set(&content->play_url, url);\n    }\n}\n\nvoid oss_publish_urls_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    aos_list_t *publish_xml_list)\n{\n    mxml_node_t *node;\n\n    node = mxmlFindElement(root, root, xml_path, NULL, NULL, MXML_DESCEND);\n    for ( ; node != NULL; ) {\n        oss_live_channel_publish_url_t *content = oss_create_live_channel_publish_url(p);\n        oss_publish_url_parse(p, node, content);\n        aos_list_add_tail(&content->node, publish_xml_list);\n        node = mxmlFindElement(node, root, xml_path, NULL, NULL, MXML_DESCEND);\n    }\n}\n\nvoid oss_play_urls_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    aos_list_t *play_xml_list)\n{\n    mxml_node_t *node;\n\n    node = mxmlFindElement(root, root, xml_path, NULL, NULL, MXML_DESCEND);\n    for ( ; node != NULL; ) {\n        oss_live_channel_play_url_t *content = oss_create_live_channel_play_url(p);\n        oss_play_url_parse(p, node, content);\n        aos_list_add_tail(&content->node, play_xml_list);\n        node = mxmlFindElement(node, root, xml_path, NULL, NULL, MXML_DESCEND);\n    }\n}\n\nvoid oss_create_live_channel_content_parse(aos_pool_t *p, mxml_node_t *root,\n    const char *publish_xml_path, aos_list_t *publish_url_list, \n    const char *play_xml_path, aos_list_t *play_url_list)\n{\n    mxml_node_t *node;\n    const char url_xml_path[] = \"Url\";\n\n    node = mxmlFindElement(root, root, publish_xml_path, NULL, NULL, MXML_DESCEND);\n    if (NULL != node) {\n        oss_publish_urls_contents_parse(p, node, url_xml_path, publish_url_list);\n    }\n\n    node = mxmlFindElement(root, root, play_xml_path, NULL, NULL, MXML_DESCEND);\n    if (NULL != node) {\n        oss_play_urls_contents_parse(p, node, url_xml_path, play_url_list);\n    }\n}    \n\nint oss_create_live_channel_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    aos_list_t *publish_url_list, aos_list_t *play_url_list)\n{\n    int res;\n    mxml_node_t *root = NULL;\n    const char publish_urls_xml_path[] = \"PublishUrls\";\n    const char play_urls_xml_path[] = \"PlayUrls\";\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        oss_create_live_channel_content_parse(p, root, publish_urls_xml_path, publish_url_list,\n            play_urls_xml_path, play_url_list);\n        mxmlDelete(root);\n    }\n\n    return res;\n}\n\nchar *build_create_live_channel_xml(aos_pool_t *p, oss_live_channel_configuration_t *config)\n{\n    char *xml_buff;\n    char *complete_part_xml;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node;\n    char value_str[64];\n    mxml_node_t *description_node;\n    mxml_node_t *status_node;\n    mxml_node_t *target_node;\n    mxml_node_t *type_node;\n    mxml_node_t *frag_duration_node;\n    mxml_node_t *frag_count_node;\n    mxml_node_t *play_list_node;\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"LiveChannelConfiguration\");\n\n    description_node = mxmlNewElement(root_node, \"Description\");\n    mxmlNewText(description_node, 0, config->description.data);\n\n    status_node = mxmlNewElement(root_node, \"Status\");\n    mxmlNewText(status_node, 0, config->status.data);\n\n    // target\n    target_node = mxmlNewElement(root_node, \"Target\");\n    type_node = mxmlNewElement(target_node, \"Type\");\n    mxmlNewText(type_node, 0, config->target.type.data);\n\n    apr_snprintf(value_str, sizeof(value_str), \"%d\", config->target.frag_duration);\n    frag_duration_node = mxmlNewElement(target_node, \"FragDuration\");\n    mxmlNewText(frag_duration_node, 0, value_str);\n\n    apr_snprintf(value_str, sizeof(value_str), \"%d\", config->target.frag_count);\n    frag_count_node = mxmlNewElement(target_node, \"FragCount\");\n    mxmlNewText(frag_count_node, 0, value_str);\n\n    play_list_node = mxmlNewElement(target_node, \"PlaylistName\");\n    mxmlNewText(play_list_node, 0, config->target.play_list_name.data);\n\n    // dump\n\txml_buff = new_xml_buff(doc);\n\tif (xml_buff == NULL) {\n\t\treturn NULL;\n\t}\n\taos_str_set(&xml_doc, xml_buff);\n\tcomplete_part_xml = aos_pstrdup(p, &xml_doc);\n\n\tfree(xml_buff);\n\tmxmlDelete(doc);\n\n    return complete_part_xml;\n}\n\nvoid build_create_live_channel_body(aos_pool_t *p, oss_live_channel_configuration_t *config, aos_list_t *body)\n{\n    char *live_channel_xml;\n    aos_buf_t *b;\n\n    live_channel_xml = build_create_live_channel_xml(p, config);\n    aos_list_init(body);\n    b = aos_buf_pack(p, live_channel_xml, strlen(live_channel_xml));\n    aos_list_add_tail(&b->node, body);\n}\n\n\nvoid oss_live_channel_info_target_content_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_live_channel_target_t *target)\n{\n    char *type;\n    char *frag_duration;\n    char *frag_count;\n    char *play_list;\n    const char *node_content;\n    mxml_node_t *node;\n\n    node = mxmlFindElement(xml_node, xml_node, \"Type\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        type = apr_pstrdup(p, node_content);\n        aos_str_set(&target->type, type);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"FragDuration\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        frag_duration = apr_pstrdup(p, node_content);\n        target->frag_duration = atoi(frag_duration);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"FragCount\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        frag_count = apr_pstrdup(p, node_content);\n        target->frag_count = atoi(frag_count);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"PlaylistName\",NULL, NULL,MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        play_list = apr_pstrdup(p, node_content);\n        aos_str_set(&target->play_list_name, play_list);\n    }\n}\n\nvoid oss_live_channel_info_content_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    oss_live_channel_configuration_t *info)\n{\n    mxml_node_t *cofig_node;\n    mxml_node_t *target_node;\n\n    cofig_node = mxmlFindElement(root, root, xml_path, NULL, NULL, MXML_DESCEND);\n    if (NULL != cofig_node) {\n        char *description;\n        char *status;\n        const char *node_content;\n        mxml_node_t *node;\n\n        node = mxmlFindElement(cofig_node, cofig_node, \"Description\", NULL, NULL, MXML_DESCEND);\n        node_content = mxmlGetOpaque(node);\n        if (NULL != node_content) {\n            description = apr_pstrdup(p, node_content);\n            aos_str_set(&info->description, description);\n        }\n\n        node = mxmlFindElement(cofig_node, cofig_node, \"Status\", NULL, NULL, MXML_DESCEND);\n        node_content = mxmlGetOpaque(node);\n        if (NULL != node_content) {\n            status = apr_pstrdup(p, node_content);\n            aos_str_set(&info->status, status);\n        }\n\n        target_node = mxmlFindElement(cofig_node, cofig_node, \"Target\", NULL, NULL, MXML_DESCEND);\n        if (NULL != target_node) {\n            oss_live_channel_info_target_content_parse(p, target_node, &info->target);\n        }\n    }\n}\n\nint oss_live_channel_info_parse_from_body(aos_pool_t *p, aos_list_t *bc, oss_live_channel_configuration_t *info)\n{\n    int res;\n    mxml_node_t *root;\n    const char xml_path[] = \"LiveChannelConfiguration\";\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        oss_live_channel_info_content_parse(p, root, xml_path, info);\n        mxmlDelete(root);\n    }\n\n    return res;\n}\n\nvoid oss_live_channel_stat_video_content_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_video_stat_t *video_stat)\n{\n    char *width;\n    char *height;\n    char *frame_rate;\n    char *band_width;\n    char *codec;\n    const char *node_content;\n    mxml_node_t *node;\n\n    node = mxmlFindElement(xml_node, xml_node, \"Width\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        width = apr_pstrdup(p, node_content);\n        video_stat->width = atoi(width);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Height\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        height = apr_pstrdup(p, node_content);\n        video_stat->height = atoi(height);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"FrameRate\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        frame_rate = apr_pstrdup(p, node_content);\n        video_stat->frame_rate = atoi(frame_rate);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Bandwidth\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        band_width = apr_pstrdup(p, node_content);\n        video_stat->band_width = atoi(band_width);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Codec\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        codec = apr_pstrdup(p, node_content);\n        aos_str_set(&video_stat->codec, codec);\n    }\n}\n\nvoid oss_live_channel_stat_audio_content_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_audio_stat_t *audio_stat)\n{\n    char *band_width;\n    char *sample_rate;\n    char *codec;\n    const char *node_content;\n    mxml_node_t *node;\n\n    node = mxmlFindElement(xml_node, xml_node, \"Bandwidth\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        band_width = apr_pstrdup(p, node_content);\n        audio_stat->band_width = atoi(band_width);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"SampleRate\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        sample_rate = apr_pstrdup(p, node_content);\n        audio_stat->sample_rate = atoi(sample_rate);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Codec\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        codec = apr_pstrdup(p, node_content);\n        aos_str_set(&audio_stat->codec, codec);\n    }\n}\n\nvoid oss_live_channel_stat_content_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path, oss_live_channel_stat_t *stat)\n{\n    mxml_node_t *stat_node;\n\n    stat_node = mxmlFindElement(root, root, xml_path, NULL, NULL, MXML_DESCEND);\n    if (NULL != stat_node) {\n        char *status;\n        char *connected_time;\n        char *remote_addr;\n        const char *node_content;\n        mxml_node_t *node;\n\n        node = mxmlFindElement(stat_node, stat_node, \"Status\", NULL, NULL, MXML_DESCEND);\n        node_content = mxmlGetOpaque(node);\n        if (NULL != node_content) {\n            status = apr_pstrdup(p, node_content);\n            aos_str_set(&stat->pushflow_status, status);\n        }\n\n        node = mxmlFindElement(stat_node, stat_node, \"ConnectedTime\", NULL, NULL, MXML_DESCEND);\n        node_content = mxmlGetOpaque(node);\n        if (NULL != node_content) {\n            connected_time = apr_pstrdup(p, node_content);\n            aos_str_set(&stat->connected_time, connected_time);\n        }\n\n        node = mxmlFindElement(stat_node, stat_node, \"RemoteAddr\", NULL, NULL, MXML_DESCEND);\n        node_content = mxmlGetOpaque(node);\n        if (NULL != node_content) {\n            remote_addr = apr_pstrdup(p, node_content);\n            aos_str_set(&stat->remote_addr, remote_addr);\n        }\n\n        node = mxmlFindElement(stat_node, stat_node, \"Video\", NULL, NULL, MXML_DESCEND);\n        if (NULL != node) {\n            oss_live_channel_stat_video_content_parse(p, node, &stat->video_stat);\n        }\n\n        node = mxmlFindElement(stat_node, stat_node, \"Audio\", NULL, NULL, MXML_DESCEND);\n        if (NULL != node) {\n            oss_live_channel_stat_audio_content_parse(p, node, &stat->audio_stat);\n        }\n    }\n}\n\nint oss_live_channel_stat_parse_from_body(aos_pool_t *p, aos_list_t *bc, oss_live_channel_stat_t *stat)\n{\n    int res;\n    mxml_node_t *root;\n    const char xml_path[] = \"LiveChannelStat\";\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        oss_live_channel_stat_content_parse(p, root, xml_path, stat);\n        mxmlDelete(root);\n    }\n\n    return res;\n}\n\nvoid oss_list_live_channel_content_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_live_channel_content_t *content)\n{\n    char *name;\n    char *description;\n    char *status;\n    char *last_modified;\n    const char *node_content;\n    mxml_node_t *node;\n\n    node = mxmlFindElement(xml_node, xml_node, \"Name\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        name = apr_pstrdup(p, node_content);\n        aos_str_set(&content->name, name);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Description\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        description = apr_pstrdup(p, node_content);\n        aos_str_set(&content->description, description);\n    }\n    else {\n        aos_str_set(&content->description, \"\");\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"Status\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        status = apr_pstrdup(p, node_content);\n        aos_str_set(&content->status, status);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"LastModified\", NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node) {\n        last_modified = apr_pstrdup(p, node_content);\n        aos_str_set(&content->last_modified, last_modified);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"PublishUrls\", NULL, NULL, MXML_DESCEND);\n    if (NULL != node) {\n        oss_publish_urls_contents_parse(p, node, \"Url\", &content->publish_url_list);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"PlayUrls\", NULL, NULL, MXML_DESCEND);\n    if (NULL != node) {\n        oss_play_urls_contents_parse(p, node, \"Url\", &content->play_url_list);\n    }\n}\n\nvoid oss_list_live_channel_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    aos_list_t *live_channel_list)\n{\n    mxml_node_t *content_node;\n    oss_live_channel_content_t *content;\n\n    content_node = mxmlFindElement(root, root, xml_path, NULL, NULL, MXML_DESCEND);\n    for ( ; content_node != NULL; ) {\n        content = oss_create_list_live_channel_content(p);\n        oss_list_live_channel_content_parse(p, content_node, content);\n        aos_list_add_tail(&content->node, live_channel_list);\n        content_node = mxmlFindElement(content_node, root, xml_path, NULL, NULL, MXML_DESCEND);\n    }\n}\n\nint oss_list_live_channel_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    aos_list_t *live_channel_list, aos_string_t *next_marker, int *truncated)\n{\n    int res;\n    mxml_node_t *root;\n    const char next_marker_xml_path[] = \"NextMarker\";\n    const char truncated_xml_path[] = \"IsTruncated\";\n    const char live_channel_xml_path[] = \"LiveChannel\";\n    char *next_partnumber_marker;\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        next_partnumber_marker = get_xmlnode_value(p, root, next_marker_xml_path);\n        if (next_partnumber_marker) {\n            aos_str_set(next_marker, next_partnumber_marker);\n        }\n\n        *truncated = get_truncated_from_xml(p, root, truncated_xml_path);\n\n        oss_list_live_channel_contents_parse(p, root, live_channel_xml_path, live_channel_list);\n\n        mxmlDelete(root);\n    }\n\n    return res;\n}\n\nvoid oss_live_channel_history_content_parse(aos_pool_t *p, mxml_node_t * xml_node,\n    oss_live_record_content_t *content)\n{\n    char *start_time;\n    char *end_time;\n    char *remote_addr;\n    const char *node_content;\n    mxml_node_t *node;\n\n    node = mxmlFindElement(xml_node, xml_node, \"StartTime\",NULL, NULL, MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        start_time = apr_pstrdup(p, node_content);\n        aos_str_set(&content->start_time, start_time);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"EndTime\",NULL, NULL,MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node_content) {\n        end_time = apr_pstrdup(p, node_content);\n        aos_str_set(&content->end_time, end_time);\n    }\n\n    node = mxmlFindElement(xml_node, xml_node, \"RemoteAddr\",NULL, NULL,MXML_DESCEND);\n    node_content = mxmlGetOpaque(node);\n    if (NULL != node) {\n        remote_addr = apr_pstrdup(p, node_content);\n        aos_str_set(&content->remote_addr, remote_addr);\n    }\n}\n\nvoid oss_live_channel_history_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    aos_list_t *live_record_list)\n{\n    mxml_node_t *node;\n    oss_live_record_content_t *content;\n\n    node = mxmlFindElement(root, root, xml_path, NULL, NULL, MXML_DESCEND);\n    for ( ; node != NULL; ) {\n        content = oss_create_live_record_content(p);\n        oss_live_channel_history_content_parse(p, node, content);\n        aos_list_add_tail(&content->node, live_record_list);\n        node = mxmlFindElement(node, root, xml_path, NULL, NULL, MXML_DESCEND);\n    }\n}\n\nint oss_live_channel_history_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_list_t *live_record_list)\n{\n    int res;\n    mxml_node_t *root = NULL;\n    const char rule_xml_path[] = \"LiveRecord\";\n\n    res = get_xmldoc(bc, &root);\n    if (res == AOSE_OK) {\n        oss_live_channel_history_contents_parse(p, root, rule_xml_path, live_record_list);\n        mxmlDelete(root);\n    }\n\n    return res;\n}\n\nchar *build_objects_xml(aos_pool_t *p, aos_list_t *object_list, const char *quiet)\n{\n    char *object_xml;\n    char *xml_buff;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node;\n    oss_object_key_t *content;\n    mxml_node_t *quiet_node;\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"Delete\");\n    quiet_node = mxmlNewElement(root_node, \"Quiet\");\n    mxmlNewText(quiet_node, 0, quiet);\n    aos_list_for_each_entry(oss_object_key_t, content, object_list, node) {\n        mxml_node_t *object_node = mxmlNewElement(root_node, \"Object\");\n        mxml_node_t *key_node = mxmlNewElement(object_node, \"Key\");\n        mxmlNewText(key_node, 0, content->key.data);\n    }\n\n    xml_buff = new_xml_buff(doc);\n    if (xml_buff == NULL) {\n        return NULL;\n    }\n    aos_str_set(&xml_doc, xml_buff);\n    object_xml = aos_pstrdup(p, &xml_doc);\n\n    free(xml_buff);\n    mxmlDelete(doc);\n\n    return object_xml;\n}\n\nvoid build_delete_objects_body(aos_pool_t *p, aos_list_t *object_list, int is_quiet, aos_list_t *body)\n{\n    char *objects_xml;\n    aos_buf_t *b;\n    char *quiet;\n    quiet = is_quiet > 0 ? \"true\": \"false\";\n    objects_xml = build_objects_xml(p, object_list, quiet);\n    aos_list_init(body);\n    b = aos_buf_pack(p, objects_xml, strlen(objects_xml));\n    aos_list_add_tail(&b->node, body);\n}\n\nmxml_node_t\t*set_xmlnode_value_str(mxml_node_t *parent, const char *name, const aos_string_t *value)\n{\n    mxml_node_t *node;\n    char buff[AOS_MAX_XML_NODE_VALUE_LEN];\n    node = mxmlNewElement(parent, name);\n    apr_snprintf(buff, AOS_MAX_XML_NODE_VALUE_LEN, \"%.*s\", value->len, value->data);\n    return mxmlNewText(node, 0, buff);\n}\n\nmxml_node_t\t*set_xmlnode_value_int(mxml_node_t *parent, const char *name, int value)\n{\n    mxml_node_t *node;\n    char buff[AOS_MAX_INT64_STRING_LEN];\n    node = mxmlNewElement(parent, name);\n    apr_snprintf(buff, AOS_MAX_INT64_STRING_LEN, \"%d\", value);\n    return mxmlNewText(node, 0, buff);\n}\n\nmxml_node_t\t*set_xmlnode_value_int64(mxml_node_t *parent, const char *name, int64_t value)\n{\n    mxml_node_t *node;\n    char buff[AOS_MAX_INT64_STRING_LEN];\n    node = mxmlNewElement(parent, name);\n    apr_snprintf(buff, AOS_MAX_INT64_STRING_LEN, \"%\" APR_INT64_T_FMT, value);\n    return mxmlNewText(node, 0, buff);\n}\n\nmxml_node_t\t*set_xmlnode_value_uint64(mxml_node_t *parent, const char *name, uint64_t value)\n{\n    mxml_node_t *node;\n    char buff[AOS_MAX_UINT64_STRING_LEN];\n    node = mxmlNewElement(parent, name);\n    apr_snprintf(buff, AOS_MAX_UINT64_STRING_LEN, \"%\" APR_UINT64_T_FMT, value);\n    return mxmlNewText(node, 0, buff);\n}\n\nint get_xmlnode_value_str(aos_pool_t *p, mxml_node_t *xml_node, const char *xml_path, aos_string_t *value)\n{\n    char *node_content;\n    node_content = get_xmlnode_value(p, xml_node, xml_path);\n    if (NULL == node_content) {\n        return AOS_FALSE;\n    }\n    aos_str_set(value, node_content);\n    return AOS_TRUE;\n}\n\nint get_xmlnode_value_int(aos_pool_t *p, mxml_node_t *xml_node, const char *xml_path, int *value)\n{\n    char *node_content;\n    node_content = get_xmlnode_value(p, xml_node, xml_path);\n    if (NULL == node_content) {\n        return AOS_FALSE;\n    }\n    *value = atoi(node_content);\n    return AOS_TRUE;\n}\n\nint get_xmlnode_value_int64(aos_pool_t *p, mxml_node_t *xml_node, const char *xml_path, int64_t *value)\n{\n    char *node_content;\n    node_content = get_xmlnode_value(p, xml_node, xml_path);\n    if (NULL == node_content) {\n        return AOS_FALSE;\n    }\n    *value = aos_atoi64(node_content);\n    return AOS_TRUE;\n}\n\nint get_xmlnode_value_uint64(aos_pool_t *p, mxml_node_t *xml_node, const char *xml_path, uint64_t *value)\n{\n    char *node_content;\n    node_content = get_xmlnode_value(p, xml_node, xml_path);\n    if (NULL == node_content) {\n        return AOS_FALSE;\n    }\n    *value = aos_atoui64(node_content);\n    return AOS_TRUE;\n}\n\nchar *oss_build_checkpoint_xml(aos_pool_t *p, const oss_checkpoint_t *checkpoint)\n{\n    char *checkpoint_xml;\n    char *xml_buff;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node;\n    mxml_node_t *local_node;\n    mxml_node_t *object_node;\n    mxml_node_t *cpparts_node;\n    mxml_node_t *parts_node;\n    int i = 0;\n\n    if (p == NULL) {\n        return NULL;\n    }\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"Checkpoint\");\n\n    // MD5\n    set_xmlnode_value_str(root_node, \"MD5\", &checkpoint->md5);\n\n    // Type\n    set_xmlnode_value_int(root_node, \"Type\", checkpoint->cp_type);\n\n    // LocalFile\n    local_node = mxmlNewElement(root_node, \"LocalFile\");\n    // LocalFile.Path\n    set_xmlnode_value_str(local_node, \"Path\", &checkpoint->file_path);\n    // LocalFile.Size\n    set_xmlnode_value_int64(local_node, \"Size\", checkpoint->file_size);\n    // LocalFile.LastModified\n    set_xmlnode_value_int64(local_node, \"LastModified\", checkpoint->file_last_modified);\n    // LocalFile.MD5\n    set_xmlnode_value_str(local_node, \"MD5\", &checkpoint->file_md5);\n\n    // Object\n    object_node = mxmlNewElement(root_node, \"Object\");\n    // Object.Key\n    set_xmlnode_value_str(object_node, \"Key\", &checkpoint->object_name);\n    // Object.Size\n    set_xmlnode_value_int64(object_node, \"Size\", checkpoint->object_size);\n    // Object.LastModified\n    set_xmlnode_value_str(object_node, \"LastModified\", &checkpoint->object_last_modified);\n    // Object.ETag\n    set_xmlnode_value_str(object_node, \"ETag\", &checkpoint->object_etag);\n\n    // UploadId\n    set_xmlnode_value_str(root_node, \"UploadId\", &checkpoint->upload_id);\n\n    // CpParts\n    cpparts_node = mxmlNewElement(root_node, \"CPParts\");\n    // CpParts.Number\n    set_xmlnode_value_int(cpparts_node, \"Number\", checkpoint->part_num);\n    // CpParts.Size\n    set_xmlnode_value_int64(cpparts_node, \"Size\", checkpoint->part_size);\n    // CpParts.Parts\n    parts_node = mxmlNewElement(cpparts_node, \"Parts\");\n    for (i = 0; i < checkpoint->part_num; i++) {\n        mxml_node_t *part_node = mxmlNewElement(parts_node, \"Part\");\n        set_xmlnode_value_int(part_node, \"Index\", checkpoint->parts[i].index);\n        set_xmlnode_value_int64(part_node, \"Offset\", checkpoint->parts[i].offset);\n        set_xmlnode_value_int64(part_node, \"Size\", checkpoint->parts[i].size);\n        set_xmlnode_value_int(part_node, \"Completed\", checkpoint->parts[i].completed);\n        set_xmlnode_value_str(part_node, \"ETag\", &checkpoint->parts[i].etag);\n        set_xmlnode_value_uint64(part_node, \"Crc64\", checkpoint->parts[i].crc64);\n    }\n\n    // dump\n    xml_buff = new_xml_buff(doc);\n    if (xml_buff == NULL) {\n        return NULL;\n    }\n    aos_str_set(&xml_doc, xml_buff);\n    checkpoint_xml = aos_pstrdup(p, &xml_doc);\n\n    free(xml_buff);\n    mxmlDelete(doc);\n\n    return checkpoint_xml;\n}\n\nint oss_checkpoint_parse_from_body(aos_pool_t *p, const char *xml_body, oss_checkpoint_t *checkpoint)\n{\n    mxml_node_t *root;\n    mxml_node_t *local_node;\n    mxml_node_t *object_node;\n    mxml_node_t *cpparts_node;\n    mxml_node_t *parts_node;\n    mxml_node_t *node;\n    int index = 0;\n\n    root = mxmlLoadString(NULL, xml_body, MXML_OPAQUE_CALLBACK);\n    if (NULL == root) {\n        return AOSE_XML_PARSE_ERROR; \n    }\n\n    // MD5\n    get_xmlnode_value_str(p, root, \"MD5\", &checkpoint->md5);\n\n    // Type\n    get_xmlnode_value_int(p, root, \"Type\", &checkpoint->cp_type);\n\n    // LocalFile\n    local_node = mxmlFindElement(root, root, \"LocalFile\", NULL, NULL, MXML_DESCEND);\n    // LocalFile.Path\n    get_xmlnode_value_str(p, local_node, \"Path\", &checkpoint->file_path);\n    // LocalFile.Size\n    get_xmlnode_value_int64(p, local_node, \"Size\", &checkpoint->file_size);\n    // LocalFile.LastModified\n    get_xmlnode_value_int64(p, local_node, \"LastModified\", &checkpoint->file_last_modified);\n    // LocalFile.MD5\n    get_xmlnode_value_str(p, local_node, \"MD5\", &checkpoint->file_md5);\n\n    // Object\n    object_node = mxmlFindElement(root, root, \"Object\", NULL, NULL, MXML_DESCEND);\n    // Object.Key\n    get_xmlnode_value_str(p, object_node, \"Key\", &checkpoint->object_name);\n    // Object.Size\n    get_xmlnode_value_int64(p, object_node, \"Size\", &checkpoint->object_size);\n    // Object.LastModified\n    get_xmlnode_value_str(p, object_node, \"LastModified\", &checkpoint->object_last_modified);\n    // Object.ETag\n    get_xmlnode_value_str(p, object_node, \"ETag\", &checkpoint->object_etag);\n\n    // UploadId\n    get_xmlnode_value_str(p, root, \"UploadId\", &checkpoint->upload_id);\n\n    // CpParts\n    cpparts_node = mxmlFindElement(root, root, \"CPParts\", NULL, NULL, MXML_DESCEND);\n    // CpParts.Number\n    get_xmlnode_value_int(p, cpparts_node, \"Number\", &checkpoint->part_num);\n    // CpParts.Size\n    get_xmlnode_value_int64(p, cpparts_node, \"Size\", &checkpoint->part_size);\n    // CpParts.Parts\n    parts_node = mxmlFindElement(cpparts_node, cpparts_node, \"Parts\", NULL, NULL, MXML_DESCEND);\n    node = mxmlFindElement(parts_node, parts_node, \"Part\", NULL, NULL, MXML_DESCEND);\n    for ( ; node != NULL; ) {\n        get_xmlnode_value_int(p, node, \"Index\", &index);\n        checkpoint->parts[index].index = index;\n        get_xmlnode_value_int64(p, node, \"Offset\", &checkpoint->parts[index].offset);\n        get_xmlnode_value_int64(p, node, \"Size\", &checkpoint->parts[index].size);\n        get_xmlnode_value_int(p, node, \"Completed\", &checkpoint->parts[index].completed);\n        get_xmlnode_value_str(p, node, \"ETag\", &checkpoint->parts[index].etag);\n        get_xmlnode_value_uint64(p, node, \"Crc64\", &checkpoint->parts[index].crc64);\n        node = mxmlFindElement(node, parts_node, \"Part\", NULL, NULL, MXML_DESCEND);\n    }\n\n    mxmlDelete(root);\n\n    return AOSE_OK;\n}\n\nstatic char *oss_build_select_object_xml(aos_pool_t *p, const aos_string_t *expression, \n    const oss_select_object_params_t *params)\n{\n    char *select_object_xml;\n    char *xml_buff;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node;\n    mxml_node_t *input_node;\n    mxml_node_t *output_node;\n    mxml_node_t *option_node;\n    int b64_len;\n    char b64_buf[2048];\n    aos_string_t value;\n    int max_b64_expression_len = 0;\n    int32_t has_compression = 0;\n    int32_t has_csv = 0;\n\n    if (!expression || !params) {\n        return NULL;\n    }\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"SelectRequest\");\n\n    // Expression\n    max_b64_expression_len = (expression->len + 1) * 4 / 3;\n    if (max_b64_expression_len > sizeof(b64_buf)) {\n        char *tmp = (char *)malloc(max_b64_expression_len);\n        if (!tmp) {\n            return NULL;\n        }\n        b64_len = aos_base64_encode((unsigned char*)(expression->data), expression->len, tmp);\n        value.data = tmp;\n        value.len = b64_len;\n        set_xmlnode_value_str(root_node, \"Expression\", &value);\n        free(tmp);\n    } else {\n        b64_len = aos_base64_encode((unsigned char*)(expression->data), expression->len, b64_buf);\n        value.data = b64_buf;\n        value.len  = b64_len;\n        set_xmlnode_value_str(root_node, \"Expression\", &value);\n    }\n\n    // InputSerialization\n    has_compression = !aos_string_is_empty(&params->input_param.compression_type);\n    has_csv = !aos_string_is_empty(&params->input_param.file_header_info) ||\n        !aos_string_is_empty(&params->input_param.record_delimiter) ||\n        !aos_string_is_empty(&params->input_param.field_delimiter)  ||\n        !aos_string_is_empty(&params->input_param.quote_character)  ||\n        !aos_string_is_empty(&params->input_param.comment_character)||\n        !aos_string_is_empty(&params->input_param.range);\n\n    if (has_compression || has_csv) {\n        \n        input_node = mxmlNewElement(root_node, \"InputSerialization\");\n        if (has_compression) {\n            set_xmlnode_value_str(input_node, \"CompressionType\", &params->input_param.compression_type);\n        }\n        \n        if (has_csv) {\n            mxml_node_t *csv_node = mxmlNewElement(input_node, \"CSV\");\n            if (!aos_string_is_empty(&params->input_param.file_header_info)) {\n                set_xmlnode_value_str(csv_node, \"FileHeaderInfo\", &params->input_param.file_header_info);\n            }\n            if (!aos_string_is_empty(&params->input_param.record_delimiter)) {\n                value = params->input_param.record_delimiter;\n                b64_len = aos_base64_encode((unsigned char*)value.data, value.len, b64_buf);\n                value.data = b64_buf;\n                value.len = b64_len;\n                set_xmlnode_value_str(csv_node, \"RecordDelimiter\", &value);\n            }\n            if (!aos_string_is_empty(&params->input_param.field_delimiter)) {\n                value = params->input_param.field_delimiter;\n                b64_len = aos_base64_encode((unsigned char*)value.data, value.len, b64_buf);\n                value.data = b64_buf;\n                value.len = b64_len;\n                set_xmlnode_value_str(csv_node, \"FieldDelimiter\", &value);\n            }\n            if (!aos_string_is_empty(&params->input_param.quote_character)) {\n                value = params->input_param.quote_character;\n                b64_len = aos_base64_encode((unsigned char*)value.data, value.len, b64_buf);\n                value.data = b64_buf;\n                value.len = b64_len;\n                set_xmlnode_value_str(csv_node, \"QuoteCharacter\", &value);\n            }\n            if (!aos_string_is_empty(&params->input_param.comment_character)) {\n                value = params->input_param.comment_character;\n                b64_len = aos_base64_encode((unsigned char*)value.data, value.len, b64_buf);\n                value.data = b64_buf;\n                value.len = b64_len;\n                set_xmlnode_value_str(csv_node, \"CommentCharacter\", &value);\n            }\n            if (!aos_string_is_empty(&params->input_param.range)) {\n                set_xmlnode_value_str(csv_node, \"Range\", &params->input_param.range);\n            }\n        }\n    }\n\n    // OutputSerialization\n    has_csv = !aos_string_is_empty(&params->output_param.record_delimiter) ||\n        !aos_string_is_empty(&params->output_param.field_delimiter);\n    output_node = mxmlNewElement(root_node, \"OutputSerialization\");\n\n    if (has_csv) {\n        mxml_node_t *csv_node = mxmlNewElement(output_node, \"CSV\");\n        if (!aos_string_is_empty(&params->output_param.record_delimiter)) {\n            value = params->output_param.record_delimiter;\n            b64_len = aos_base64_encode((unsigned char*)value.data, value.len, b64_buf);\n            value.data = b64_buf;\n            value.len = b64_len;\n            set_xmlnode_value_str(csv_node, \"RecordDelimiter\", &value);\n        }\n        if (!aos_string_is_empty(&params->output_param.field_delimiter)) {\n            value = params->output_param.field_delimiter;\n            b64_len = aos_base64_encode((unsigned char*)value.data, value.len, b64_buf);\n            value.data = b64_buf;\n            value.len = b64_len;\n            set_xmlnode_value_str(csv_node, \"FieldDelimiter\", &value);\n        }\n    }\n\n    if (params->output_param.keep_all_columns != OSS_INVALID_VALUE) {\n        if (params->output_param.keep_all_columns) {\n            aos_str_set(&value, \"true\");\n        }\n        else {\n            aos_str_set(&value, \"false\");\n        }\n        set_xmlnode_value_str(output_node, \"KeepAllColumns\", &value);\n    }\n\n    if (params->output_param.output_rawdata != OSS_INVALID_VALUE) {\n        if (params->output_param.output_rawdata) {\n            aos_str_set(&value, \"true\");\n        }\n        else {\n            aos_str_set(&value, \"false\");\n        }\n        set_xmlnode_value_str(output_node, \"OutputRawData\", &value);\n    }\n\n    if (params->output_param.enable_payload_crc != OSS_INVALID_VALUE) {\n        if (params->output_param.enable_payload_crc) {\n            aos_str_set(&value, \"true\");\n        }\n        else {\n            aos_str_set(&value, \"false\");\n        }\n        set_xmlnode_value_str(output_node, \"EnablePayloadCrc\", &value);\n    }\n\n    aos_str_set(&value, \"false\");\n    if (params->output_param.output_header) {\n        aos_str_set(&value, \"true\");\n    }\n    set_xmlnode_value_str(output_node, \"OutputHeader\", &value);\n\n    //Options\n    option_node = mxmlNewElement(root_node, \"Options\");\n    aos_str_set(&value, \"false\");\n    if (params->option_param.skip_partial_data_record) {\n        aos_str_set(&value, \"true\");\n    }\n    set_xmlnode_value_str(option_node, \"SkipPartialDataRecord\", &value);\n\n    // dump\n    xml_buff = new_xml_buff(doc);\n    if (xml_buff == NULL) {\n        return NULL;\n    }\n    aos_str_set(&xml_doc, xml_buff);\n    select_object_xml = aos_pstrdup(p, &xml_doc);\n\n    free(xml_buff);\n    mxmlDelete(doc);\n\n    return select_object_xml;\n}\n\nvoid oss_build_select_object_body(aos_pool_t *p,\n    const aos_string_t *expression,\n    const oss_select_object_params_t *params,\n    aos_list_t *body)\n{\n    char *select_object_xml;\n    aos_buf_t *b;\n    aos_list_init(body);\n    select_object_xml = oss_build_select_object_xml(p, expression, params);\n    if (select_object_xml) {\n        b = aos_buf_pack(p, select_object_xml, strlen(select_object_xml));\n        aos_list_add_tail(&b->node, body);\n    }\n}\n\n\nstatic char *oss_build_create_select_object_meta_xml(aos_pool_t *p, const oss_select_object_meta_params_t *params)\n{\n    char *meta_xml;\n    char *xml_buff;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node;\n    mxml_node_t *input_node;\n    int b64_len;\n    char b64_buf[1024];\n    aos_string_t value;\n    int32_t has_csv = 0;\n\n    if (!params) {\n        return NULL;\n    }\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"CsvMetaRequest\");\n\n    // InputSerialization\n    input_node = mxmlNewElement(root_node, \"InputSerialization\");\n    aos_str_set(&value, \"None\");\n    set_xmlnode_value_str(input_node, \"CompressionType\", &value);\n    has_csv = !aos_string_is_empty(&params->record_delimiter) ||\n        !aos_string_is_empty(&params->field_delimiter) ||\n        !aos_string_is_empty(&params->quote_character);\n    \n    if (has_csv) {\n        mxml_node_t *csv_node = mxmlNewElement(input_node, \"CSV\");\n        if (!aos_string_is_empty(&params->record_delimiter)) {\n            value = params->record_delimiter;\n            b64_len = aos_base64_encode((unsigned char*)value.data, value.len, b64_buf);\n            value.data = b64_buf;\n            value.len = b64_len;\n            set_xmlnode_value_str(csv_node, \"RecordDelimiter\", &value);\n        }\n\n        if (!aos_string_is_empty(&params->field_delimiter)) {\n            value = params->field_delimiter;\n            b64_len = aos_base64_encode((unsigned char*)value.data, value.len, b64_buf);\n            value.data = b64_buf;\n            value.len = b64_len;\n            set_xmlnode_value_str(csv_node, \"FieldDelimiter\", &value);\n        }\n\n        if (!aos_string_is_empty(&params->quote_character)) {\n            value = params->quote_character;\n            b64_len = aos_base64_encode((unsigned char*)value.data, value.len, b64_buf);\n            value.data = b64_buf;\n            value.len = b64_len;\n            set_xmlnode_value_str(csv_node, \"QuoteCharacter\", &value);\n        }\n    }\n\n    if (params->over_write_if_existing != OSS_INVALID_VALUE) {\n        if (params->over_write_if_existing) {\n            aos_str_set(&value, \"true\");\n        }\n        else {\n            aos_str_set(&value, \"false\");\n        }\n        set_xmlnode_value_str(root_node, \"OverwriteIfExists\", &value);\n    }\n \n    // dump\n    xml_buff = new_xml_buff(doc);\n    if (xml_buff == NULL) {\n        return NULL;\n    }\n    aos_str_set(&xml_doc, xml_buff);\n    meta_xml = aos_pstrdup(p, &xml_doc);\n\n    free(xml_buff);\n    mxmlDelete(doc);\n\n    return meta_xml;\n}\n\n\nvoid oss_build_create_select_object_meta_body(aos_pool_t *p,\n    const oss_select_object_meta_params_t *params,\n    aos_list_t *body)\n{\n    char *meta_xml;\n    aos_buf_t *b;\n    aos_list_init(body);\n    meta_xml = oss_build_create_select_object_meta_xml(p, params);\n    if (meta_xml) {\n        b = aos_buf_pack(p, meta_xml, strlen(meta_xml));\n        aos_list_add_tail(&b->node, body);\n    }\n}\n\nchar *build_object_tagging_xml(aos_pool_t *p, aos_list_t *tag_list)\n{\n    char *tagging_xml;\n    char *xml_buff;\n    aos_string_t xml_doc;\n    mxml_node_t *doc;\n    mxml_node_t *root_node, *tags_node;\n    oss_tag_content_t *content;\n\n    doc = mxmlNewXML(\"1.0\");\n    root_node = mxmlNewElement(doc, \"Tagging\");\n    tags_node = mxmlNewElement(root_node, \"TagSet\");\n \n    aos_list_for_each_entry(oss_tag_content_t, content, tag_list, node) {\n        mxml_node_t *tag_node = mxmlNewElement(tags_node, \"Tag\");\n        mxml_node_t *key_node = mxmlNewElement(tag_node, \"Key\");\n        mxml_node_t *value_node = mxmlNewElement(tag_node, \"Value\");\n        mxmlNewText(key_node, 0, content->key.data);\n        mxmlNewText(value_node, 0, content->value.data);\n    }\n\n    xml_buff = new_xml_buff(doc);\n    if (xml_buff == NULL) {\n        return NULL;\n    }\n    aos_str_set(&xml_doc, xml_buff);\n    tagging_xml = aos_pstrdup(p, &xml_doc);\n\n    free(xml_buff);\n    mxmlDelete(doc);\n\n    return tagging_xml;\n}\n\nvoid build_object_tagging_body(aos_pool_t *p, aos_list_t *tag_list, aos_list_t *body)\n{\n    char *tagging_xml;\n    aos_buf_t *b;\n    tagging_xml = build_object_tagging_xml(p, tag_list);\n    aos_list_init(body);\n    b = aos_buf_pack(p, tagging_xml, strlen(tagging_xml));\n    aos_list_add_tail(&b->node, body);\n}\n\nint oss_get_tagging_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_list_t *tag_list)\n{\n    mxml_node_t *doc = NULL;\n    mxml_node_t *tagging_node;\n    mxml_node_t *tagset_node;\n    int res;\n\n    res = get_xmldoc(bc, &doc);\n    if (res == AOSE_OK) {\n        tagging_node = mxmlFindElement(doc, doc, \"Tagging\", NULL, NULL, MXML_DESCEND);\n        if (tagging_node) {\n            tagset_node = mxmlFindElement(tagging_node, doc, \"TagSet\", NULL, NULL, MXML_DESCEND);\n            if (tagset_node) {\n                mxml_node_t * node = mxmlFindElement(tagset_node, doc, \"Tag\", NULL, NULL, MXML_DESCEND);\n                for (; node != NULL; ) {\n                    oss_tag_content_t *content = oss_create_tag_content(p);\n                    get_xmlnode_value_str(p, node, \"Key\", &content->key);\n                    get_xmlnode_value_str(p, node, \"Value\", &content->value);\n                    aos_list_add_tail(&content->node, tag_list);\n                    node = mxmlFindElement(node, tagset_node, \"Tag\", NULL, NULL, MXML_DESCEND);\n                }\n            }\n        }\n    }\n\n    mxmlDelete(doc);\n    return res;\n}\n\nstatic char *build_restore_object_xml(aos_pool_t *p, oss_tier_type_e tier, int day)\n{\n    const char *fmt = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\"\r\n        \"<RestoreRequest>\\n\"\r\n        \"<Days>%d</Days>\\n\"\r\n        \"<JobParameters><Tier>%s</Tier></JobParameters>\\n\"\r\n        \"</RestoreRequest>\\n\";\r\n    return apr_psprintf(p, fmt, day, get_oss_tier_type_str(tier));\n}\n\nvoid oss_build_restore_object_body(aos_pool_t *p, oss_tier_type_e tier, int day, aos_list_t *body)\n{\n    char *restore_object_xml;\n    aos_buf_t *b;\n    restore_object_xml = build_restore_object_xml(p, tier, day);\n    if (restore_object_xml)\n    {\n        aos_list_init(body);\n        b = aos_buf_pack(p, restore_object_xml, strlen(restore_object_xml));\n        aos_list_add_tail(&b->node, body);\n    }\n}"
  },
  {
    "path": "oss_c_sdk/oss_xml.h",
    "content": "#ifndef LIBOSS_XML_H\n#define LIBOSS_XML_H\n\n#include <mxml.h>\n#include \"aos_string.h\"\n#include \"aos_transport.h\"\n#include \"aos_status.h\"\n#include \"oss_define.h\"\n#include \"oss_resumable.h\"\n\n\ntypedef void (*NODE_PARSE_FUN)(aos_pool_t *p, mxml_node_t *xml_node, aos_list_t *node_list);   \n\nOSS_CPP_START\n\n/**\n  * @brief  functions for xml body parse \n**/\nint get_xmldoc(aos_list_t *bc, mxml_node_t **root);\nchar *get_xmlnode_value(aos_pool_t *p, mxml_node_t * root, const char *xml_path);\n\n/**\n  * @brief  build xml body for complete_multipart_upload\n**/\nchar *build_complete_multipart_upload_xml(aos_pool_t *p, aos_list_t *bc);\n\n/**\n  * @brief  build body for complete multipart upload\n**/\nvoid build_complete_multipart_upload_body(aos_pool_t *p, aos_list_t *part_list, aos_list_t *body);\n\n/**\n  * @brief  build xml body for put lifecycle\n**/\nchar *build_lifecycle_xml(aos_pool_t *p, aos_list_t *lifecycle_rule_list);\n\n/**\n  * @brief  build body for put lifecycle\n**/\nvoid build_lifecycle_body(aos_pool_t *p, aos_list_t *lifecycle_rule_list, aos_list_t *body);\n\n/**\n  * @brief  build body for put referer \n**/\nvoid build_referer_config_body(aos_pool_t *p, oss_referer_config_t *referer_config, aos_list_t *body);\n\n/**\n  * @brief  build body for put website \n**/\nvoid build_website_config_body(aos_pool_t *p, oss_website_config_t *website_config, aos_list_t *body);\n\n/**\n  * @brief  build body for put cors \n**/\nvoid build_cors_rule_body(aos_pool_t *p, aos_list_t *rule_list, aos_list_t *body);\n\n/**\n  * @brief  build body for put bucket logging\n**/\nvoid build_bucket_logging_body(aos_pool_t *p, oss_logging_config_content_t *content, aos_list_t *body);\n\n/**\n  * @brief  build body for put storage class\n**/\nvoid build_bucket_storage_class(aos_pool_t *p, oss_storage_class_type_e storage_class, aos_list_t *body);\n\n/**\n  * @brief  build body for put storage capacity\n**/\nvoid build_bucket_storage_capacity_body(aos_pool_t *p, long storage_capacity, aos_list_t *body);\n\n/**\n  * @brief  build xml body for delete objects\n**/\nchar *build_objects_xml(aos_pool_t *p, aos_list_t *object_list, const char *quiet);\n\n/**\n  * @brief  build body for delete objects\n**/\nvoid build_delete_objects_body(aos_pool_t *p, aos_list_t *object_list, int is_quiet, \n            aos_list_t *body);\n\nmxml_node_t\t*set_xmlnode_value_str(mxml_node_t *parent, const char *name, const aos_string_t *value);\nmxml_node_t\t*set_xmlnode_value_int(mxml_node_t *parent, const char *name, int value);\nmxml_node_t\t*set_xmlnode_value_int64(mxml_node_t *parent, const char *name, int64_t value);\nmxml_node_t\t*set_xmlnode_value_uint64(mxml_node_t *parent, const char *name, uint64_t value);\n\nint get_xmlnode_value_str(aos_pool_t *p, mxml_node_t *xml_node, const char *xml_path, aos_string_t *value);\nint get_xmlnode_value_int(aos_pool_t *p, mxml_node_t *xml_node, const char *xml_path, int *value);\nint get_xmlnode_value_int64(aos_pool_t *p, mxml_node_t *xml_node, const char *xml_path, int64_t *value);\nint get_xmlnode_value_uint64(aos_pool_t *p, mxml_node_t *xml_node, const char *xml_path, uint64_t *value);\n\n/**\n  * @brief  build xml for checkpoint\n**/\nchar *oss_build_checkpoint_xml(aos_pool_t *p, const oss_checkpoint_t *checkpoint);\n\n/**\n  * @bried  parse checkpoint from xml\n**/\nint oss_checkpoint_parse_from_body(aos_pool_t *p, const char *xml_body, oss_checkpoint_t *checkpoint);\n\n/**\n  * @bried  parse acl from xml body for get_bucket_acl\n**/\nint oss_acl_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_string_t *oss_acl);\n\n/**\n  * @bried  parse location from xml body for get_bucket_location\n**/\nint oss_location_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_string_t *oss_location);\n\n/**\n  * @bried  parse storage capacity from xml body for get_bucket_storage_capacity\n**/\nint oss_storage_capacity_parse_from_body(aos_pool_t *p, aos_list_t *bc, long *storage_capacity);\n\n/**\n  * @bried  parse logging info from xml body for get_bucket_logging\n**/\nint oss_logging_parse_from_body(aos_pool_t *p, aos_list_t *bc, oss_logging_config_content_t *logging_content);\n\n/**\n  * @bried  parse bucket info from xml body for get_bucket_logging\n**/\nint oss_get_bucket_info_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    oss_bucket_info_t *bucket_info);\n\n/**\n  * @bried  parse bucket stat from xml body for get_bucket_stat\n**/\nint oss_get_bucket_stat_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    oss_bucket_stat_t *bucket_stat);\n\n/**\n  * @bried  parse bucket website info from xml body for get_bucket_website\n**/\nint oss_get_bucket_website_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    oss_website_config_t *website_config);\n\n/**\n  * @bried  parse bucket referer configuration from xml body for get_bucket_logging\n**/\nint oss_get_bucket_referer_config_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    oss_referer_config_t *referer_config);\n\n/**\n  * @bried  parse bucket cors from xml body for get_bucket_cors\n**/\nvoid oss_cors_rule_content_parse(aos_pool_t *p, mxml_node_t *xml_node, \n    aos_list_t *node_list);\nint oss_get_bucket_cors_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    aos_list_t *rule_list);\n\n/**\n  * @brief parse upload_id from xml body for init multipart upload\n**/\nint oss_upload_id_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_string_t *upload_id);\n\n/**\n  * @brief parse objects from xml body for list buckets\n**/\nvoid oss_list_node_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n     aos_list_t *node_list, NODE_PARSE_FUN parse_funptr);\nvoid oss_list_buckets_content_parse(aos_pool_t *p, mxml_node_t *xml_node, aos_list_t *node_list);\nint oss_list_buckets_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    oss_list_buckets_params_t *params);\n\n/**\n  * @brief parse objects from xml body for list objects\n**/\nvoid oss_list_objects_owner_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_list_object_content_t *content);\nvoid oss_list_objects_content_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_list_object_content_t *content);\nvoid oss_list_objects_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n            aos_list_t *object_list);\nvoid oss_list_objects_prefix_parse(aos_pool_t *p, mxml_node_t *root,     \n            oss_list_object_common_prefix_t *common_prefix);\nvoid oss_list_objects_common_prefix_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n            aos_list_t *common_prefix_list);\nint oss_list_objects_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_list_t *object_list,\n            aos_list_t *common_prefix_list, aos_string_t *marker, int *truncated);\n\n/**\n  * @brief parse parts from xml body for list upload part\n**/\nvoid oss_list_parts_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n            aos_list_t *part_list);\nvoid oss_list_parts_content_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_list_part_content_t *content);\nint oss_list_parts_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_list_t *part_list, \n            aos_string_t *part_number_marker, int *truncated);\n\n/**\n  * @brief  parse uploads from xml body for list multipart upload\n**/\nvoid oss_list_multipart_uploads_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n            aos_list_t *upload_list);\nvoid oss_list_multipart_uploads_content_parse(aos_pool_t *p, mxml_node_t *xml_node,\n            oss_list_multipart_upload_content_t *content);\nint oss_list_multipart_uploads_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n            aos_list_t *upload_list, aos_string_t *key_marker,\n            aos_string_t *upload_id_marker, int *truncated);\n\n/**\n  * @brief parse lifecycle rules from xml body\n**/\nvoid oss_lifecycle_rule_expire_parse(aos_pool_t *p, mxml_node_t *xml_node, \n    oss_lifecycle_rule_content_t *content);\nvoid oss_lifecycle_rule_content_parse(aos_pool_t *p, mxml_node_t *xml_node, \n    oss_lifecycle_rule_content_t *content);\nvoid oss_lifecycle_rule_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    aos_list_t *lifecycle_rule_list);\nint oss_lifecycle_rules_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_list_t *lifecycle_rule_list);\nvoid oss_lifecycle_rule_date_parse(aos_pool_t *p, mxml_node_t * xml_node,\n    oss_lifecycle_rule_date_t *rule_date);\nvoid oss_lifecycle_rule_tag_parse(aos_pool_t *p, mxml_node_t * xml_node,\n    oss_tag_content_t *tag);\n\n/**\n  * @brief parse delete objects contents from xml body\n**/\nvoid oss_delete_objects_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    aos_list_t *object_list);\nvoid oss_object_key_parse(aos_pool_t *p, mxml_node_t * xml_node, oss_object_key_t *content);\nint oss_delete_objects_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_list_t *object_list);\n\n/**\n  * @brief  build body for create live channel\n**/\nchar *build_create_live_channel_xml(aos_pool_t *p, oss_live_channel_configuration_t *config);\nvoid build_create_live_channel_body(aos_pool_t *p, oss_live_channel_configuration_t *config, aos_list_t *body);\n\n/**\n  * @brief parse create live channel contents from xml body\n**/\nvoid oss_publish_url_parse(aos_pool_t *p, mxml_node_t *node, oss_live_channel_publish_url_t *content);\nvoid oss_play_url_parse(aos_pool_t *p, mxml_node_t *node, oss_live_channel_play_url_t *content);\nvoid oss_publish_urls_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n\taos_list_t *publish_xml_list);\nvoid oss_play_urls_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n\taos_list_t *play_xml_list);\nvoid oss_create_live_channel_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *publish_xml_path, \n\taos_list_t *publish_url_list, const char *play_xml_path, aos_list_t *play_url_list);\nint oss_create_live_channel_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_list_t *publish_url_list, \n\taos_list_t *play_url_list);\n\n/**\n  * @brief parse live channel info content from xml body\n**/\nvoid oss_live_channel_info_target_content_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_live_channel_target_t *target);\nvoid oss_live_channel_info_content_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    oss_live_channel_configuration_t *info);\nint oss_live_channel_info_parse_from_body(aos_pool_t *p, aos_list_t *bc, oss_live_channel_configuration_t *info);\n\n/**\n  * @brief parse live channel stat content from xml body\n**/\nvoid oss_live_channel_stat_video_content_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_video_stat_t *video_stat);\nvoid oss_live_channel_stat_audio_content_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_audio_stat_t *audio_stat);\nvoid oss_live_channel_stat_content_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path, oss_live_channel_stat_t *stat);\nint oss_live_channel_stat_parse_from_body(aos_pool_t *p, aos_list_t *bc, oss_live_channel_stat_t *stat);\n\n/**\n  * @brief parse live channel from xml body for list list channel\n**/\nvoid oss_list_live_channel_content_parse(aos_pool_t *p, mxml_node_t *xml_node, oss_live_channel_content_t *content);\nvoid oss_list_live_channel_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    aos_list_t *live_channel_list);\nint oss_list_live_channel_parse_from_body(aos_pool_t *p, aos_list_t *bc,\n    aos_list_t *live_channel_list, aos_string_t *next_marker, int *truncated);\n\n/**\n  * @brief parse live channel history content from xml body\n**/\nvoid oss_live_channel_history_content_parse(aos_pool_t *p, mxml_node_t * xml_node, oss_live_record_content_t *content);\nvoid oss_live_channel_history_contents_parse(aos_pool_t *p, mxml_node_t *root, const char *xml_path,\n    aos_list_t *live_record_list);\nint oss_live_channel_history_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_list_t *live_record_list);\n\n/**\n* @brief build body for select object\n**/\nvoid oss_build_select_object_body(aos_pool_t *p,\n    const aos_string_t *expression,\n    const oss_select_object_params_t *params,\n    aos_list_t *body);\n\nvoid oss_build_create_select_object_meta_body(aos_pool_t *p,\n    const oss_select_object_meta_params_t *params,\n    aos_list_t *body);\n\n/**\n* @brief build body for object tagging\n**/\nvoid build_object_tagging_body(aos_pool_t *p,\n    aos_list_t *tag_list,\n    aos_list_t *body);\n\nint oss_get_tagging_parse_from_body(aos_pool_t *p,\n    aos_list_t *bc, \n    aos_list_t *tag_list);\n\n/**\n* @brief build body for restore object\n**/\nvoid oss_build_restore_object_body(aos_pool_t *p, oss_tier_type_e tier, int day, aos_list_t *body);\n\n\nOSS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 11.00\r\n# Visual Studio 2010\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"oss_c_sdk\", \"oss_c_sdk\\oss_c_sdk.vcxproj\", \"{921A4B95-8106-45C1-95A7-814AE964C2C3}\"\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"oss_c_sdk_test\", \"oss_c_sdk_test\\oss_c_sdk_test.vcxproj\", \"{6373CC30-480D-4FC2-9EB5-2E9835DBB1C4}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{921A4B95-8106-45C1-95A7-814AE964C2C3} = {921A4B95-8106-45C1-95A7-814AE964C2C3}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"oss_c_sdk_sample\", \"oss_c_sdk_sample\\oss_c_sdk_sample.vcxproj\", \"{0B918A52-C5E1-4976-A205-F257C0D0B102}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{921A4B95-8106-45C1-95A7-814AE964C2C3} = {921A4B95-8106-45C1-95A7-814AE964C2C3}\r\n\tEndProjectSection\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Win32 = Debug|Win32\r\n\t\tDebug|x64 = Debug|x64\r\n\t\tRelease|Win32 = Release|Win32\r\n\t\tRelease|x64 = Release|x64\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{921A4B95-8106-45C1-95A7-814AE964C2C3}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{921A4B95-8106-45C1-95A7-814AE964C2C3}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{921A4B95-8106-45C1-95A7-814AE964C2C3}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{921A4B95-8106-45C1-95A7-814AE964C2C3}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{921A4B95-8106-45C1-95A7-814AE964C2C3}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{921A4B95-8106-45C1-95A7-814AE964C2C3}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{921A4B95-8106-45C1-95A7-814AE964C2C3}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{921A4B95-8106-45C1-95A7-814AE964C2C3}.Release|x64.Build.0 = Release|x64\r\n\t\t{6373CC30-480D-4FC2-9EB5-2E9835DBB1C4}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{6373CC30-480D-4FC2-9EB5-2E9835DBB1C4}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{6373CC30-480D-4FC2-9EB5-2E9835DBB1C4}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{6373CC30-480D-4FC2-9EB5-2E9835DBB1C4}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{6373CC30-480D-4FC2-9EB5-2E9835DBB1C4}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{6373CC30-480D-4FC2-9EB5-2E9835DBB1C4}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{6373CC30-480D-4FC2-9EB5-2E9835DBB1C4}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{6373CC30-480D-4FC2-9EB5-2E9835DBB1C4}.Release|x64.Build.0 = Release|x64\r\n\t\t{0B918A52-C5E1-4976-A205-F257C0D0B102}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{0B918A52-C5E1-4976-A205-F257C0D0B102}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{0B918A52-C5E1-4976-A205-F257C0D0B102}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{0B918A52-C5E1-4976-A205-F257C0D0B102}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{0B918A52-C5E1-4976-A205-F257C0D0B102}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{0B918A52-C5E1-4976-A205-F257C0D0B102}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{0B918A52-C5E1-4976-A205-F257C0D0B102}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{0B918A52-C5E1-4976-A205-F257C0D0B102}.Release|x64.Build.0 = Release|x64\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "oss_c_sdk_sample/CMakeLists.txt",
    "content": "project (oss_c_sdk_sample)\n\ninclude_directories(${CMAKE_SOURCE_DIR})\n\nset(OSS_SAMPLE_SOURCE_FILES oss_sample_util.c oss_config.c main.c \n    oss_put_object_sample.c oss_append_object_sample.c oss_get_object_sample.c\n    oss_head_object_sample.c oss_delete_object_sample.c oss_multipart_upload_sample.c\n    oss_crc_sample.c oss_image_sample.c oss_progress_sample.c oss_callback_sample.c\n    oss_list_object_sample.c oss_resumable_sample.c oss_get_object_meta_sample.c \n    oss_put_object_acl_sample.c oss_get_object_acl_sample.c oss_select_object_sample.c)\n\ninclude_directories (${APR_INCLUDE_DIR})\ninclude_directories (${APR_UTIL_INCLUDE_DIR})\ninclude_directories (${MINIXML_INCLUDE_DIR})\ninclude_directories (${CURL_INCLUDE_DIR})\ninclude_directories (\"${CMAKE_SOURCE_DIR}/oss_c_sdk\")\n\nadd_executable(oss_c_sdk_sample ${OSS_SAMPLE_SOURCE_FILES})\n\nif (CMAKE_HOST_WIN32)\n    target_link_libraries(oss_c_sdk_sample ws2_32)\nelse()\n\tfind_library(APR_LIBRARY apr-1 PATHS /usr/local/apr/lib/)\n\tfind_library(APR_UTIL_LIBRARY aprutil-1 PATHS /usr/local/apr/lib/)\n\tfind_library(MINIXML_LIBRARY mxml)\n\tfind_library(CURL_LIBRARY curl)\n\tfind_library(PTHREAD_LIBRARY pthread)\n    target_link_libraries(oss_c_sdk_sample ${PTHREAD_LIBRARY})\nendif()\n\ntarget_link_libraries(oss_c_sdk_sample oss_c_sdk)\ntarget_link_libraries(oss_c_sdk_sample ${APR_UTIL_LIBRARY})\ntarget_link_libraries(oss_c_sdk_sample ${APR_LIBRARY})\ntarget_link_libraries(oss_c_sdk_sample ${MINIXML_LIBRARY})\ntarget_link_libraries(oss_c_sdk_sample ${CURL_LIBRARY})\n"
  },
  {
    "path": "oss_c_sdk_sample/main.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nextern void append_object_sample();\nextern void delete_object_sample();\nextern void put_object_sample();\nextern void get_object_sample();\nextern void head_object_sample();\nextern void list_object_sample();\nextern void multipart_object_sample();\nextern void callback_sample();\nextern void progress_sample();\nextern void crc_sample();\nextern void image_sample();\nextern void resumable_upload_sample();\nextern void resumable_download_sample();\nextern void select_object_sample();\n\nint main(int argc, char *argv[])\n{\n    if (aos_http_io_initialize(NULL, 0) != AOSE_OK) {\n        exit(1);\n    }\n\n    put_object_sample();\n    append_object_sample();\n    get_object_sample();\n    head_object_sample();\n    list_object_sample();\n    multipart_object_sample();\n    delete_object_sample();\n    callback_sample();\n    progress_sample();\n    crc_sample();\n    image_sample();\n    resumable_upload_sample();\n    resumable_download_sample();\n    select_object_sample();\n    aos_http_io_deinitialize();\n\n    system(\"pause\");\n\n    return 0;\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_append_object_sample.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nvoid append_object_from_buffer()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    int64_t position = 0;\n    aos_table_t *headers1 = NULL;\n    aos_table_t *headers2 = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_list_t buffer;\n    aos_buf_t *content = NULL;\n    char *next_append_position = NULL;\n    char *object_type = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers1 = aos_table_make(p, 0);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n\n    oss_delete_object(options, &bucket, &object, NULL);\n    s = oss_head_object(options, &bucket, &object, headers1, &resp_headers);\n    if (aos_status_is_ok(s)) {\n        object_type = (char*)(apr_table_get(resp_headers, OSS_OBJECT_TYPE));\n        if (0 != strncmp(OSS_OBJECT_TYPE_APPENDABLE, object_type, \n                         strlen(OSS_OBJECT_TYPE_APPENDABLE))) \n        {\n            printf(\"object[%s]'s type[%s] is not Appendable\\n\", OBJECT_NAME, object_type);\n            aos_pool_destroy(p);\n            return;\n        }\n\n        next_append_position = (char*)(apr_table_get(resp_headers, OSS_NEXT_APPEND_POSITION));\n        position = aos_atoi64(next_append_position);\n    }\n        \n    headers2 = aos_table_make(p, 0);\n    aos_list_init(&buffer);\n    content = aos_buf_pack(p, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n    s = oss_append_object_from_buffer(options, &bucket, &object, \n            position, &buffer, headers2, &resp_headers);\n\n    if (aos_status_is_ok(s))\n    {\n        printf(\"append object from buffer succeeded\\n\");\n    } else {\n        printf(\"append object from buffer failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid append_object_from_file()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    aos_table_t *headers1 = NULL;\n    aos_table_t *headers2 = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    char *filename = __FILE__;\n    aos_status_t *s = NULL;\n    aos_string_t file;\n    int64_t position = 0;\n    char *next_append_position = NULL;\n    char *object_type = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers1 = aos_table_make(options->pool, 0);\n    headers2 = aos_table_make(options->pool, 0);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    aos_str_set(&file, filename);\n\n    s = oss_head_object(options, &bucket, &object, headers1, &resp_headers);\n    if(aos_status_is_ok(s)) {\n        object_type = (char*)(apr_table_get(resp_headers, OSS_OBJECT_TYPE));\n        if (0 != strncmp(OSS_OBJECT_TYPE_APPENDABLE, object_type, \n                         strlen(OSS_OBJECT_TYPE_APPENDABLE))) \n        {\n            printf(\"object[%s]'s type[%s] is not Appendable\\n\", OBJECT_NAME, object_type);\n            aos_pool_destroy(p);\n            return;\n        }\n        \n        next_append_position = (char*)(apr_table_get(resp_headers, OSS_NEXT_APPEND_POSITION));\n        position = aos_atoi64(next_append_position);\n    }\n\n    s = oss_append_object_from_file(options, &bucket, &object, \n                                    position, &file, headers2, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"append object from file succeeded\\n\");\n    } else {\n        printf(\"append object from file failed\\n\");\n    }    \n\n    aos_pool_destroy(p);\n}\n\nvoid append_object_sample()\n{   \n    append_object_from_buffer();\n    append_object_from_file();\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_callback_sample.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nvoid put_object_from_buffer_with_callback()\n{\n    aos_pool_t *p = NULL;\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    aos_list_t buffer;\n    aos_buf_t *content;\n    char *buf = NULL;\n    int64_t len = 0;\n    int64_t size = 0;\n    int64_t pos = 0;\n    char b64_buf[1024];\n    int b64_len;\n    \n    /* JSON format */\n    char *callback =  \"{\"\n        \"\\\"callbackUrl\\\":\\\"http://callback.oss-demo.com:23450\\\",\"\n        \"\\\"callbackHost\\\":\\\"oss-cn-hangzhou.aliyuncs.com\\\",\"\n        \"\\\"callbackBody\\\":\\\"bucket=${bucket}&object=${object}&size=${size}&mimeType=${mimeType}\\\",\"\n        \"\\\"callbackBodyType\\\":\\\"application/x-www-form-urlencoded\\\"\"\n        \"}\";\n\n    /* init sample */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n   \n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    aos_list_init(&resp_body);\n    aos_list_init(&buffer);\n\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    /* put call into header */\n    b64_len = aos_base64_encode((unsigned char*)callback, strlen(callback), b64_buf);\n    b64_buf[b64_len] = '\\0';\n\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, OSS_CALLBACK, b64_buf);\n    \n    /* test put object */\n    s = oss_do_put_object_from_buffer(options, &bucket, &object, &buffer, \n        headers, NULL, NULL, &resp_headers, &resp_body);\n    if (aos_status_is_ok(s)) {\n        printf(\"put object from buffer succeeded\\n\");\n    } else {\n        printf(\"put object from buffer failed\\n\");      \n    }    \n\n    /* get buffer len */\n    len = aos_buf_list_len(&resp_body);\n    buf = (char *)aos_pcalloc(p, (apr_size_t)(len + 1));\n    buf[len] = '\\0';\n\n    /* copy buffer content to memory */\n    aos_list_for_each_entry(aos_buf_t, content, &resp_body, node) {\n        size = aos_buf_size(content);\n        memcpy(buf + pos, content->pos, (size_t)size);\n        pos += size;\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid multipart_from_buffer_with_callback()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    oss_list_upload_part_params_t *params = NULL;\n    aos_string_t upload_id;\n    aos_list_t complete_part_list;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_list_part_content_t *part_content1 = NULL;\n    oss_complete_part_content_t *complete_content1 = NULL;\n    int part_num = 1;\n    aos_list_t resp_body;\n    aos_buf_t *content;\n    char *buf = NULL;\n    int64_t len = 0;\n    int64_t size = 0;\n    int64_t pos = 0;\n    char b64_buf[1024];\n    int b64_len;\n\n    /* JSON format */\n    char *callback =  \"{\"\n        \"\\\"callbackUrl\\\":\\\"http://callback.oss-demo.com:23450\\\",\"\n        \"\\\"callbackHost\\\":\\\"oss-cn-hangzhou.aliyuncs.com\\\",\"\n        \"\\\"callbackBody\\\":\\\"bucket=${bucket}&object=${object}&size=${size}&mimeType=${mimeType}\\\",\"\n        \"\\\"callbackBodyType\\\":\\\"application/x-www-form-urlencoded\\\"\"\n        \"}\";\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n\n    /* put call into header */\n    b64_len = aos_base64_encode((unsigned char*)callback, strlen(callback), b64_buf);\n    b64_buf[b64_len] = '\\0';\n\n    headers = aos_table_make(p, 3);\n    apr_table_set(headers, OSS_CALLBACK, b64_buf);\n    apr_table_set(headers, OSS_CALLBACK, b64_buf);\n    apr_table_set(headers, OSS_CALLBACK, b64_buf);\n\n    /* init mulitipart */\n    s = oss_init_multipart_upload(options, &bucket, &object, &upload_id, NULL, &resp_headers);\n    if (aos_status_is_ok(s)) {\n        printf(\"Init multipart upload succeeded, upload_id:%.*s\\n\", \n               upload_id.len, upload_id.data);\n    } else {\n        printf(\"Init multipart upload failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n\n    /* upload part */\n    aos_list_init(&buffer);\n    make_random_body(p, 2, &buffer);\n\n    s = oss_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num++, &buffer, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"Multipart upload part from file succeeded\\n\");\n    } else {\n        printf(\"Multipart upload part from file failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n\n    aos_list_init(&buffer);\n    make_random_body(p, 200, &buffer);\n    s = oss_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num++, &buffer, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"Multipart upload part from file succeeded\\n\");\n    } else {\n        printf(\"Multipart upload part from file failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n\n    /* list part */\n    params = oss_create_list_upload_part_params(p);\n    params->max_ret = 1;\n    aos_list_init(&complete_part_list);\n\n    s = oss_list_upload_part(options, &bucket, &object, &upload_id, \n                             params, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"List multipart succeeded\\n\");\n    } else {\n        printf(\"List multipart failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content1, &params->part_list, node) {\n        complete_content1 = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content1->part_number, part_content1->part_number.data);\n        aos_str_set(&complete_content1->etag, part_content1->etag.data);\n        aos_list_add_tail(&complete_content1->node, &complete_part_list);\n    }\n\n    /* complete multipart */\n    s = oss_do_complete_multipart_upload(options, &bucket, &object, &upload_id,\n            &complete_part_list, headers, NULL, &resp_headers, &resp_body);\n    if (aos_status_is_ok(s)) {\n        printf(\"Complete multipart upload from file succeeded, upload_id:%.*s\\n\", \n               upload_id.len, upload_id.data);\n    } else {\n        printf(\"Complete multipart upload from file failed\\n\");\n        printf(\"%d, %s, %s, %s\\n\", s->code, s->error_code, s->error_msg, s->req_id);\n    }\n\n    /* get buffer len */\n    len = aos_buf_list_len(&resp_body);\n    buf = (char *)aos_pcalloc(p, (apr_size_t)(len + 1));\n    buf[len] = '\\0';\n\n    /* copy buffer content to memory */\n    aos_list_for_each_entry(aos_buf_t, content, &resp_body, node) {\n        size = aos_buf_size(content);\n        memcpy(buf + pos, content->pos, (size_t)size);\n        pos += size;\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid callback_sample()\n{\n    put_object_from_buffer_with_callback();\n    multipart_from_buffer_with_callback();\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_config.c",
    "content": "#include \"oss_config.h\"\n\nconst char OSS_ENDPOINT[] = \"<your endpoint>\";\nconst char ACCESS_KEY_ID[] = \"<your access key id>\";\nconst char ACCESS_KEY_SECRET[] = \"<your access key secret>\";\nconst char BUCKET_NAME[] = \"<your bucket name>\";\nconst char OBJECT_NAME[] = \"<your object key>\";\nconst char MULTIPART_UPLOAD_FILE_PATH[] = \"<your local file>\";\n\n//surfix must be '/', only used for dir relative sample\nconst char DIR_NAME[] = \"dir/\"; \n"
  },
  {
    "path": "oss_c_sdk_sample/oss_config.h",
    "content": "#ifndef OSS_TEST_CONFIG_H\n#define OSS_TEST_CONFIG_H\n\n#include \"oss_define.h\"\n\nOSS_CPP_START\n\nextern const char OSS_ENDPOINT[];\nextern const char ACCESS_KEY_ID[];\nextern const char ACCESS_KEY_SECRET[];\nextern const char BUCKET_NAME[];\nextern const char OBJECT_NAME[];\nextern const char DIR_NAME[];\nextern const char MULTIPART_UPLOAD_FILE_PATH[];\n\nOSS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_crc_sample.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nvoid append_object_from_buffer_with_crc()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    char *str = \"Time is a bird for ever on the wing.\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    int64_t position = 0;\n    uint64_t initcrc = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    aos_list_t buffer;\n    aos_buf_t *content = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    aos_list_init(&resp_body);\n\n    /* append object */\n    aos_list_init(&buffer);\n    content = aos_buf_pack(p, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    oss_delete_object(options, &bucket, &object, NULL);\n\n    s = oss_do_append_object_from_buffer(options, &bucket, &object, position, \n        initcrc, &buffer, headers, NULL, NULL, &resp_headers, &resp_body);\n    if (aos_status_is_ok(s)) {\n        printf(\"crc: append object from buffer succeeded\\n\");\n    } else {\n        printf(\"crc: append object from buffer failed\\n\");      \n    } \n\n    position = aos_atoi64((char*)(apr_table_get(resp_headers, OSS_NEXT_APPEND_POSITION)));\n    initcrc = aos_atoui64((char*)(apr_table_get(resp_headers, OSS_HASH_CRC64_ECMA)));\n\n    /* append object */\n    s = oss_do_append_object_from_buffer(options, &bucket, &object, position, \n        initcrc, &buffer, NULL, NULL, NULL, NULL, NULL);\n\n    /* delete object */\n    s= oss_delete_object(options, &bucket, &object, NULL);\n\n    aos_pool_destroy(p);\n}\n\nvoid append_object_from_file_with_crc()\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_append_object.txt\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    int64_t position = 0;\n    uint64_t initcrc = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n\n    aos_str_set(&filename, __FILE__);\n\n    /* append object */\n    s = oss_do_append_object_from_file(options, &bucket, &object, position, \n        initcrc, &filename, headers, NULL, NULL, &resp_headers, &resp_body);\n    if (aos_status_is_ok(s)) {\n        printf(\"crc: append object from file succeeded\\n\");\n    } else {\n        printf(\"crc: append object from file failed\\n\");      \n    } \n\n    position = aos_atoi64((char*)(apr_table_get(resp_headers, OSS_NEXT_APPEND_POSITION)));\n    initcrc = aos_atoui64((char*)(apr_table_get(resp_headers, OSS_HASH_CRC64_ECMA)));\n\n    /* append object */\n    s = oss_do_append_object_from_file(options, &bucket, &object, position, \n        initcrc, &filename, NULL, NULL, NULL, NULL, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"crc: append object from file succeeded\\n\");\n    } else {\n        printf(\"crc: append object from file failed\\n\");      \n    } \n\n    /* delete object */\n    s= oss_delete_object(options, &bucket, &object, NULL);\n\n    aos_pool_destroy(p);\n}\n\nvoid disable_crc() \n{\n    aos_pool_t *p = NULL;\n    char *str = \"Sow nothing, reap nothing.\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    oss_request_options_t *options = NULL;\n    aos_list_t resp_body;\n    aos_list_t buffer;\n    aos_buf_t *content;\n\n    /* init test*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n   \n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    aos_list_init(&resp_body);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    options->ctl->options->enable_crc = AOS_FALSE;\n    \n    /* put object */\n    s = oss_put_object_from_buffer(options, &bucket, &object, &buffer, NULL, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"put object from buffer succeeded\\n\");\n    } else {\n        printf(\"put object from buffer failed\\n\");      \n    } \n\n    aos_pool_destroy(p);\n\n    /* get object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n\n    options->ctl->options->enable_crc = AOS_FALSE;\n\n    s = oss_get_object_to_buffer(options, &bucket, &object, NULL, NULL, &buffer, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"get object to buffer succeeded\\n\");\n    } else {\n        printf(\"get object to buffer failed\\n\");      \n    } \n\n    aos_pool_destroy(p);\n}\n\nvoid crc_sample()\n{\n    /* ˵CRCУ鹦Ĭϴ򿪣ϴĬCRCУ飻append_objectҪָϴappendصCRC */\n    append_object_from_buffer_with_crc();\n    append_object_from_file_with_crc();\n\n    disable_crc();\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_delete_object_sample.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nvoid delete_object()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n\n    s = oss_delete_object(options, &bucket, &object, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"delete object succeeded\\n\");\n    } else {\n        printf(\"delete object failed\\n\");\n    }    \n\n    aos_pool_destroy(p);\n}\n\nvoid delete_objects()\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_status_t *s = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    char *object_name1 = \"oss_sample_object1\";\n    char *object_name2 = \"oss_sample_object2\";\n    oss_object_key_t *content1 = NULL;\n    oss_object_key_t *content2 = NULL;\n    aos_list_t object_list;\n    aos_list_t deleted_object_list;\n    int is_quiet = AOS_TRUE;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n\n    aos_list_init(&object_list);\n    aos_list_init(&deleted_object_list);\n    content1 = oss_create_oss_object_key(p);\n    aos_str_set(&content1->key, object_name1);\n    aos_list_add_tail(&content1->node, &object_list);\n    content2 = oss_create_oss_object_key(p);\n    aos_str_set(&content2->key, object_name2);\n    aos_list_add_tail(&content2->node, &object_list);\n\n    s = oss_delete_objects(options, &bucket, &object_list, is_quiet,\n        &resp_headers, &deleted_object_list);\n\n    aos_pool_destroy(p);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"delete objects succeeded\\n\");\n    } else {\n        printf(\"delete objects failed\\n\");\n    }\n}\n\nvoid delete_object_sample()\n{\n    delete_object();\n    delete_objects();\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_get_object_acl_sample.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nvoid get_object_acl(){\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_string_t oss_acl;\n   \n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n\n    s = oss_get_object_acl(options, &bucket, &object, &oss_acl, &resp_headers);\n    \n    if (aos_status_is_ok(s)) {\n       printf(\"get object acl success!\\n\");\n    } else {\n       printf(\"get object acl failed!\\n\");\n    }\n\n    aos_pool_destroy(p);    \n}\n\nvoid get_object_acl_sample(){\n    get_object_acl();\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_get_object_meta_sample.c",
    "content": "#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n#include <assert.h>\n\nvoid get_object_meta()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    char *content_length_str = NULL;\n    char *object_type = NULL;\n    int64_t content_length = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n\n    s = oss_get_object_meta(options, &bucket, &object, &resp_headers);\n    \n    if (aos_status_is_ok(s)) {\n        content_length_str = (char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH);\n        if (content_length_str != NULL) {\n            content_length = atol(content_length_str);\n        }\n\n        object_type = (char*)apr_table_get(resp_headers, OSS_OBJECT_TYPE);\n\t    printf(\"get object meta succeeded, object type:%s, content length:%\"APR_INT64_T_FMT\"\\n\", object_type, content_length);\n    } else {\n        printf(\"req:%s, get object meta failed\\n\", s->req_id);\n    }\n    aos_pool_destroy(p);\n}\n\nvoid get_object_meta_sample()\n{\n    get_object_meta();\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_get_object_sample.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nvoid get_object_to_buffer()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    aos_buf_t *content = NULL;\n    char *buf = NULL;\n    int64_t len = 0;\n    int64_t size = 0;\n    int64_t pos = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    aos_list_init(&buffer);\n\n    s = oss_get_object_to_buffer(options, &bucket, &object, \n                                 headers, params, &buffer, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"get object to buffer succeeded\\n\");\n    }\n    else {\n        printf(\"get object to buffer failed\\n\");  \n    }\n\n    //get buffer len\n    aos_list_for_each_entry(aos_buf_t, content, &buffer, node) {\n        len += aos_buf_size(content);\n    }\n\n    buf = aos_pcalloc(p, (apr_size_t)(len + 1));\n    buf[len] = '\\0';\n\n    //copy buffer content to memory\n    aos_list_for_each_entry(aos_buf_t, content, &buffer, node) {\n        size = aos_buf_size(content);\n        memcpy(buf + pos, content->pos, (size_t)size);\n        pos += size;\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid get_object_to_local_file()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *download_filename = \"get_object_to_local_file.txt\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_string_t file;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&file, download_filename);\n\n    s = oss_get_object_to_file(options, &bucket, &object, headers, \n                               params, &file, &resp_headers);\n    if (aos_status_is_ok(s)) {\n        printf(\"get object to local file succeeded\\n\");\n    } else {\n        printf(\"get object to local file failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid get_object_to_buffer_with_range()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    aos_buf_t *content = NULL;\n    char *buf = NULL;\n    int64_t len = 0;\n    int64_t size = 0;\n    int64_t pos = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    aos_list_init(&buffer);\n    headers = aos_table_make(p, 1);\n\n    /* RangeȡļָΧbytes=20-10020͵100ַ */\n    apr_table_set(headers, \"Range\", \"bytes=20-100\");\n\n    s = oss_get_object_to_buffer(options, &bucket, &object, \n                                 headers, params, &buffer, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"get object to buffer succeeded\\n\");\n    }\n    else {\n        printf(\"get object to buffer failed\\n\");  \n    }\n\n    //get buffer len\n    aos_list_for_each_entry(aos_buf_t, content, &buffer, node) {\n        len += aos_buf_size(content);\n    }\n\n    buf = aos_pcalloc(p, (apr_size_t)(len + 1));\n    buf[len] = '\\0';\n\n    //copy buffer content to memory\n    aos_list_for_each_entry(aos_buf_t, content, &buffer, node) {\n        size = aos_buf_size(content);\n        memcpy(buf + pos, content->pos, (size_t)size);\n        pos += size;\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid get_object_to_local_file_with_range()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *download_filename = \"get_object_to_local_file.txt\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_string_t file;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    aos_str_set(&file, download_filename);\n    headers = aos_table_make(p, 1);\n\n    /* RangeȡļָΧbytes=20-10020͵100ַ */\n    apr_table_set(headers, \"Range\", \"bytes=20-100\");\n\n    s = oss_get_object_to_file(options, &bucket, &object, headers, \n                               params, &file, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"get object to local file succeeded\\n\");\n    } else {\n        printf(\"get object to local file failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid get_object_by_signed_url()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t url;\n    int is_cname = 0;\n    aos_http_request_t *request = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_list_t buffer;\n    aos_status_t *s = NULL;    \n    char *signed_url = NULL;\n    int64_t expires_time;\n\n    aos_pool_create(&p, NULL);\n\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n\n    // create request\n    request = aos_http_request_create(p);\n    request->method = HTTP_GET;\n\n    // create headers\n    headers = aos_table_make(options->pool, 0);\n\n    // set value\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    aos_list_init(&buffer);\n\n    // expires time\n    expires_time = apr_time_now() / 1000000 + 120;    \n\n    // generate signed url for put \n    signed_url = oss_gen_signed_url(options, &bucket, &object, \n                                    expires_time, request);\n    aos_str_set(&url, signed_url);\n    \n    printf(\"signed get url : %s\\n\", signed_url);\n\n    // put object by signed url\n    s = oss_get_object_to_buffer_by_url(options, &url, \n            headers, params, &buffer, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"get object by signed url succeeded\\n\");\n    } else {\n        printf(\"get object by signed url failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid get_oss_dir_to_local_dir()\n{\n    aos_pool_t *parent_pool = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_list_object_params_t *params = NULL;\n\n    aos_pool_create(&parent_pool, NULL);\n    options = oss_request_options_create(parent_pool);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    params = oss_create_list_object_params(parent_pool);\n    aos_str_set(&params->prefix, DIR_NAME);\n    params->truncated = 1;\n\n    while (params->truncated) {\n        aos_pool_t *list_object_pool = NULL;\n        aos_table_t *list_object_resp_headers = NULL;\n        oss_list_object_content_t *list_content = NULL;\n        \n        aos_pool_create(&list_object_pool, parent_pool);\n        options->pool = list_object_pool;\n        s = oss_list_object(options, &bucket, params, &list_object_resp_headers);\n        if (!aos_status_is_ok(s)) {\n            aos_error_log(\"list objects of dir[%s] fail\\n\", DIR_NAME);\n            aos_status_dup(parent_pool, s);\n            aos_pool_destroy(list_object_pool);\n            options->pool = parent_pool;\n            return;\n        }        \n\n        aos_list_for_each_entry(oss_list_object_content_t, list_content, &params->object_list, node) {\n            if ('/' == list_content->key.data[strlen(list_content->key.data) - 1]) {\n                apr_dir_make_recursive(list_content->key.data, \n                        APR_OS_DEFAULT, parent_pool);                \n            } else {\n                aos_string_t object;\n                aos_pool_t *get_object_pool = NULL;\n                aos_table_t *headers = NULL;\n                aos_table_t *query_params = NULL;\n                aos_table_t *get_object_resp_headers = NULL;\n\n                aos_str_set(&object, list_content->key.data);\n\n                aos_pool_create(&get_object_pool, parent_pool);\n                options->pool = get_object_pool;\n\n                s = oss_get_object_to_file(options, &bucket, &object, \n                        headers, query_params, &object, &get_object_resp_headers);\n                if (!aos_status_is_ok(s)) {\n                    aos_error_log(\"get object[%s] fail\\n\", object.data);\n                }\n\n                aos_pool_destroy(get_object_pool);\n                options->pool = list_object_pool;\n            }\n        }\n\n        aos_list_init(&params->object_list);\n        if (params->next_marker.data) {\n            aos_str_set(&params->marker, params->next_marker.data);\n        }\n\n        aos_pool_destroy(list_object_pool);\n    }\n\n    if (aos_status_is_ok(s)) {\n        printf(\"get dir succeeded\\n\");\n    } else {\n        printf(\"get dir failed\\n\");\n    }\n    aos_pool_destroy(parent_pool);\n}\n\nvoid get_object_sample()\n{\n    get_object_to_buffer();\n    get_object_to_local_file();\n\n    get_object_to_buffer_with_range();\n    get_object_to_local_file_with_range();\n\n    get_object_by_signed_url();\n\n    get_oss_dir_to_local_dir();\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_head_object_sample.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nvoid head_object()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    char *content_length_str = NULL;\n    char *object_type = NULL;\n    int64_t content_length = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    headers = aos_table_make(p, 0);\n\n    s = oss_head_object(options, &bucket, &object, headers, &resp_headers);\n    \n    if (aos_status_is_ok(s)) {\n        content_length_str = (char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH);\n        if (content_length_str != NULL) {\n            content_length = atol(content_length_str);\n        }\n\n        object_type = (char*)apr_table_get(resp_headers, OSS_OBJECT_TYPE);\n        \n        printf(\"head object succeeded, object type:%s, content length:%\"APR_INT64_T_FMT\"\\n\", object_type, content_length);\n    } else {\n        printf(\"head object failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nstatic void get_object_meta()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    char *content_length_str = NULL;\n    char *object_type = NULL;\n    int64_t content_length = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n\n    s = oss_get_object_meta(options, &bucket, &object, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        content_length_str = (char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH);\n        if (content_length_str != NULL) {\n            content_length = atol(content_length_str);\n        }\n\n        object_type = (char*)apr_table_get(resp_headers, OSS_OBJECT_TYPE);\n\n        printf(\"get object meta succeeded, object type:%s, content_length:%\"APR_INT64_T_FMT\"\\n\",\n            object_type, content_length);\n    }\n    else {\n        printf(\"get object meta failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\n\n\nvoid head_object_sample()\n{\n    head_object();\n    get_object_meta();\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_image_sample.c",
    "content": "#include \"aos_log.h\"\r\n#include \"aos_util.h\"\r\n#include \"aos_string.h\"\r\n#include \"aos_status.h\"\r\n#include \"oss_auth.h\"\r\n#include \"oss_util.h\"\r\n#include \"oss_api.h\"\r\n#include \"oss_config.h\"\r\n#include \"oss_sample_util.h\"\r\n\r\n#if defined(WIN32)\r\nstatic char *image_file = \"../oss_c_sdk_test/example.jpg\";\r\n#else\r\nstatic char *image_file = \"oss_c_sdk_test/example.jpg\";\r\n#endif\r\nstatic char *sample_image = \"example.jpg\";\r\n\r\nstatic void put_sample_image();\r\n\r\nvoid image_resize() \r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_table_t *params = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t filename;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_sample_request_options(options, is_cname);\r\n    aos_str_set(&bucket, BUCKET_NAME);\r\n    aos_str_set(&object, sample_image);\r\n    aos_str_set(&filename, \"example-new.jpg\");\r\n\r\n    params = aos_table_make(p, 1);\r\n    apr_table_set(params, OSS_PROCESS, \"image/resize,m_fixed,w_100,h_100\");\r\n\r\n    /* get processed image to file */\r\n    s = oss_get_object_to_file(options, &bucket, &object, headers, \r\n                               params, &filename, &resp_headers);\r\n    if (aos_status_is_ok(s)) {\r\n        printf(\"get object to file succeeded\\n\");\r\n    } else {\r\n        printf(\"get object to file failed\\n\");  \r\n    }\r\n\r\n    aos_pool_destroy(p);\r\n}\r\n\r\nvoid image_crop() \r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_table_t *params = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t filename;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_sample_request_options(options, is_cname);\r\n    aos_str_set(&bucket, BUCKET_NAME);\r\n    aos_str_set(&object, sample_image);\r\n    aos_str_set(&filename, \"example-new.jpg\");\r\n\r\n    params = aos_table_make(p, 1);\r\n    apr_table_set(params, OSS_PROCESS, \"image/crop,w_100,h_100,x_100,y_100,r_1\");\r\n\r\n    /* get processed image to file */\r\n    s = oss_get_object_to_file(options, &bucket, &object, headers, \r\n                               params, &filename, &resp_headers);\r\n    if (aos_status_is_ok(s)) {\r\n        printf(\"get object to file succeeded\\n\");\r\n    } else {\r\n        printf(\"get object to file failed\\n\");  \r\n    }\r\n\r\n    aos_pool_destroy(p);\r\n}\r\n\r\nvoid image_rotate() \r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_table_t *params = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t filename;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_sample_request_options(options, is_cname);\r\n    aos_str_set(&bucket, BUCKET_NAME);\r\n    aos_str_set(&object, sample_image);\r\n    aos_str_set(&filename, \"example-new.jpg\");\r\n\r\n    params = aos_table_make(p, 1);\r\n    apr_table_set(params, OSS_PROCESS, \"image/rotate,90\");\r\n\r\n    /* get processed image to file */\r\n    s = oss_get_object_to_file(options, &bucket, &object, headers, \r\n                               params, &filename, &resp_headers);\r\n    if (aos_status_is_ok(s)) {\r\n        printf(\"get object to file succeeded\\n\");\r\n    } else {\r\n        printf(\"get object to file failed\\n\");  \r\n    }\r\n\r\n    aos_pool_destroy(p);\r\n}\r\n\r\nvoid image_sharpen() \r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_table_t *params = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t filename;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_sample_request_options(options, is_cname);\r\n    aos_str_set(&bucket, BUCKET_NAME);\r\n    aos_str_set(&object, sample_image);\r\n    aos_str_set(&filename, \"example-new.jpg\");\r\n\r\n    params = aos_table_make(p, 1);\r\n    apr_table_set(params, OSS_PROCESS, \"image/sharpen,100\");\r\n\r\n    /* get processed image to file */\r\n    s = oss_get_object_to_file(options, &bucket, &object, headers, \r\n                               params, &filename, &resp_headers);\r\n    if (aos_status_is_ok(s)) {\r\n        printf(\"get object to file succeeded\\n\");\r\n    } else {\r\n        printf(\"get object to file failed\\n\");  \r\n    }\r\n\r\n    aos_pool_destroy(p);\r\n}\r\n\r\nvoid image_watermark() \r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_table_t *params = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t filename;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_sample_request_options(options, is_cname);\r\n    aos_str_set(&bucket, BUCKET_NAME);\r\n    aos_str_set(&object, sample_image);\r\n    aos_str_set(&filename, \"example-new.jpg\");\r\n\r\n    params = aos_table_make(p, 1);\r\n    apr_table_set(params, OSS_PROCESS, \"image/watermark,text_SGVsbG8g5Zu-54mH5pyN5YqhIQ\");\r\n\r\n    /* get processed image to file */\r\n    s = oss_get_object_to_file(options, &bucket, &object, headers, \r\n                               params, &filename, &resp_headers);\r\n    if (aos_status_is_ok(s)) {\r\n        printf(\"get object to file succeeded\\n\");\r\n    } else {\r\n        printf(\"get object to file failed\\n\");  \r\n    }\r\n\r\n    aos_pool_destroy(p);\r\n}\r\n\r\nvoid image_format() {\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_table_t *params = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t filename;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_sample_request_options(options, is_cname);\r\n    aos_str_set(&bucket, BUCKET_NAME);\r\n    aos_str_set(&object, sample_image);\r\n    aos_str_set(&filename, \"example-new.png\");\r\n\r\n    params = aos_table_make(p, 1);\r\n    apr_table_set(params, OSS_PROCESS, \"image/format,png\");\r\n\r\n    /* get processed image to file */\r\n    s = oss_get_object_to_file(options, &bucket, &object, headers, \r\n                               params, &filename, &resp_headers);\r\n    if (aos_status_is_ok(s)) {\r\n        printf(\"get object to file succeeded\\n\");\r\n    } else {\r\n        printf(\"get object to file failed\\n\");  \r\n    }\r\n\r\n    aos_pool_destroy(p);\r\n}\r\n\r\nvoid image_info()\r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_table_t *params = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_list_t buffer;\r\n    aos_buf_t *content = NULL;\r\n    char *buf = NULL;\r\n    int64_t len = 0;\r\n    int64_t size = 0;\r\n    int64_t pos = 0;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_sample_request_options(options, is_cname);\r\n    aos_str_set(&bucket, BUCKET_NAME);\r\n    aos_str_set(&object, sample_image);\r\n    aos_list_init(&buffer);\r\n\r\n    params = aos_table_make(p, 1);\r\n    apr_table_set(params, OSS_PROCESS, \"image/info\");\r\n\r\n    /* test get object to buffer */\r\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers, \r\n                                 params, &buffer, &resp_headers);\r\n    if (aos_status_is_ok(s)) {\r\n        printf(\"put object from file succeeded\\n\");\r\n    } else {\r\n        printf(\"put object from file failed\\n\");  \r\n    }\r\n\r\n    /* get buffer len */\r\n    len = aos_buf_list_len(&buffer);\r\n\r\n    buf = (char *)aos_pcalloc(p, (apr_size_t)(len + 1));\r\n    buf[len] = '\\0';\r\n\r\n    /* copy buffer content to memory */\r\n    aos_list_for_each_entry(aos_buf_t, content, &buffer, node) {\r\n        size = aos_buf_size(content);\r\n        memcpy(buf + pos, content->pos, (size_t)size);\r\n        pos += size;\r\n    }\r\n\r\n    printf(\"image info:%s\\n\", buf);\r\n    \r\n    aos_pool_destroy(p);\r\n}\r\n\r\nvoid image_tones()\r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *headers = NULL;\r\n    aos_table_t *params = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_list_t buffer;\r\n    aos_buf_t *content = NULL;\r\n    char *buf = NULL;\r\n    int64_t len = 0;\r\n    int64_t size = 0;\r\n    int64_t pos = 0;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_sample_request_options(options, is_cname);\r\n    aos_str_set(&bucket, BUCKET_NAME);\r\n    aos_str_set(&object, sample_image);\r\n    aos_list_init(&buffer);\r\n\r\n    params = aos_table_make(p, 1);\r\n    apr_table_set(params, OSS_PROCESS, \"image/average-hue\");\r\n\r\n    /* test get object to buffer */\r\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers,\r\n        params, &buffer, &resp_headers);\r\n    if (aos_status_is_ok(s)) {\r\n        printf(\"put object from file succeeded\\n\");\r\n    }\r\n    else {\r\n        printf(\"put object from file failed\\n\");\r\n    }\r\n\r\n    /* get buffer len */\r\n    len = aos_buf_list_len(&buffer);\r\n\r\n    buf = (char *)aos_pcalloc(p, (apr_size_t)(len + 1));\r\n    buf[len] = '\\0';\r\n\r\n    /* copy buffer content to memory */\r\n    aos_list_for_each_entry(aos_buf_t, content, &buffer, node) {\r\n        size = aos_buf_size(content);\r\n        memcpy(buf + pos, content->pos, (size_t)size);\r\n        pos += size;\r\n    }\r\n\r\n    printf(\"image tone:%s\\n\", buf);\r\n\r\n    aos_pool_destroy(p);\r\n}\r\n\r\nvoid put_example_image()\r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    aos_string_t filename;\r\n    aos_status_t *s = NULL;\r\n    oss_request_options_t *options = NULL;\r\n    int is_cname = 0;\r\n    aos_table_t *headers = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_sample_request_options(options, is_cname);\r\n\r\n    aos_str_set(&bucket, BUCKET_NAME);\r\n    aos_str_set(&object, sample_image);\r\n    aos_str_set(&filename, image_file);\r\n\r\n    s = oss_put_object_from_file(options, &bucket, &object, &filename, \r\n        headers, &resp_headers);\r\n    if (aos_status_is_ok(s)) {\r\n        printf(\"put object from file succeeded\\n\");\r\n    } else {\r\n        printf(\"put object from file failed\\n\");  \r\n    }\r\n\r\n    aos_pool_destroy(p);\r\n}\r\n\r\n\r\n\r\n/**\r\n * ϴʾͼƬ\r\n */\r\nvoid put_sample_image()\r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    aos_string_t filename;\r\n    aos_status_t *s = NULL;\r\n    oss_request_options_t *options = NULL;\r\n    int is_cname = 0;\r\n    aos_table_t *headers = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_sample_request_options(options, is_cname);\r\n\r\n    aos_str_set(&bucket, BUCKET_NAME);\r\n    aos_str_set(&object, sample_image);\r\n    aos_str_set(&filename, image_file);\r\n\r\n    s = oss_put_object_from_file(options, &bucket, &object, &filename, \r\n        headers, &resp_headers);\r\n    if (aos_status_is_ok(s)) {\r\n        printf(\"put object from file succeeded\\n\");\r\n    } else {\r\n        printf(\"put object from file failed\\n\");\r\n    }\r\n\r\n    aos_pool_destroy(p);\r\n}\r\n\r\nvoid image_sample()\r\n{\r\n    put_sample_image();\r\n\r\n    image_resize();\r\n    image_crop();\r\n    image_rotate();\r\n    image_sharpen();\r\n    image_watermark();\r\n    image_format();\r\n    image_info();\r\n    image_tones();\r\n\r\n}\r\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_list_object_sample.c",
    "content": "#include \"aos_log.h\"\r\n#include \"aos_util.h\"\r\n#include \"aos_string.h\"\r\n#include \"aos_status.h\"\r\n#include \"oss_auth.h\"\r\n#include \"oss_util.h\"\r\n#include \"oss_api.h\"\r\n#include \"oss_config.h\"\r\n#include \"oss_sample_util.h\"\r\n\r\nvoid list_object()\r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    oss_request_options_t *options = NULL;\r\n    int is_cname = 0;\r\n    aos_status_t *s = NULL;\r\n    oss_list_object_params_t *params = NULL;\r\n    oss_list_object_content_t *content = NULL;\r\n    int size = 0;\r\n    char *line = NULL;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_sample_request_options(options, is_cname);\r\n\r\n    params = oss_create_list_object_params(p);\r\n    aos_str_set(&bucket, BUCKET_NAME);\r\n    \r\n    s = oss_list_object(options, &bucket, params, NULL);\r\n    if (!aos_status_is_ok(s))\r\n    {\r\n        printf(\"list object failed\\n\");\r\n        return;\r\n    }\r\n\r\n    printf(\"Object\\tSize\\tLastModified\\n\");\r\n    aos_list_for_each_entry(oss_list_object_content_t, content, &params->object_list, node) {\r\n        ++size;\r\n        line = apr_psprintf(p, \"%.*s\\t%.*s\\t%.*s\\n\", content->key.len, content->key.data, \r\n            content->size.len, content->size.data, \r\n            content->last_modified.len, content->last_modified.data);\r\n        printf(\"%s\", line);\r\n    }\r\n    printf(\"Total %d\\n\", size);\r\n\r\n    aos_pool_destroy(p);\r\n\r\n    printf(\"List object ok\\n\");\r\n}\r\n\r\nvoid list_all_objects() \r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    oss_request_options_t *options = NULL;\r\n    int is_cname = 0;\r\n    aos_status_t *s = NULL;\r\n    oss_list_object_params_t *params = NULL;\r\n    oss_list_object_content_t *content = NULL;\r\n    int size = 0;\r\n    char *line = NULL;\r\n    char *prefix = \"mingdi\";\r\n    char *nextMarker = \"\";\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_sample_request_options(options, is_cname);\r\n    aos_str_set(&bucket, BUCKET_NAME);\r\n\r\n    params = oss_create_list_object_params(p);\r\n    params->max_ret = 10;\r\n    aos_str_set(&params->prefix, prefix);\r\n    aos_str_set(&params->marker, nextMarker);\r\n\r\n    printf(\"Object\\tSize\\tLastModified\\n\");\r\n\r\n    do {\r\n        s = oss_list_object(options, &bucket, params, NULL);\r\n        if (!aos_status_is_ok(s))\r\n        {\r\n            printf(\"list object failed\\n\");\r\n            return;\r\n        }\r\n\r\n        aos_list_for_each_entry(oss_list_object_content_t, content, &params->object_list, node) {\r\n            ++size;\r\n            line = apr_psprintf(p, \"%.*s\\t%.*s\\t%.*s\\n\", content->key.len, content->key.data, \r\n                content->size.len, content->size.data, \r\n                content->last_modified.len, content->last_modified.data);\r\n            printf(\"%s\", line);\r\n        }\r\n\r\n        nextMarker = apr_psprintf(p, \"%.*s\", params->next_marker.len, params->next_marker.data);\r\n        aos_str_set(&params->marker, nextMarker);\r\n        aos_list_init(&params->object_list);\r\n        aos_list_init(&params->common_prefix_list);\r\n    } while (params->truncated == AOS_TRUE);\r\n   \r\n    printf(\"Total %d\\n\", size);\r\n\r\n    aos_pool_destroy(p);\r\n\r\n    printf(\"List object ok\\n\");\r\n}\r\n\r\nvoid list_objects_by_delimiter()\r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    oss_request_options_t *options = NULL;\r\n    int is_cname = 0;\r\n    aos_status_t *s = NULL;\r\n    oss_list_object_params_t *params = NULL;\r\n    oss_list_object_content_t *content = NULL;\r\n    oss_list_object_common_prefix_t *common_prefix = NULL;\r\n    int size = 0;\r\n    char *line = NULL;\r\n    char *prefix = \"\";\r\n    char *nextMarker = \"\";\r\n    char *delimiter = \"/\";\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_sample_request_options(options, is_cname);\r\n    aos_str_set(&bucket, BUCKET_NAME);\r\n\r\n    params = oss_create_list_object_params(p);\r\n    params->max_ret = 10;\r\n    aos_str_set(&params->prefix, prefix);\r\n    aos_str_set(&params->marker, nextMarker);\r\n    aos_str_set(&params->delimiter, delimiter);\r\n\r\n    do {\r\n        s = oss_list_object(options, &bucket, params, NULL);\r\n        if (!aos_status_is_ok(s))\r\n        {\r\n            printf(\"list object failed\\n\");\r\n            return;\r\n        }\r\n\r\n        size = 0;\r\n        aos_list_for_each_entry(oss_list_object_content_t, content, &params->object_list, node) {\r\n            ++size;\r\n            line = apr_psprintf(p, \"%.*s\\t%.*s\\t%.*s\\n\", content->key.len, content->key.data,\r\n                content->size.len, content->size.data,\r\n                content->last_modified.len, content->last_modified.data);\r\n            printf(\"object:%s\", line);\r\n        }\r\n\r\n        size = 0;\r\n        aos_list_for_each_entry(oss_list_object_common_prefix_t, common_prefix, &params->common_prefix_list, node) {\r\n            ++size;\r\n            line = apr_psprintf(p, \"%.*s\\n\", common_prefix->prefix.len, common_prefix->prefix.data);\r\n            printf(\"common_prefix:%s\", line);\r\n        }\r\n\r\n        nextMarker = apr_psprintf(p, \"%.*s\", params->next_marker.len, params->next_marker.data);\r\n        aos_str_set(&params->marker, nextMarker);\r\n        aos_list_init(&params->object_list);\r\n        aos_list_init(&params->common_prefix_list);\r\n    } while (params->truncated == AOS_TRUE);\r\n\r\n    aos_pool_destroy(p);\r\n\r\n    printf(\"List object ok\\n\");\r\n}\r\n\r\n\r\nvoid list_object_sample()\r\n{   \r\n    list_object();\r\n    list_all_objects();\r\n    list_objects_by_delimiter();\r\n}\r\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_multipart_upload_sample.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nvoid multipart_upload_file_from_buffer()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *complete_headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_string_t upload_id;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    oss_list_upload_part_params_t *params = NULL;\n    aos_list_t complete_part_list;\n    oss_list_part_content_t *part_content = NULL;\n    oss_complete_part_content_t *complete_part_content = NULL;\n    int part_num1 = 1;\n    int part_num2 = 2;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(p, 1);\n    complete_headers = aos_table_make(p, 1); \n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, \"multipart-key.1\");\n    \n    //init mulitipart\n    s = oss_init_multipart_upload(options, &bucket, &object, \n                                  &upload_id, headers, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"Init multipart upload succeeded, upload_id:%.*s\\n\", \n               upload_id.len, upload_id.data);\n    } else {\n        printf(\"Init multipart upload failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }    \n\n    //upload part\n    aos_list_init(&buffer);\n    make_random_body(p, 200, &buffer);\n    s = oss_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n                                    part_num1, &buffer, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"Upload multipart part succeeded\\n\");\n    } else {\n        printf(\"Upload multipart part failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n\n    aos_list_init(&buffer);\n    make_random_body(p, 10, &buffer);\n    s = oss_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num2, &buffer, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"Upload multipart part succeeded\\n\");\n    } else {\n        printf(\"Upload multipart part failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }    \n\n    //list part\n    params = oss_create_list_upload_part_params(p);\n    params->max_ret = 1000;\n    aos_list_init(&complete_part_list);\n    s = oss_list_upload_part(options, &bucket, &object, &upload_id, \n                             params, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"List multipart succeeded\\n\");\n    } else {\n        printf(\"List multipart failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content, &params->part_list, node) {\n        complete_part_content = oss_create_complete_part_content(p);\n        aos_str_set(&complete_part_content->part_number, \n                    part_content->part_number.data);\n        aos_str_set(&complete_part_content->etag, part_content->etag.data);\n        aos_list_add_tail(&complete_part_content->node, &complete_part_list);\n    }\n\n    //complete multipart\n    apr_table_add(complete_headers, OSS_CONTENT_TYPE, \"video/MP2T\");\n    s = oss_complete_multipart_upload(options, &bucket, &object, &upload_id,\n            &complete_part_list, complete_headers, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"Complete multipart upload succeeded, upload_id:%.*s\\n\", \n               upload_id.len, upload_id.data);\n    } else {\n        printf(\"Complete multipart upload failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid multipart_upload_file_from_file()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *complete_headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_string_t upload_id;\n    oss_upload_file_t *upload_file = NULL;\n    aos_status_t *s = NULL;\n    oss_list_upload_part_params_t *params = NULL;\n    aos_list_t complete_part_list;\n    oss_list_part_content_t *part_content = NULL;\n    oss_complete_part_content_t *complete_part_content = NULL;\n    int part_num = 1;\n    int64_t pos = 0;\n    int64_t file_length = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(p, 1);\n    complete_headers = aos_table_make(p, 1);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, \"multipart-key.2\");\n    \n    //init mulitipart\n    s = oss_init_multipart_upload(options, &bucket, &object, \n                                  &upload_id, headers, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"Init multipart upload succeeded, upload_id:%.*s\\n\", \n               upload_id.len, upload_id.data);\n    } else {\n        printf(\"Init multipart upload failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n\n    //upload part from file\n    file_length = get_file_size(MULTIPART_UPLOAD_FILE_PATH);\n    while(pos < file_length) {\n        upload_file = oss_create_upload_file(p);\n        aos_str_set(&upload_file->filename, MULTIPART_UPLOAD_FILE_PATH);\n        upload_file->file_pos = pos;\n        pos += 100 * 1024;\n        upload_file->file_last = pos < file_length ? pos : file_length; //200k\n        s = oss_upload_part_from_file(options, &bucket, &object, &upload_id,\n                part_num++, upload_file, &resp_headers);\n\n        if (aos_status_is_ok(s)) {\n            printf(\"Multipart upload part from file succeeded\\n\");\n        } else {\n            printf(\"Multipart upload part from file failed\\n\");\n        }\n    }\n\n    //list part\n    params = oss_create_list_upload_part_params(p);\n    params->max_ret = 1000;\n    aos_list_init(&complete_part_list);\n    s = oss_list_upload_part(options, &bucket, &object, &upload_id, \n                             params, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"List multipart succeeded\\n\");\n    } else {\n        printf(\"List multipart failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content, &params->part_list, node) {\n        complete_part_content = oss_create_complete_part_content(p);\n        aos_str_set(&complete_part_content->part_number, \n                    part_content->part_number.data);\n        aos_str_set(&complete_part_content->etag, part_content->etag.data);\n        aos_list_add_tail(&complete_part_content->node, &complete_part_list);\n    }\n\n    //complete multipart\n    s = oss_complete_multipart_upload(options, &bucket, &object, &upload_id,\n            &complete_part_list, complete_headers, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"Complete multipart upload from file succeeded, upload_id:%.*s\\n\", \n               upload_id.len, upload_id.data);\n    } else {\n        printf(\"Complete multipart upload from file failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid abort_multipart_upload()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_string_t upload_id;\n    aos_status_t *s = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(p, 1);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    \n    s = oss_init_multipart_upload(options, &bucket, &object, \n                                  &upload_id, headers, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"Init multipart upload succeeded, upload_id:%.*s\\n\", \n               upload_id.len, upload_id.data);\n    } else {\n        printf(\"Init multipart upload failed\\n\"); \n        aos_pool_destroy(p);\n        return;\n    }\n    \n    s = oss_abort_multipart_upload(options, &bucket, &object, &upload_id, \n                                   &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"Abort multipart upload succeeded, upload_id::%.*s\\n\", \n               upload_id.len, upload_id.data);\n    } else {\n        printf(\"Abort multipart upload failed\\n\"); \n    }    \n\n    aos_pool_destroy(p);\n}\n\nvoid multipart_object_sample()\n{\n    multipart_upload_file_from_buffer();\n    multipart_upload_file_from_file();\n    abort_multipart_upload();\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_progress_sample.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nvoid put_and_get_from_buffer_with_progress()\n{\n    aos_pool_t *p = NULL;\n    char *str = \"oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    aos_list_t buffer;\n    aos_buf_t *content;\n\n    /* init test*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n   \n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    aos_list_init(&resp_body);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-meta-author\", \"oss\");\n    \n    /* test put object */\n    s = oss_do_put_object_from_buffer(options, &bucket, &object, &buffer, \n        headers, params, percentage, &resp_headers, &resp_body);\n    if (aos_status_is_ok(s)) {\n        printf(\"put object from buffer succeeded\\n\");\n    } else {\n        printf(\"put object from buffer failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n\n    aos_pool_destroy(p);\n\n    /* test get object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n\n    s = oss_do_get_object_to_buffer(options, &bucket, &object, NULL, NULL, \n        &buffer, percentage, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"get object to buffer succeeded\\n\");\n    } else {\n        printf(\"get object to buffer failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid put_and_get_from_file_with_progress()\n{\n    aos_pool_t *p = NULL;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    char *download_filename = \"get_object_to_local_file.txt\";\n\n    /* init test*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n   \n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    aos_str_set(&filename, __FILE__);\n    aos_list_init(&resp_body);\n\n    /* put object */\n    s = oss_do_put_object_from_file(options, &bucket, &object, &filename, \n        NULL, NULL, percentage, &resp_headers, &resp_body);\n    if (aos_status_is_ok(s)) {\n        printf(\"put object from file succeeded\\n\");\n    } else {\n        printf(\"put object from file failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n    \n    aos_pool_destroy(p);\n\n    /* get object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&filename, download_filename);\n\n    s = oss_do_get_object_to_file(options, &bucket, &object, NULL, NULL, \n        &filename, percentage, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"get object to file succeeded\\n\");\n    } else {\n        printf(\"get object to file failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid append_object_with_progress()\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_append_object.ts\";\n    char *str = \"oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    uint64_t initcrc = 0;\n    aos_list_t resp_body;\n    aos_list_t buffer;\n    aos_buf_t *content;\n\n    /* init test*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n   \n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-meta-author\", \"oss\");\n    \n    /* append object from buffer */\n    s = oss_do_append_object_from_buffer(options, &bucket, &object, 0, initcrc, &buffer, \n        headers, params, percentage, &resp_headers, &resp_body);\n    if (aos_status_is_ok(s)) {\n        printf(\"progress: append object from buffer succeeded\\n\");\n    } else {\n        printf(\"progress: append object from buffer failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n\n    aos_pool_destroy(p);\n\n    /* append object from file*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n\n    aos_str_set(&filename, __FILE__);\n    initcrc = aos_atoui64((char*)(apr_table_get(resp_headers, OSS_HASH_CRC64_ECMA)));\n\n    s = oss_do_append_object_from_file(options, &bucket, &object, strlen(str), initcrc, &filename, \n        NULL, NULL, percentage, &resp_headers, &resp_body);\n    if (aos_status_is_ok(s)) {\n        printf(\"progress: append object from file succeeded\\n\");\n    } else {\n        printf(\"progress: append object from file failed\\n\");\n    }\n\n    oss_delete_object(options, &bucket, &object, NULL);\n\n    aos_pool_destroy(p);\n}\n\nvoid multipart_upload_from_buffer_with_progress()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    oss_list_upload_part_params_t *params = NULL;\n    aos_string_t upload_id;\n    aos_list_t complete_part_list;\n    oss_list_part_content_t *part_content1 = NULL;\n    oss_complete_part_content_t *complete_content1 = NULL;\n    int part_num = 1;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n\n    // init mulitipart\n    s = oss_init_multipart_upload(options, &bucket, &object, &upload_id, NULL, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"Init multipart upload succeeded, upload_id:%.*s\\n\", \n               upload_id.len, upload_id.data);\n    } else {\n        printf(\"Init multipart upload failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    } \n\n    // upload part\n    aos_list_init(&buffer);\n    make_random_body(p, 200, &buffer);\n\n    s = oss_do_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num++, &buffer, percentage, NULL, NULL, NULL, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"Upload multipart part succeeded\\n\");\n    } else {\n        printf(\"Upload multipart part failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n\n    aos_list_init(&buffer);\n    make_random_body(p, 200, &buffer);\n    s = oss_do_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num++, &buffer, percentage, NULL, NULL, NULL, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"Upload multipart part succeeded\\n\");\n    } else {\n        printf(\"Upload multipart part failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n\n    // list part\n    params = oss_create_list_upload_part_params(p);\n    params->max_ret = 1;\n    aos_list_init(&complete_part_list);\n\n    s = oss_list_upload_part(options, &bucket, &object, &upload_id, \n                             params, NULL);\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content1, &params->part_list, node) {\n        complete_content1 = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content1->part_number, part_content1->part_number.data);\n        aos_str_set(&complete_content1->etag, part_content1->etag.data);\n        aos_list_add_tail(&complete_content1->node, &complete_part_list);\n    }\n\n    // complete multipart\n    s = oss_complete_multipart_upload(options, &bucket, &object, &upload_id,\n            &complete_part_list, NULL, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"Complete multipart upload succeeded, upload_id:%.*s\\n\", \n               upload_id.len, upload_id.data);\n    } else {\n        printf(\"Complete multipart upload failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid multipart_upload_from_file_with_progress()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    oss_list_upload_part_params_t *params = NULL;\n    aos_string_t upload_id;\n    aos_list_t complete_part_list;\n    oss_upload_file_t *upload_file = NULL;\n    oss_list_part_content_t *part_content1 = NULL;\n    oss_complete_part_content_t *complete_content1 = NULL;\n    int part_num = 1;    \n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n\n    upload_file = oss_create_upload_file(p);\n    aos_str_set(&upload_file->filename, __FILE__);\n\n    // init mulitipart\n    s = oss_init_multipart_upload(options, &bucket, &object, &upload_id, NULL, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"Init multipart upload succeeded, upload_id:%.*s\\n\", \n               upload_id.len, upload_id.data);\n    } else {\n        printf(\"Init multipart upload failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }  \n\n    // upload part\n    upload_file->file_pos = 0;\n    upload_file->file_last = 1024;\n    s = oss_do_upload_part_from_file(options, &bucket, &object, &upload_id,\n        part_num++, upload_file, percentage, NULL, NULL, NULL, NULL);\n    \n    if (aos_status_is_ok(s)) {\n        printf(\"Upload multipart part succeeded\\n\");\n    } else {\n        printf(\"Upload multipart part failed\\n\");\n        aos_pool_destroy(p);\n        return;\n    }\n\n    // list part\n    params = oss_create_list_upload_part_params(p);\n    params->max_ret = 1;\n    aos_list_init(&complete_part_list);\n\n    s = oss_list_upload_part(options, &bucket, &object, &upload_id, \n                             params, NULL);\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content1, &params->part_list, node) {\n        complete_content1 = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content1->part_number, part_content1->part_number.data);\n        aos_str_set(&complete_content1->etag, part_content1->etag.data);\n        aos_list_add_tail(&complete_content1->node, &complete_part_list);\n    }\n\n    // complete multipart\n    s = oss_complete_multipart_upload(options, &bucket, &object, &upload_id,\n            &complete_part_list, NULL, NULL);\n    if (aos_status_is_ok(s)) {\n        printf(\"Complete multipart upload succeeded, upload_id:%.*s\\n\", \n               upload_id.len, upload_id.data);\n    } else {\n        printf(\"Complete multipart upload failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid progress_sample()\n{\n    put_and_get_from_buffer_with_progress();\n    put_and_get_from_file_with_progress();\n    append_object_with_progress();\n    multipart_upload_from_buffer_with_progress();\n    multipart_upload_from_file_with_progress();\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_put_object_acl_sample.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nvoid put_object_acl(){\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_acl_e oss_acl = OSS_ACL_DEFAULT;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n\n    s = oss_put_object_acl(options, &bucket, &object, oss_acl, &resp_headers);\n    \n    if (aos_status_is_ok(s)) {\n        printf(\"put object acl success!\\n\"); \n    } else {\n        printf(\"put object acl failed!\\n\"); \n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid put_object_acl_sample(){\n    put_object_acl();\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_put_object_sample.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nvoid put_object_from_buffer()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_list_t buffer;\n    aos_buf_t *content = NULL;\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-meta-author\", \"oss\");\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    s = oss_put_object_from_buffer(options, &bucket, &object, \n                   &buffer, headers, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"put object from buffer succeeded\\n\");\n    } else {\n        printf(\"put object from buffer failed\\n\");      \n    }    \n\n    aos_pool_destroy(p);\n}\n\nvoid put_object_from_buffer_with_md5()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_list_t buffer;\n    unsigned char *md5 = NULL;\n    char *buf = NULL;\n    int64_t buf_len;\n    char *b64_value = NULL;\n    int b64_len;\n    aos_buf_t *content = NULL;\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(p, 2);\n    apr_table_set(headers, \"x-oss-meta-author\", \"oss\");\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    //add Content-MD5\n    buf_len = aos_buf_list_len(&buffer);\n    buf = aos_buf_list_content(options->pool, &buffer);\n    md5 = aos_md5(options->pool, buf, (apr_size_t)buf_len);\n    b64_value = aos_pcalloc(options->pool, 50);\n    b64_len = aos_base64_encode(md5, 20, b64_value);\n    b64_value[b64_len] = '\\0';\n    apr_table_set(headers, OSS_CONTENT_MD5, b64_value);\n\n    s = oss_put_object_from_buffer(options, &bucket, &object, \n                   &buffer, headers, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"put object from buffer with md5 succeeded\\n\");\n    } else {\n    printf(\"put object from buffer with md5 failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid put_object_from_file()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    char *filename = __FILE__;\n    aos_status_t *s = NULL;\n    aos_string_t file;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(options->pool, 1);\n    apr_table_set(headers, OSS_CONTENT_TYPE, \"image/jpeg\");\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    aos_str_set(&file, filename);\n\n    s = oss_put_object_from_file(options, &bucket, &object, &file, \n                                 headers, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"put object from file succeeded\\n\");\n    } else {\n        printf(\"put object from file failed, code:%d, error_code:%s, error_msg:%s, request_id:%s\\n\",\n            s->code, s->error_code, s->error_msg, s->req_id);\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid put_object_by_signed_url()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t url;\n    int is_cname = 0;\n    aos_http_request_t *request = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    char *filename = __FILE__;\n    aos_status_t *s = NULL;\n    aos_string_t file;\n    char *signed_url = NULL;\n    int64_t expires_time;\n\n    aos_pool_create(&p, NULL);\n\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n\n    // create request\n    request = aos_http_request_create(p);\n    request->method = HTTP_PUT;\n\n    // create headers\n    headers = aos_table_make(options->pool, 0);\n\n    // set value\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, OBJECT_NAME);\n    aos_str_set(&file, filename);\n\n    // expires time\n    expires_time = apr_time_now() / 1000000 + 120;    \n\n    // generate signed url for put \n    signed_url = oss_gen_signed_url(options, &bucket, &object, \n                                    expires_time, request);\n    aos_str_set(&url, signed_url);\n    \n    printf(\"signed put url : %s\\n\", signed_url);\n\n    // put object by signed url\n    s = oss_put_object_from_file_by_url(options, &url, &file, \n                                        headers, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"put object by signed url succeeded\\n\");\n    } else {\n        printf(\"put object by signed url failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid create_dir()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(options->pool, 0);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, DIR_NAME);\n    aos_list_init(&buffer);\n\n    s = oss_put_object_from_buffer(options, &bucket, &object, &buffer,\n                                   headers, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"create dir succeeded\\n\");\n    } else {\n        printf(\"create dir failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid put_object_to_dir()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    char *filename = __FILE__;\n    char *key = NULL;\n    aos_status_t *s = NULL;\n    aos_string_t file;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(options->pool, 0);\n    aos_str_set(&bucket, BUCKET_NAME);\n\n    key = (char*)malloc(strlen(DIR_NAME) + strlen(OBJECT_NAME) + 1);\n    strcpy(key, DIR_NAME);\n    strcat(key, OBJECT_NAME);\n    aos_str_set(&object, key);\n    aos_str_set(&file, filename);\n\n    s = oss_put_object_from_file(options, &bucket, &object, &file, \n                                 headers, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"put object to dir succeeded\\n\");\n    } else {\n        printf(\"put object to dir failed\\n\");\n    }\n\n    free(key);\n    aos_pool_destroy(p);\n}\n\nvoid put_object_sample()\n{\n    put_object_from_buffer();\n    put_object_from_file();\n    put_object_by_signed_url();    \n\n    create_dir();\n    put_object_to_dir();\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_resumable_sample.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nvoid resumable_upload_with_multi_threads()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, \"my_key_1.zip\");\n    aos_str_set(&filename, \"local_big_file.zip\");\n    aos_list_init(&resp_body);\n\n    // upload\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_FALSE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"upload succeeded\\n\");\n    } else {\n        printf(\"upload failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid resumable_upload_with_resumable()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, \"my_key_2.zip\");\n    aos_str_set(&filename, \"local_big_file.zip\");\n    aos_list_init(&resp_body);\n\n    // upload\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"upload succeeded\\n\");\n    } else {\n        printf(\"upload failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid resumable_upload_sample()\n{\n    resumable_upload_with_multi_threads();\n    resumable_upload_with_resumable();\n}\n\nvoid resumable_download_with_multi_threads()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, \"my_key_1.zip\");\n    aos_str_set(&filename, \"local_big_file_1.zip\");\n\n    // download\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_FALSE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"download succeeded\\n\");\n    } else {\n        printf(\"download failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid resumable_download_with_resumable()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, BUCKET_NAME);\n    aos_str_set(&object, \"my_key_2.zip\");\n    aos_str_set(&filename, \"local_big_file_2.zip\");\n\n    // download\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"download succeeded\\n\");\n    } else {\n        printf(\"download failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\n\nvoid resumable_download_sample()\n{\n    resumable_download_with_multi_threads();\n    resumable_download_with_resumable();\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_sample_util.c",
    "content": "#include <sys/stat.h>\n#include <stdlib.h>\n#include \"oss_config.h\"\n#include \"oss_api.h\"\n#include \"oss_sample_util.h\"\n\nvoid make_rand_string(aos_pool_t *p, int len, aos_string_t *data)\n{\n    char *str = NULL;\n    int i = 0;\n    str = (char *)aos_palloc(p, len + 1);\n    for ( ; i < len; i++) {\n        str[i] = rand() % 128;\n    }\n    str[len] = '\\0';\n    aos_str_set(data, str);\n}\n\naos_buf_t *make_random_buf(aos_pool_t *p, int len)\n{\n    int bytes;\n    aos_buf_t *b;\n    aos_string_t str;\n\n    make_rand_string(p, 16, &str);\n    b = aos_create_buf(p, len);\n\n    while (b->last < b->end) {\n        bytes = b->end - b->last;\n        bytes = aos_min(bytes, 16);\n        memcpy(b->last, str.data, bytes);\n        b->last += bytes;\n    }\n\n    return b;\n}\n\nvoid make_random_body(aos_pool_t *p, int count, aos_list_t *bc)\n{\n    int i = 0;\n    int len;\n    aos_buf_t *b;\n\n    srand((int)time(0));\n    for (; i < count; ++i) {\n        len = 1 + (int)(4096.0*rand() / (RAND_MAX+1.0));\n        b = make_random_buf(p, len);\n        aos_list_add_tail(&b->node, bc);\n    }\n}\n\nvoid init_sample_config(oss_config_t *config, int is_cname)\n{\n    aos_str_set(&config->endpoint, OSS_ENDPOINT);\n    aos_str_set(&config->access_key_id, ACCESS_KEY_ID);\n    aos_str_set(&config->access_key_secret, ACCESS_KEY_SECRET);\n    config->is_cname = is_cname;\n}\n\nvoid init_sample_request_options(oss_request_options_t *options, int is_cname)\n{\n    options->config = oss_config_create(options->pool);\n    init_sample_config(options->config, is_cname);\n    options->ctl = aos_http_controller_create(options->pool, 0);\n}\n\nint64_t get_file_size(const char *file_path)\n{\n    int64_t filesize = -1;\n    struct stat statbuff;\n\n    if(stat(file_path, &statbuff) < 0){\n        return filesize;\n    } else {\n        filesize = statbuff.st_size;\n    }\n\n    return filesize;\n}\n\nvoid percentage(int64_t consumed_bytes, int64_t total_bytes) \n{\n    assert(total_bytes >= consumed_bytes);\n    printf(\"%%%\" APR_INT64_T_FMT \"\\n\", consumed_bytes * 100 / total_bytes);\n}\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_sample_util.h",
    "content": "#ifndef OSS_SAMPLE_UTIL_H\n#define OSS_SAMPLE_UTIL_H\n\n#include \"aos_http_io.h\"\n#include \"aos_string.h\"\n#include \"aos_transport.h\"\n#include \"oss_define.h\"\n\nOSS_CPP_START\n\nvoid make_rand_string(aos_pool_t *p, int len, aos_string_t *data);\n\naos_buf_t *make_random_buf(aos_pool_t *p, int len);\n\nvoid make_random_body(aos_pool_t *p, int count, aos_list_t *bc);\n\nvoid init_sample_config(oss_config_t *config, int is_cname);\n\nvoid init_sample_request_options(oss_request_options_t *options, int is_cname);\n\nint64_t get_file_size(const char *file_path);\n\nvoid percentage(int64_t consumed_bytes, int64_t total_bytes);\n\nOSS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk_sample/oss_select_object_sample.c",
    "content": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_sample_util.h\"\n\nvoid select_object_to_buffer()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    oss_select_object_params_t *select_params = NULL;\n    aos_string_t select_sql;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, \"oss-select\");\n    aos_str_set(&object, \"city_sample_data.csv\");\n    aos_list_init(&buffer);\n\n    aos_str_set(&select_sql, \"select * from ossobject limit 10\");\n\n    select_params = oss_create_select_object_params(p);\n\n    s = oss_select_object_to_buffer(options, &bucket, &object,\n        &select_sql, select_params, &buffer, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"get object to buffer succeeded\\n\");\n    }\n    else \n    {\n        printf(\"get object to buffer failed\\n\");  \n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid select_object_to_file()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_select_object_params_t *select_params = NULL;\n    aos_string_t filename;\n    aos_string_t select_sql;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, \"oss-select\");\n    aos_str_set(&object, \"city_sample_data.csv\");\n    aos_str_set(&filename, \"city_sample_data_part.csv\");\n\n    aos_str_set(&select_sql, \"select * from ossobject limit 10\");\n\n    select_params = oss_create_select_object_params(p);\n\n    s = oss_select_object_to_file(options, &bucket, &object,\n        &select_sql, select_params, &filename, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"get object to buffer succeeded\\n\");\n    }\n    else\n    {\n        printf(\"get object to buffer failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\nvoid create_select_object_meta()\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_select_object_meta_params_t *meta_params = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_sample_request_options(options, is_cname);\n    aos_str_set(&bucket, \"oss-select\");\n    aos_str_set(&object, \"city_sample_data.csv\");\n\n    meta_params = oss_create_select_object_meta_params(p);\n\n    s = oss_create_select_object_meta(options, &bucket, &object,\n        meta_params, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        printf(\"get object to buffer succeeded\\n\");\n    }\n    else\n    {\n        printf(\"get object to buffer failed\\n\");\n    }\n\n    aos_pool_destroy(p);\n}\n\n\n\nvoid select_object_sample()\n{\n    select_object_to_buffer();\n    select_object_to_file();\n    create_select_object_meta();\n}\n"
  },
  {
    "path": "oss_c_sdk_test/CMakeLists.txt",
    "content": "project (oss_c_sdk_test)\n\ninclude_directories(${CMAKE_SOURCE_DIR})\n\nconfigure_file (\n  \"${PROJECT_SOURCE_DIR}/test.h.in\"\n  \"${PROJECT_SOURCE_DIR}/test.h\"\n)\n\nset(SAMPLE_SOURCE_FILES CuTest.c oss_test_util.c oss_config.c test_oss_bucket.c \n    test_oss_object.c test_oss_multipart.c test_oss_live.c test_oss_image.c \n    test_oss_progress.c test_oss_callback.c test_oss_crc.c cjson_utils.c cjson.c\n    test_oss_proxy.c test_oss_resumable.c test_aos.c test_all.c test_oss_select_object.c\n    test_oss_object_tagging.c test_oss_xml.c test_oss_https.c test_oss_sign.c)\n\n# find_path(APR_INCLUDE_DIR apr-1/apr_time.h)\n# find_path(APR_UTIL_INCLUDE_DIR apr/include/apr-1/apr_md5.h)\n# find_path(MINIXML_INCLUDE_DIR mxml.h)\n# find_path(CURL_INCLUDE_DIR curl/curl.h)\n\ninclude_directories (${APR_INCLUDE_DIR})\ninclude_directories (${APR_UTIL_INCLUDE_DIR})\ninclude_directories (${MINIXML_INCLUDE_DIR})\ninclude_directories (${CURL_INCLUDE_DIR})\ninclude_directories (\"${CMAKE_SOURCE_DIR}/oss_c_sdk\")\n\nadd_executable(oss_c_sdk_test ${SAMPLE_SOURCE_FILES})\n\nif (CMAKE_HOST_WIN32)\n    target_link_libraries(oss_c_sdk_test ws2_32)\nelse()\n    find_library(APR_LIBRARY apr-1 PATHS /usr/local/apr/lib/)\n    find_library(APR_UTIL_LIBRARY aprutil-1 PATHS /usr/local/apr/lib/)\n    find_library(MINIXML_LIBRARY mxml)\n    find_library(CURL_LIBRARY curl)\n    find_library(PTHREAD_LIBRARY pthread)\n    find_library(MATH_LIBRARY m)\n    target_link_libraries(oss_c_sdk_test ${PTHREAD_LIBRARY})\n    target_link_libraries(oss_c_sdk_test ${MATH_LIBRARY})\nendif()\n\ntarget_link_libraries(oss_c_sdk_test oss_c_sdk)\ntarget_link_libraries(oss_c_sdk_test ${APR_UTIL_LIBRARY})\ntarget_link_libraries(oss_c_sdk_test ${APR_LIBRARY})\ntarget_link_libraries(oss_c_sdk_test ${MINIXML_LIBRARY})\ntarget_link_libraries(oss_c_sdk_test ${CURL_LIBRARY})\n"
  },
  {
    "path": "oss_c_sdk_test/CuTest-README.txt",
    "content": "Originally obtained from \"http://cutest.sourceforge.net/\" version 1.4.\n\nHOW TO USE\n\nYou can use CuTest to create unit tests to drive your development\nin the style of Extreme Programming. You can also add unit tests to\nexisting code to ensure that it works as you suspect.\n\nYour unit tests are an investment. They let you to change your\ncode and add new features confidently without worrying about\naccidentally breaking earlier features.\n\n\nLICENSING\n\nCopyright (c) 2003 Asim Jalis\n\nThis software is provided 'as-is', without any express or implied\nwarranty. In no event will the authors be held liable for any damages\narising from the use of this software.\n\nPermission is granted to anyone to use this software for any purpose,\nincluding commercial applications, and to alter it and redistribute it\nfreely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must not\nclaim that you wrote the original software. If you use this software in\na product, an acknowledgment in the product documentation would be\nappreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and must not\nbe misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source\ndistribution.\n\n\nGETTING STARTED\n\nTo add unit testing to your C code the only files you need are\nCuTest.c and CuTest.h. \n\nCuTestTest.c and AllTests.c have been included to provide an\nexample of how to write unit tests and then how to aggregate them\ninto suites and into a single AllTests.c file. Suites allow you\nto put group tests into logical sets. AllTests.c combines all the\nsuites and runs them. \n\nYou should not have to look inside CuTest.c. Looking in\nCuTestTest.c and AllTests.c (for example usage) should be\nsufficient. \n\nAfter downloading the sources, run your compiler to create an\nexecutable called AllTests.exe. For example, if you are using\nWindows with the cl.exe compiler you would type: \n\n    cl.exe AllTests.c CuTest.c CuTestTest.c\n    AllTests.exe\n\nThis will run all the unit tests associated with CuTest and print\nthe output on the console. You can replace cl.exe with gcc or\nyour favorite compiler in the command above.\n\n\nDETAILED EXAMPLE\n\nHere is a more detailed example. We will work through a simple\ntest first exercise. The goal is to create a library of string\nutilities. First, lets write a function that converts a\nnull-terminated string to all upper case.\n\nEnsure that CuTest.c and CuTest.h are accessible from your C\nproject. Next, create a file called StrUtil.c with these\ncontents:\n\n    #include \"CuTest.h\"\n    \n    char* StrToUpper(char* str) {\n        return str;\n    }\n    \n    void TestStrToUpper(CuTest *tc) {\n        char* input = strdup(\"hello world\");\n        char* actual = StrToUpper(input);\n        char* expected = \"HELLO WORLD\";\n        CuAssertStrEquals(tc, expected, actual);\n    }\n   \n    CuSuite* StrUtilGetSuite() {\n        CuSuite* suite = CuSuiteNew();\n        SUITE_ADD_TEST(suite, TestStrToUpper);\n        return suite;\n    }\n    \nCreate another file called AllTests.c with these contents:\n\n    #include \"CuTest.h\"\n    \n    CuSuite* StrUtilGetSuite();\n    \n    void RunAllTests(void) {\n        CuString *output = CuStringNew();\n        CuSuite* suite = CuSuiteNew();\n        \n        CuSuiteAddSuite(suite, StrUtilGetSuite());\n    \n        CuSuiteRun(suite);\n        CuSuiteSummary(suite, output);\n        CuSuiteDetails(suite, output);\n        printf(\"%s\\n\", output->buffer);\n    }\n    \n    int main(void) {\n        RunAllTests();\n    }\n\nThen type this on the command line:\n\n    gcc AllTests.c CuTest.c StrUtil.c\n\nto compile. You can replace gcc with your favorite compiler.\nCuTest should be portable enough to handle all Windows and Unix\ncompilers. Then to run the tests type:\n\n    a.out\n\nThis will print an error because we haven't implemented the\nStrToUpper function correctly. We are just returning the string\nwithout changing it to upper case. \n\n    char* StrToUpper(char* str) {\n        return str;\n    }\n\nRewrite this as follows:\n\n    char* StrToUpper(char* str) {\n        char* p;\n        for (p = str ; *p ; ++p) *p = toupper(*p);\n        return str;\n    }\n\nRecompile and run the tests again. The test should pass this\ntime.\n\n\nWHAT TO DO NEXT\n\nAt this point you might want to write more tests for the\nStrToUpper function. Here are some ideas:\n\nTestStrToUpper_EmptyString :  pass in \"\"\nTestStrToUpper_UpperCase   :  pass in \"HELLO WORLD\"\nTestStrToUpper_MixedCase   :  pass in \"HELLO world\"\nTestStrToUpper_Numbers     :  pass in \"1234 hello\"\n\nAs you write each one of these tests add it to StrUtilGetSuite\nfunction. If you don't the tests won't be run. Later as you write\nother functions and write tests for them be sure to include those\nin StrUtilGetSuite also. The StrUtilGetSuite function should\ninclude all the tests in StrUtil.c\n\nOver time you will create another file called FunkyStuff.c\ncontaining other functions unrelated to StrUtil. Follow the same\npattern. Create a FunkyStuffGetSuite function in FunkyStuff.c.\nAnd add FunkyStuffGetSuite to AllTests.c.\n\nThe framework is designed in the way it is so that it is easy to\norganize a lot of tests.\n\nTHE BIG PICTURE\n\nEach individual test corresponds to a CuTest. These are grouped\nto form a CuSuite. CuSuites can hold CuTests or other CuSuites.\nAllTests.c collects all the CuSuites in the program into a single\nCuSuite which it then runs as a single CuSuite.\n\nThe project is open source so feel free to take a peek under the\nhood at the CuTest.c file to see how it works. CuTestTest.c\ncontains tests for CuTest.c. So CuTest tests itself.\n\nSince AllTests.c has a main() you will need to exclude this when\nyou are building your product. Here is a nicer way to do this if\nyou want to avoid messing with multiple builds. Remove the main()\nin AllTests.c. Note that it just calls RunAllTests(). Instead\nwe'll call this directly from the main program.\n\nNow in the main() of the actual program check to see if the\ncommand line option \"--test\" was passed. If it was then I call\nRunAllTests() from AllTests.c. Otherwise run the real program.\n\nShipping the tests with the code can be useful. If you customers\ncomplain about a problem you can ask them to run the unit tests\nand send you the output. This can help you to quickly isolate the\npiece of your system that is malfunctioning in the customer's\nenvironment. \n\nCuTest offers a rich set of CuAssert functions. Here is a list:\n\nvoid CuAssert(CuTest* tc, char* message, int condition);\nvoid CuAssertTrue(CuTest* tc, int condition);\nvoid CuAssertStrEquals(CuTest* tc, char* expected, char* actual);\nvoid CuAssertIntEquals(CuTest* tc, int expected, int actual);\nvoid CuAssertPtrEquals(CuTest* tc, void* expected, void* actual);\nvoid CuAssertPtrNotNull(CuTest* tc, void* pointer);\n\nThe project is open source and so you can add other more powerful\nasserts to make your tests easier to write and more concise.\n\n\nAUTOMATING TEST SUITE GENERATION\n\nmake-tests.sh will grep through all the .c files in the current\ndirectory and generate the code to run all the tests contained in\nthem. Using this script you don't have to worry about writing\nAllTests.c or dealing with any of the other suite code.\n\n\nCREDITS\n\n[02.23.2003] Dave Glowacki has added\n(1) file name and line numbers to the error messages, (2)\nAssertDblEquals for doubles, (3) Assert<X>Equals_Msg version of\nall the Assert<X>Equals to pass in optional message which is\nprinted out on assert failure.\n"
  },
  {
    "path": "oss_c_sdk_test/CuTest.c",
    "content": "/* \n * Copyright (c) 2003 Asim Jalis\n * \n *  This software is provided 'as-is', without any express or implied\n *  warranty. In no event will the authors be held liable for any\n *  damages arising from the use of this software.\n * \n *  Permission is granted to anyone to use this software for any\n *  purpose, including commercial applications, and to alter it and\n *  redistribute it freely, subject to the following restrictions:\n * \n *  1. The origin of this software must not be misrepresented; you\n *  must not claim that you wrote the original software. If you use\n *  this software in a product, an acknowledgment in the product\n *  documentation would be appreciated but is not required.\n * \n *  2. Altered source versions must be plainly marked as such, and\n *  must not be misrepresented as being the original software.\n * \n *  3. This notice may not be removed or altered from any source\n *  distribution.\n *-------------------------------------------------------------------------*\n *\n * Originally obtained from \"http://cutest.sourceforge.net/\" version 1.4.\n *\n * See CuTest.h for a list of serf-specific modifications.\n */\n#include <assert.h>\n#include <setjmp.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n\n#include \"CuTest.h\"\n\n/*-------------------------------------------------------------------------*\n * CuStr\n *-------------------------------------------------------------------------*/\n\nchar* CuStrAlloc(int size)\n{\n    char* newStr = (char*) malloc( sizeof(char) * (size) );\n    return newStr;\n}\n\nchar* CuStrCopy(const char* old)\n{\n    int len = strlen(old);\n    char* newStr = CuStrAlloc(len + 1);\n    strcpy(newStr, old);\n    return newStr;\n}\n\n/*-------------------------------------------------------------------------*\n * CuString\n *-------------------------------------------------------------------------*/\n\nvoid CuStringInit(CuString* str)\n{\n    str->length = 0;\n    str->size = STRING_MAX;\n    str->buffer = (char*) malloc(sizeof(char) * str->size);\n    str->buffer[0] = '\\0';\n}\n\nCuString* CuStringNew(void)\n{\n    CuString* str = (CuString*) malloc(sizeof(CuString));\n    str->length = 0;\n    str->size = STRING_MAX;\n    str->buffer = (char*) malloc(sizeof(char) * str->size);\n    str->buffer[0] = '\\0';\n    return str;\n}\n\nvoid CuStringFree(CuString *str)\n{\n    free(str->buffer);\n    free(str);\n}\n\nvoid CuStringResize(CuString* str, int newSize)\n{\n    str->buffer = (char*) realloc(str->buffer, sizeof(char) * newSize);\n    str->size = newSize;\n}\n\nvoid CuStringAppend(CuString* str, const char* text)\n{\n    int length;\n\n    if (text == NULL) {\n        text = \"NULL\";\n    }\n\n    length = strlen(text);\n    if (str->length + length + 1 >= str->size)\n        CuStringResize(str, str->length + length + 1 + STRING_INC);\n    str->length += length;\n    strcat(str->buffer, text);\n}\n\nvoid CuStringAppendChar(CuString* str, char ch)\n{\n    char text[2];\n    text[0] = ch;\n    text[1] = '\\0';\n    CuStringAppend(str, text);\n}\n\nvoid CuStringAppendFormat(CuString* str, const char* format, ...)\n{\n    va_list argp;\n    char buf[HUGE_STRING_LEN];\n    va_start(argp, format);\n    vsprintf(buf, format, argp);\n    va_end(argp);\n    CuStringAppend(str, buf);\n}\n\nvoid CuStringInsert(CuString* str, const char* text, int pos)\n{\n    int length = strlen(text);\n    if (pos > str->length)\n        pos = str->length;\n    if (str->length + length + 1 >= str->size)\n        CuStringResize(str, str->length + length + 1 + STRING_INC);\n    memmove(str->buffer + pos + length, str->buffer + pos, (str->length - pos) + 1);\n    str->length += length;\n    memcpy(str->buffer + pos, text, length);\n}\n\n/*-------------------------------------------------------------------------*\n * CuTest\n *-------------------------------------------------------------------------*/\n\nvoid CuTestInit(CuTest* t, const char* name, TestFunction function)\n{\n    t->name = CuStrCopy(name);\n    t->failed = 0;\n    t->ran = 0;\n    t->message = NULL;\n    t->function = function;\n    t->jumpBuf = NULL;\n    t->setup = NULL;\n    t->teardown = NULL;\n    t->testBaton = NULL;\n}\n\nCuTest* CuTestNew(const char* name, TestFunction function)\n{\n    CuTest* tc = CU_ALLOC(CuTest);\n    CuTestInit(tc, name, function);\n    return tc;\n}\n\nvoid CuTestFree(CuTest* tc)\n{\n    free(tc->name);\n    free(tc);\n}\n\nvoid CuTestRun(CuTest* tc)\n{\n    jmp_buf buf;\n    tc->jumpBuf = &buf;\n    if (tc->setup)\n        tc->testBaton = tc->setup(tc);\n    if (setjmp(buf) == 0)\n    {\n        tc->ran = 1;\n        (tc->function)(tc);\n    }\n    if (tc->teardown)\n        tc->teardown(tc->testBaton);\n\n    tc->jumpBuf = 0;\n}\n\nstatic void CuFailInternal(CuTest* tc, const char* file, int line, CuString* string)\n{\n    char buf[HUGE_STRING_LEN];\n\n    sprintf(buf, \"%s:%d: \", file, line);\n    CuStringInsert(string, buf, 0);\n\n    tc->failed = 1;\n    tc->message = string->buffer;\n    if (tc->jumpBuf != 0) longjmp(*(tc->jumpBuf), 0);\n}\n\nvoid CuFail_Line(CuTest* tc, const char* file, int line, const char* message2, const char* message)\n{\n    CuString string;\n\n    CuStringInit(&string);\n    if (message2 != NULL)\n    {\n        CuStringAppend(&string, message2);\n        CuStringAppend(&string, \": \");\n    }\n    CuStringAppend(&string, message);\n    CuFailInternal(tc, file, line, &string);\n}\n\nvoid CuAssert_Line(CuTest* tc, const char* file, int line, const char* message, int condition)\n{\n    if (condition) return;\n    CuFail_Line(tc, file, line, NULL, message);\n}\n\nvoid CuAssertStrnEquals_LineMsg(CuTest* tc, const char* file, int line, const char* message,\n                                const char* expected, size_t explen,\n                                const char* actual)\n{\n    CuString string;\n    if ((explen == 0) ||\n        (expected == NULL && actual == NULL) ||\n        (expected != NULL && actual != NULL &&\n         strncmp(expected, actual, explen) == 0))\n    {\n        return;\n    }\n\n    CuStringInit(&string);\n    if (message != NULL)\n    {\n        CuStringAppend(&string, message);\n        CuStringAppend(&string, \": \");\n    }\n    CuStringAppend(&string, \"expected <\");\n    CuStringAppend(&string, expected);\n    CuStringAppend(&string, \"> but was <\");\n    CuStringAppend(&string, actual);\n    CuStringAppend(&string, \">\");\n    CuFailInternal(tc, file, line, &string);\n}\n\nvoid CuAssertStrEquals_LineMsg(CuTest* tc, const char* file, int line, const char* message,\n    const char* expected, const char* actual)\n{\n    CuString string;\n    if ((expected == NULL && actual == NULL) ||\n        (expected != NULL && actual != NULL &&\n         strcmp(expected, actual) == 0))\n    {\n        return;\n    }\n\n    CuStringInit(&string);\n    if (message != NULL)\n    {\n        CuStringAppend(&string, message);\n        CuStringAppend(&string, \": \");\n    }\n    CuStringAppend(&string, \"expected <\");\n    CuStringAppend(&string, expected);\n    CuStringAppend(&string, \"> but was <\");\n    CuStringAppend(&string, actual);\n    CuStringAppend(&string, \">\");\n    CuFailInternal(tc, file, line, &string);}\n\nvoid CuAssertIntEquals_LineMsg(CuTest* tc, const char* file, int line, const char* message,\n    int expected, int actual)\n{\n    char buf[STRING_MAX];\n    if (expected == actual) return;\n    sprintf(buf, \"expected <%d> but was <%d>\", expected, actual);\n    CuFail_Line(tc, file, line, message, buf);\n}\n\nvoid CuAssertDblEquals_LineMsg(CuTest* tc, const char* file, int line, const char* message,\n    double expected, double actual, double delta)\n{\n    char buf[STRING_MAX];\n    if (fabs(expected - actual) <= delta) return;\n    sprintf(buf, \"expected <%lf> but was <%lf>\", expected, actual);\n    CuFail_Line(tc, file, line, message, buf);\n}\n\nvoid CuAssertPtrEquals_LineMsg(CuTest* tc, const char* file, int line, const char* message,\n    void* expected, void* actual)\n{\n    char buf[STRING_MAX];\n    if (expected == actual) return;\n    sprintf(buf, \"expected pointer <0x%p> but was <0x%p>\", expected, actual);\n    CuFail_Line(tc, file, line, message, buf);\n}\n\n\n/*-------------------------------------------------------------------------*\n * CuSuite\n *-------------------------------------------------------------------------*/\n\nvoid CuSuiteInit(CuSuite* testSuite)\n{\n    testSuite->count = 0;\n    testSuite->failCount = 0;\n    testSuite->setup = NULL;\n    testSuite->teardown = NULL;\n}\n\nCuSuite* CuSuiteNew(void)\n{\n    CuSuite* testSuite = CU_ALLOC(CuSuite);\n    CuSuiteInit(testSuite);\n    return testSuite;\n}\n\nvoid CuSuiteFree(CuSuite *testSuite)\n{\n    free(testSuite);\n}\n\nvoid CuSuiteFreeDeep(CuSuite *testSuite)\n{\n    int i;\n    for (i = 0 ; i < testSuite->count ; ++i)\n    {\n        CuTest* testCase = testSuite->list[i];\n        CuTestFree(testCase);\n    }\n    free(testSuite);\n}\n\nvoid CuSuiteAdd(CuSuite* testSuite, CuTest *testCase)\n{\n    assert(testSuite->count < MAX_TEST_CASES);\n    testSuite->list[testSuite->count] = testCase;\n    testSuite->count++;\n\n    /* CuSuiteAdd is called twice per test, don't reset the callbacks if\n       already set. */\n    if (!testCase->setup)\n        testCase->setup = testSuite->setup;\n    if (!testCase->teardown)\n        testCase->teardown = testSuite->teardown;\n}\n\nvoid CuSuiteAddSuite(CuSuite* testSuite, CuSuite* testSuite2)\n{\n    int i;\n    for (i = 0 ; i < testSuite2->count ; ++i)\n    {\n        CuTest* testCase = testSuite2->list[i];\n        CuSuiteAdd(testSuite, testCase);\n    }\n}\n\nvoid CuSuiteRun(CuSuite* testSuite)\n{\n    int i;\n    for (i = 0 ; i < testSuite->count ; ++i)\n    {\n        CuTest* testCase = testSuite->list[i];\n        CuTestRun(testCase);\n        if (testCase->failed) { testSuite->failCount += 1; }\n    }\n}\n\nvoid CuSuiteSummary(CuSuite* testSuite, CuString* summary)\n{\n    int i;\n    for (i = 0 ; i < testSuite->count ; ++i)\n    {\n        CuTest* testCase = testSuite->list[i];\n        CuStringAppend(summary, testCase->failed ? \"F\" : \".\");\n    }\n    CuStringAppend(summary, \"\\n\\n\");\n}\n\nvoid CuSuiteDetails(CuSuite* testSuite, CuString* details)\n{\n    int i;\n    int failCount = 0;\n\n    if (testSuite->failCount == 0)\n    {\n        int passCount = testSuite->count - testSuite->failCount;\n        const char* testWord = passCount == 1 ? \"test\" : \"tests\";\n        CuStringAppendFormat(details, \"OK (%d %s)\\n\", passCount, testWord);\n    }\n    else\n    {\n        if (testSuite->failCount == 1)\n            CuStringAppend(details, \"There was 1 failure:\\n\");\n        else\n            CuStringAppendFormat(details, \"There were %d failures:\\n\", testSuite->failCount);\n\n        for (i = 0 ; i < testSuite->count ; ++i)\n        {\n            CuTest* testCase = testSuite->list[i];\n            if (testCase->failed)\n            {\n                failCount++;\n                CuStringAppendFormat(details, \"%d) %s: %s\\n\",\n                    failCount, testCase->name, testCase->message);\n            }\n        }\n        CuStringAppend(details, \"\\n!!!FAILURES!!!\\n\");\n\n        CuStringAppendFormat(details, \"Runs: %d \",   testSuite->count);\n        CuStringAppendFormat(details, \"Passes: %d \", testSuite->count - testSuite->failCount);\n        CuStringAppendFormat(details, \"Fails: %d\\n\",  testSuite->failCount);\n    }\n}\n\nvoid CuSuiteSetSetupTeardownCallbacks(CuSuite* testSuite, TestCallback setup,\n                                      TestCallback teardown)\n{\n    testSuite->setup = setup;\n    testSuite->teardown = teardown;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/CuTest.h",
    "content": "/* \n * Copyright (c) 2003 Asim Jalis\n * \n *  This software is provided 'as-is', without any express or implied\n *  warranty. In no event will the authors be held liable for any\n *  damages arising from the use of this software.\n * \n *  Permission is granted to anyone to use this software for any\n *  purpose, including commercial applications, and to alter it and\n *  redistribute it freely, subject to the following restrictions:\n * \n *  1. The origin of this software must not be misrepresented; you\n *  must not claim that you wrote the original software. If you use\n *  this software in a product, an acknowledgment in the product\n *  documentation would be appreciated but is not required.\n * \n *  2. Altered source versions must be plainly marked as such, and\n *  must not be misrepresented as being the original software.\n * \n *  3. This notice may not be removed or altered from any source\n *  distribution.\n *-------------------------------------------------------------------------*\n *\n * Originally obtained from \"http://cutest.sourceforge.net/\" version 1.4.\n *\n * Modified for serf as follows\n *    4) added CuSuiteSetSetupTeardownCallbacks to set a constructor and\n *       destructor per test suite, run for each test.\n *    3) added CuAssertStrnEquals(), CuAssertStrnEquals_Msg() and\n *       CuAssertStrnEquals_LineMsg()\n *    2) removed const from struct CuTest.name\n *    1) added CuStringFree(), CuTestFree(), CuSuiteFree(), and\n *       CuSuiteFreeDeep()\n *    0) reformatted the whitespace (doh!)\n */\n#ifndef CU_TEST_H\n#define CU_TEST_H\n\n#include <stdlib.h>\n#include <stddef.h>\n#include <setjmp.h>\n#include <stdarg.h>\n#include <apr.h>\n\n#ifndef WIN32\n#include \"test.h\"\n#endif\n\n/* CuString */\n\nchar* CuStrAlloc(int size);\nchar* CuStrCopy(const char* old);\n\n#define CU_ALLOC(TYPE)        ((TYPE*) malloc(sizeof(TYPE)))\n\n#define HUGE_STRING_LEN    8192\n#define STRING_MAX        256\n#define STRING_INC        256\n\ntypedef struct\n{\n    int length;\n    int size;\n    char* buffer;\n} CuString;\n\nvoid CuStringInit(CuString* str);\nCuString* CuStringNew(void);\nvoid CuStringFree(CuString *str);\nvoid CuStringRead(CuString* str, const char* path);\nvoid CuStringAppend(CuString* str, const char* text);\nvoid CuStringAppendChar(CuString* str, char ch);\nvoid CuStringAppendFormat(CuString* str, const char* format, ...);\nvoid CuStringInsert(CuString* str, const char* text, int pos);\nvoid CuStringResize(CuString* str, int newSize);\n\n/* CuTest */\n\ntypedef struct CuTest CuTest;\n\ntypedef void (*TestFunction)(CuTest *);\n\ntypedef void *(*TestCallback)(void *baton);\n\nstruct CuTest\n{\n    char* name;\n    TestFunction function;\n    int failed;\n    int ran;\n    const char* message;\n    jmp_buf *jumpBuf;\n\n    TestCallback setup;\n    TestCallback teardown;\n    void *testBaton;\n};\n\nvoid CuTestInit(CuTest* t, const char* name, TestFunction function);\nCuTest* CuTestNew(const char* name, TestFunction function);\nvoid CuTestFree(CuTest* tc);\nvoid CuTestRun(CuTest* tc);\n\n/* Internal versions of assert functions -- use the public versions */\nvoid CuFail_Line(CuTest* tc, const char* file, int line, const char* message2, const char* message);\nvoid CuAssert_Line(CuTest* tc, const char* file, int line, const char* message, int condition);\nvoid CuAssertStrEquals_LineMsg(CuTest* tc,\n    const char* file, int line, const char* message,\n    const char* expected, const char* actual);\nvoid CuAssertStrnEquals_LineMsg(CuTest* tc,\n    const char* file, int line, const char* message,\n    const char* expected, size_t explen, const char* actual);\nvoid CuAssertIntEquals_LineMsg(CuTest* tc,\n    const char* file, int line, const char* message,\n    int expected, int actual);\nvoid CuAssertDblEquals_LineMsg(CuTest* tc,\n    const char* file, int line, const char* message,\n    double expected, double actual, double delta);\nvoid CuAssertPtrEquals_LineMsg(CuTest* tc,\n    const char* file, int line, const char* message,\n    void* expected, void* actual);\n\n/* public assert functions */\n\n#define CuFail(tc, ms)                        CuFail_Line(  (tc), __FILE__, __LINE__, NULL, (ms))\n#define CuAssert(tc, ms, cond)                CuAssert_Line((tc), __FILE__, __LINE__, (ms), (cond))\n#define CuAssertTrue(tc, cond)                CuAssert_Line((tc), __FILE__, __LINE__, \"assert failed\", (cond))\n\n#define CuAssertStrEquals(tc,ex,ac)           CuAssertStrEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac))\n#define CuAssertStrEquals_Msg(tc,ms,ex,ac)    CuAssertStrEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac))\n#define CuAssertStrnEquals(tc,ex,exlen,ac)        CuAssertStrnEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(exlen),(ac))\n#define CuAssertStrnEquals_Msg(tc,ms,ex,exlen,ac) CuAssertStrnEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(exlen),(ac))\n#define CuAssertIntEquals(tc,ex,ac)           CuAssertIntEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac))\n#define CuAssertIntEquals_Msg(tc,ms,ex,ac)    CuAssertIntEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac))\n#define CuAssertDblEquals(tc,ex,ac,dl)        CuAssertDblEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac),(dl))\n#define CuAssertDblEquals_Msg(tc,ms,ex,ac,dl) CuAssertDblEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac),(dl))\n#define CuAssertPtrEquals(tc,ex,ac)           CuAssertPtrEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac))\n#define CuAssertPtrEquals_Msg(tc,ms,ex,ac)    CuAssertPtrEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac))\n\n#define CuAssertPtrNotNull(tc,p)        CuAssert_Line((tc),__FILE__,__LINE__,\"null pointer unexpected\",(p != NULL))\n#define CuAssertPtrNotNullMsg(tc,msg,p) CuAssert_Line((tc),__FILE__,__LINE__,(msg),(p != NULL))\n\n/* CuSuite */\n\n#define MAX_TEST_CASES    1024\n\n#define SUITE_ADD_TEST(SUITE,TEST)    CuSuiteAdd(SUITE, CuTestNew(#TEST, TEST))\n\ntypedef struct\n{\n    int count;\n    CuTest* list[MAX_TEST_CASES];\n    int failCount;\n\n    TestCallback setup;\n    TestCallback teardown;\n    void *testBaton;\n} CuSuite;\n\n\nvoid CuSuiteInit(CuSuite* testSuite);\nCuSuite* CuSuiteNew(void);\nvoid CuSuiteFree(CuSuite *testSuite);\nvoid CuSuiteFreeDeep(CuSuite *testSuite);\nvoid CuSuiteAdd(CuSuite* testSuite, CuTest *testCase);\nvoid CuSuiteAddSuite(CuSuite* testSuite, CuSuite* testSuite2);\nvoid CuSuiteRun(CuSuite* testSuite);\nvoid CuSuiteSummary(CuSuite* testSuite, CuString* summary);\nvoid CuSuiteDetails(CuSuite* testSuite, CuString* details);\n\nvoid CuSuiteSetSetupTeardownCallbacks(CuSuite* testSuite, TestCallback setup,\n                                      TestCallback teardown);\n\n#endif /* CU_TEST_H */\n"
  },
  {
    "path": "oss_c_sdk_test/ca-certificates.crt",
    "content": "-----BEGIN CERTIFICATE-----\r\nMIIFtTCCA52gAwIBAgIIYY3HhjsBggUwDQYJKoZIhvcNAQEFBQAwRDEWMBQGA1UE\r\nAwwNQUNFRElDT00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00x\r\nCzAJBgNVBAYTAkVT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A=\r\n-----END CERTIFICATE-----\r\n"
  },
  {
    "path": "oss_c_sdk_test/cjson.c",
    "content": "/*\n  Copyright (c) 2009 Dave Gamble\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files (the \"Software\"), to deal\n  in the Software without restriction, including without limitation the rights\n  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n  copies of the Software, and to permit persons to whom the Software is\n  furnished to do so, subject to the following conditions:\n\n  The above copyright notice and this permission notice shall be included in\n  all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n  THE SOFTWARE.\n*/\n\n/* cJSON */\n/* JSON parser in C. */\n\n#include <string.h>\n#include <stdio.h>\n#include <math.h>\n#include <stdlib.h>\n#include <float.h>\n#include <limits.h>\n#include <ctype.h>\n#include \"cjson.h\"\n#ifdef WIN32\n#pragma warning(disable:4996)\n#endif\n\nstatic const char *global_ep;\n\nconst char *cJSON_GetErrorPtr(void) {return global_ep;}\n\nstatic int cJSON_strcasecmp(const char *s1,const char *s2)\n{\n\tif (!s1) return (s1==s2)?0:1;if (!s2) return 1;\n\tfor(; tolower(*s1) == tolower(*s2); ++s1, ++s2)\tif(*s1 == 0)\treturn 0;\n\treturn tolower(*(const unsigned char *)s1) - tolower(*(const unsigned char *)s2);\n}\n\nstatic void *(*cJSON_malloc)(size_t sz) = malloc;\nstatic void (*cJSON_free)(void *ptr) = free;\n\nstatic char* cJSON_strdup(const char* str)\n{\n      size_t len;\n      char* copy;\n\n      len = strlen(str) + 1;\n      if (!(copy = (char*)cJSON_malloc(len))) return 0;\n      memcpy(copy,str,len);\n      return copy;\n}\n\nvoid cJSON_InitHooks(cJSON_Hooks* hooks)\n{\n    if (!hooks) { /* Reset hooks */\n        cJSON_malloc = malloc;\n        cJSON_free = free;\n        return;\n    }\n\n\tcJSON_malloc = (hooks->malloc_fn)?hooks->malloc_fn:malloc;\n\tcJSON_free\t = (hooks->free_fn)?hooks->free_fn:free;\n}\n\n/* Internal constructor. */\nstatic cJSON *cJSON_New_Item(void)\n{\n\tcJSON* node = (cJSON*)cJSON_malloc(sizeof(cJSON));\n\tif (node) memset(node,0,sizeof(cJSON));\n\treturn node;\n}\n\n/* Delete a cJSON structure. */\nvoid cJSON_Delete(cJSON *c)\n{\n\tcJSON *next;\n\twhile (c)\n\t{\n\t\tnext=c->next;\n\t\tif (!(c->type&cJSON_IsReference) && c->child) cJSON_Delete(c->child);\n\t\tif (!(c->type&cJSON_IsReference) && c->valuestring) cJSON_free(c->valuestring);\n\t\tif (!(c->type&cJSON_StringIsConst) && c->string) cJSON_free(c->string);\n\t\tcJSON_free(c);\n\t\tc=next;\n\t}\n}\n\n/* Parse the input text to generate a number, and populate the result into item. */\nstatic const char *parse_number(cJSON *item,const char *num)\n{\n\tdouble n=0,sign=1,scale=0;int subscale=0,signsubscale=1;\n\n\tif (*num=='-') sign=-1,num++;\t/* Has sign? */\n\tif (*num=='0') num++;\t\t\t/* is zero */\n\tif (*num>='1' && *num<='9')\tdo\tn=(n*10.0)+(*num++ -'0');\twhile (*num>='0' && *num<='9');\t/* Number? */\n\tif (*num=='.' && num[1]>='0' && num[1]<='9') {num++;\t\tdo\tn=(n*10.0)+(*num++ -'0'),scale--; while (*num>='0' && *num<='9');}\t/* Fractional part? */\n\tif (*num=='e' || *num=='E')\t\t/* Exponent? */\n\t{\tnum++;if (*num=='+') num++;\telse if (*num=='-') signsubscale=-1,num++;\t\t/* With sign? */\n\t\twhile (*num>='0' && *num<='9') subscale=(subscale*10)+(*num++ - '0');\t/* Number? */\n\t}\n\n\tn=sign*n*pow(10.0,(scale+subscale*signsubscale));\t/* number = +/- number.fraction * 10^+/- exponent */\n\t\n\titem->valuedouble=n;\n\titem->valueint=(int)n;\n\titem->type=cJSON_Number;\n\treturn num;\n}\n\nstatic int pow2gt (int x)\t{\t--x;\tx|=x>>1;\tx|=x>>2;\tx|=x>>4;\tx|=x>>8;\tx|=x>>16;\treturn x+1;\t}\n\ntypedef struct {char *buffer; int length; int offset; } printbuffer;\n\nstatic char* ensure(printbuffer *p,int needed)\n{\n\tchar *newbuffer;int newsize;\n\tif (!p || !p->buffer) return 0;\n\tneeded+=p->offset;\n\tif (needed<=p->length) return p->buffer+p->offset;\n\n\tnewsize=pow2gt(needed);\n\tnewbuffer=(char*)cJSON_malloc(newsize);\n\tif (!newbuffer) {cJSON_free(p->buffer);p->length=0,p->buffer=0;return 0;}\n\tif (newbuffer) memcpy(newbuffer,p->buffer,p->length);\n\tcJSON_free(p->buffer);\n\tp->length=newsize;\n\tp->buffer=newbuffer;\n\treturn newbuffer+p->offset;\n}\n\nstatic int update(printbuffer *p)\n{\n\tchar *str;\n\tif (!p || !p->buffer) return 0;\n\tstr=p->buffer+p->offset;\n\treturn p->offset+strlen(str);\n}\n\n/* Render the number nicely from the given item into a string. */\nstatic char *print_number(cJSON *item,printbuffer *p)\n{\n\tchar *str=0;\n\tdouble d=item->valuedouble;\n\tif (d==0)\n\t{\n\t\tif (p)\tstr=ensure(p,2);\n\t\telse\tstr=(char*)cJSON_malloc(2);\t/* special case for 0. */\n\t\tif (str) strcpy(str,\"0\");\n\t}\n\telse if (fabs(((double)item->valueint)-d)<=DBL_EPSILON && d<=INT_MAX && d>=INT_MIN)\n\t{\n\t\tif (p)\tstr=ensure(p,21);\n\t\telse\tstr=(char*)cJSON_malloc(21);\t/* 2^64+1 can be represented in 21 chars. */\n\t\tif (str)\tsprintf(str,\"%d\",item->valueint);\n\t}\n\telse\n\t{\n\t\tif (p)\tstr=ensure(p,64);\n\t\telse\tstr=(char*)cJSON_malloc(64);\t/* This is a nice tradeoff. */\n\t\tif (str)\n\t\t{\n\t\t\tif (d*0!=0)\t\t\t\t\t\t\t\t\t\t\t\t\tsprintf(str,\"null\");\t/* This checks for NaN and Infinity */\n\t\t\telse if (fabs(floor(d)-d)<=DBL_EPSILON && fabs(d)<1.0e60)\tsprintf(str,\"%.0f\",d);\n\t\t\telse if (fabs(d)<1.0e-6 || fabs(d)>1.0e9)\t\t\t\t\tsprintf(str,\"%e\",d);\n\t\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t\tsprintf(str,\"%f\",d);\n\t\t}\n\t}\n\treturn str;\n}\n\nstatic unsigned parse_hex4(const char *str)\n{\n\tunsigned h=0;\n\tif (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;\n\th=h<<4;str++;\n\tif (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;\n\th=h<<4;str++;\n\tif (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;\n\th=h<<4;str++;\n\tif (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;\n\treturn h;\n}\n\n/* Parse the input text into an unescaped cstring, and populate item. */\nstatic const unsigned char firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };\nstatic const char *parse_string(cJSON *item,const char *str,const char **ep)\n{\n\tconst char *ptr=str+1,*end_ptr=str+1;char *ptr2;char *out;int len=0;unsigned uc,uc2;\n\tif (*str!='\\\"') {*ep=str;return 0;}\t/* not a string! */\n\t\n\twhile (*end_ptr!='\\\"' && *end_ptr && ++len) if (*end_ptr++ == '\\\\') end_ptr++;\t/* Skip escaped quotes. */\n\t\n\tout=(char*)cJSON_malloc(len+1);\t/* This is how long we need for the string, roughly. */\n\tif (!out) return 0;\n\titem->valuestring=out; /* assign here so out will be deleted during cJSON_Delete() later */\n\titem->type=cJSON_String;\n\t\n\tptr=str+1;ptr2=out;\n\twhile (ptr < end_ptr)\n\t{\n\t\tif (*ptr!='\\\\') *ptr2++=*ptr++;\n\t\telse\n\t\t{\n\t\t\tptr++;\n\t\t\tswitch (*ptr)\n\t\t\t{\n\t\t\t\tcase 'b': *ptr2++='\\b';\tbreak;\n\t\t\t\tcase 'f': *ptr2++='\\f';\tbreak;\n\t\t\t\tcase 'n': *ptr2++='\\n';\tbreak;\n\t\t\t\tcase 'r': *ptr2++='\\r';\tbreak;\n\t\t\t\tcase 't': *ptr2++='\\t';\tbreak;\n\t\t\t\tcase 'u':\t /* transcode utf16 to utf8. */\n\t\t\t\t\tuc=parse_hex4(ptr+1);ptr+=4;\t/* get the unicode char. */\n\t\t\t\t\tif (ptr >= end_ptr) {*ep=str;return 0;}\t/* invalid */\n\t\t\t\t\t\n\t\t\t\t\tif ((uc>=0xDC00 && uc<=0xDFFF) || uc==0)    {*ep=str;return 0;}\t/* check for invalid.   */\n\t\t\t\t\t\n\t\t\t\t\tif (uc>=0xD800 && uc<=0xDBFF)\t/* UTF16 surrogate pairs.\t*/\n\t\t\t\t\t{\n\t\t\t\t\t\tif (ptr+6 > end_ptr)    {*ep=str;return 0;}\t/* invalid */\n\t\t\t\t\t\tif (ptr[1]!='\\\\' || ptr[2]!='u')    {*ep=str;return 0;}\t/* missing second-half of surrogate.    */\n\t\t\t\t\t\tuc2=parse_hex4(ptr+3);ptr+=6;\n\t\t\t\t\t\tif (uc2<0xDC00 || uc2>0xDFFF)       {*ep=str;return 0;}\t/* invalid second-half of surrogate.    */\n\t\t\t\t\t\tuc=0x10000 + (((uc&0x3FF)<<10) | (uc2&0x3FF));\n\t\t\t\t\t}\n\n\t\t\t\t\tlen=4;if (uc<0x80) len=1;else if (uc<0x800) len=2;else if (uc<0x10000) len=3; ptr2+=len;\n\t\t\t\t\t\n\t\t\t\t\tswitch (len) {\n\t\t\t\t\t\tcase 4: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6;\n\t\t\t\t\t\tcase 3: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6;\n\t\t\t\t\t\tcase 2: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6;\n\t\t\t\t\t\tcase 1: *--ptr2 =(uc | firstByteMark[len]);\n\t\t\t\t\t}\n\t\t\t\t\tptr2+=len;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:  *ptr2++=*ptr; break;\n\t\t\t}\n\t\t\tptr++;\n\t\t}\n\t}\n\t*ptr2=0;\n\tif (*ptr=='\\\"') ptr++;\n\treturn ptr;\n}\n\n/* Render the cstring provided to an escaped version that can be printed. */\nstatic char *print_string_ptr(const char *str,printbuffer *p)\n{\n\tconst char *ptr;char *ptr2,*out;int len=0,flag=0;unsigned char token;\n\n\tif (!str)\n\t{\n\t\tif (p)\tout=ensure(p,3);\n\t\telse\tout=(char*)cJSON_malloc(3);\n\t\tif (!out) return 0;\n\t\tstrcpy(out,\"\\\"\\\"\");\n\t\treturn out;\n\t}\n\t\n\tfor (ptr=str;*ptr;ptr++) flag|=((*ptr>0 && *ptr<32)||(*ptr=='\\\"')||(*ptr=='\\\\'))?1:0;\n\tif (!flag)\n\t{\n\t\tlen=ptr-str;\n\t\tif (p) out=ensure(p,len+3);\n\t\telse\t\tout=(char*)cJSON_malloc(len+3);\n\t\tif (!out) return 0;\n\t\tptr2=out;*ptr2++='\\\"';\n\t\tstrcpy(ptr2,str);\n\t\tptr2[len]='\\\"';\n\t\tptr2[len+1]=0;\n\t\treturn out;\n\t}\n\t\n\tptr=str;while ((token=*ptr) && ++len) {if (strchr(\"\\\"\\\\\\b\\f\\n\\r\\t\",token)) len++; else if (token<32) len+=5;ptr++;}\n\t\n\tif (p)\tout=ensure(p,len+3);\n\telse\tout=(char*)cJSON_malloc(len+3);\n\tif (!out) return 0;\n\n\tptr2=out;ptr=str;\n\t*ptr2++='\\\"';\n\twhile (*ptr)\n\t{\n\t\tif ((unsigned char)*ptr>31 && *ptr!='\\\"' && *ptr!='\\\\') *ptr2++=*ptr++;\n\t\telse\n\t\t{\n\t\t\t*ptr2++='\\\\';\n\t\t\tswitch (token=*ptr++)\n\t\t\t{\n\t\t\t\tcase '\\\\':\t*ptr2++='\\\\';\tbreak;\n\t\t\t\tcase '\\\"':\t*ptr2++='\\\"';\tbreak;\n\t\t\t\tcase '\\b':\t*ptr2++='b';\tbreak;\n\t\t\t\tcase '\\f':\t*ptr2++='f';\tbreak;\n\t\t\t\tcase '\\n':\t*ptr2++='n';\tbreak;\n\t\t\t\tcase '\\r':\t*ptr2++='r';\tbreak;\n\t\t\t\tcase '\\t':\t*ptr2++='t';\tbreak;\n\t\t\t\tdefault: sprintf(ptr2,\"u%04x\",token);ptr2+=5;\tbreak;\t/* escape and print */\n\t\t\t}\n\t\t}\n\t}\n\t*ptr2++='\\\"';*ptr2++=0;\n\treturn out;\n}\n/* Invote print_string_ptr (which is useful) on an item. */\nstatic char *print_string(cJSON *item,printbuffer *p)\t{return print_string_ptr(item->valuestring,p);}\n\n/* Predeclare these prototypes. */\nstatic const char *parse_value(cJSON *item,const char *value,const char **ep);\nstatic char *print_value(cJSON *item,int depth,int fmt,printbuffer *p);\nstatic const char *parse_array(cJSON *item,const char *value,const char **ep);\nstatic char *print_array(cJSON *item,int depth,int fmt,printbuffer *p);\nstatic const char *parse_object(cJSON *item,const char *value,const char **ep);\nstatic char *print_object(cJSON *item,int depth,int fmt,printbuffer *p);\n\n/* Utility to jump whitespace and cr/lf */\nstatic const char *skip(const char *in) {while (in && *in && (unsigned char)*in<=32) in++; return in;}\n\n/* Parse an object - create a new root, and populate. */\ncJSON *cJSON_ParseWithOpts(const char *value,const char **return_parse_end,int require_null_terminated)\n{\n\tconst char *end=0,**ep=return_parse_end?return_parse_end:&global_ep;\n\tcJSON *c=cJSON_New_Item();\n\t*ep=0;\n\tif (!c) return 0;       /* memory fail */\n\n\tend=parse_value(c,skip(value),ep);\n\tif (!end)\t{cJSON_Delete(c);return 0;}\t/* parse failure. ep is set. */\n\n\t/* if we require null-terminated JSON without appended garbage, skip and then check for a null terminator */\n\tif (require_null_terminated) {end=skip(end);if (*end) {cJSON_Delete(c);*ep=end;return 0;}}\n\tif (return_parse_end) *return_parse_end=end;\n\treturn c;\n}\n/* Default options for cJSON_Parse */\ncJSON *cJSON_Parse(const char *value) {return cJSON_ParseWithOpts(value,0,0);}\n\n/* Render a cJSON item/entity/structure to text. */\nchar *cJSON_Print(cJSON *item)\t\t\t\t{return print_value(item,0,1,0);}\nchar *cJSON_PrintUnformatted(cJSON *item)\t{return print_value(item,0,0,0);}\n\nchar *cJSON_PrintBuffered(cJSON *item,int prebuffer,int fmt)\n{\n\tprintbuffer p;\n\tp.buffer=(char*)cJSON_malloc(prebuffer);\n\tp.length=prebuffer;\n\tp.offset=0;\n\treturn print_value(item,0,fmt,&p);\n}\n\n\n/* Parser core - when encountering text, process appropriately. */\nstatic const char *parse_value(cJSON *item,const char *value,const char **ep)\n{\n\tif (!value)\t\t\t\t\t\treturn 0;\t/* Fail on null. */\n\tif (!strncmp(value,\"null\",4))\t{ item->type=cJSON_NULL;  return value+4; }\n\tif (!strncmp(value,\"false\",5))\t{ item->type=cJSON_False; return value+5; }\n\tif (!strncmp(value,\"true\",4))\t{ item->type=cJSON_True; item->valueint=1;\treturn value+4; }\n\tif (*value=='\\\"')\t\t\t\t{ return parse_string(item,value,ep); }\n\tif (*value=='-' || (*value>='0' && *value<='9'))\t{ return parse_number(item,value); }\n\tif (*value=='[')\t\t\t\t{ return parse_array(item,value,ep); }\n\tif (*value=='{')\t\t\t\t{ return parse_object(item,value,ep); }\n\n\t*ep=value;return 0;\t/* failure. */\n}\n\n/* Render a value to text. */\nstatic char *print_value(cJSON *item,int depth,int fmt,printbuffer *p)\n{\n\tchar *out=0;\n\tif (!item) return 0;\n\tif (p)\n\t{\n\t\tswitch ((item->type)&255)\n\t\t{\n\t\t\tcase cJSON_NULL:\t{out=ensure(p,5);\tif (out) strcpy(out,\"null\");\tbreak;}\n\t\t\tcase cJSON_False:\t{out=ensure(p,6);\tif (out) strcpy(out,\"false\");\tbreak;}\n\t\t\tcase cJSON_True:\t{out=ensure(p,5);\tif (out) strcpy(out,\"true\");\tbreak;}\n\t\t\tcase cJSON_Number:\tout=print_number(item,p);break;\n\t\t\tcase cJSON_String:\tout=print_string(item,p);break;\n\t\t\tcase cJSON_Array:\tout=print_array(item,depth,fmt,p);break;\n\t\t\tcase cJSON_Object:\tout=print_object(item,depth,fmt,p);break;\n\t\t}\n\t}\n\telse\n\t{\n\t\tswitch ((item->type)&255)\n\t\t{\n\t\t\tcase cJSON_NULL:\tout=cJSON_strdup(\"null\");\tbreak;\n\t\t\tcase cJSON_False:\tout=cJSON_strdup(\"false\");break;\n\t\t\tcase cJSON_True:\tout=cJSON_strdup(\"true\"); break;\n\t\t\tcase cJSON_Number:\tout=print_number(item,0);break;\n\t\t\tcase cJSON_String:\tout=print_string(item,0);break;\n\t\t\tcase cJSON_Array:\tout=print_array(item,depth,fmt,0);break;\n\t\t\tcase cJSON_Object:\tout=print_object(item,depth,fmt,0);break;\n\t\t}\n\t}\n\treturn out;\n}\n\n/* Build an array from input text. */\nstatic const char *parse_array(cJSON *item,const char *value,const char **ep)\n{\n\tcJSON *child;\n\tif (*value!='[')\t{*ep=value;return 0;}\t/* not an array! */\n\n\titem->type=cJSON_Array;\n\tvalue=skip(value+1);\n\tif (*value==']') return value+1;\t/* empty array. */\n\n\titem->child=child=cJSON_New_Item();\n\tif (!item->child) return 0;\t\t /* memory fail */\n\tvalue=skip(parse_value(child,skip(value),ep));\t/* skip any spacing, get the value. */\n\tif (!value) return 0;\n\n\twhile (*value==',')\n\t{\n\t\tcJSON *new_item;\n\t\tif (!(new_item=cJSON_New_Item())) return 0; \t/* memory fail */\n\t\tchild->next=new_item;new_item->prev=child;child=new_item;\n\t\tvalue=skip(parse_value(child,skip(value+1),ep));\n\t\tif (!value) return 0;\t/* memory fail */\n\t}\n\n\tif (*value==']') return value+1;\t/* end of array */\n\t*ep=value;return 0;\t/* malformed. */\n}\n\n/* Render an array to text */\nstatic char *print_array(cJSON *item,int depth,int fmt,printbuffer *p)\n{\n\tchar **entries;\n\tchar *out=0,*ptr,*ret;int len=5;\n\tcJSON *child=item->child;\n\tint numentries=0,i=0,fail=0;\n\tsize_t tmplen=0;\n\t\n\t/* How many entries in the array? */\n\twhile (child) numentries++,child=child->next;\n\t/* Explicitly handle numentries==0 */\n\tif (!numentries)\n\t{\n\t\tif (p)\tout=ensure(p,3);\n\t\telse\tout=(char*)cJSON_malloc(3);\n\t\tif (out) strcpy(out,\"[]\");\n\t\treturn out;\n\t}\n\n\tif (p)\n\t{\n\t\t/* Compose the output array. */\n\t\ti=p->offset;\n\t\tptr=ensure(p,1);if (!ptr) return 0;\t*ptr='[';\tp->offset++;\n\t\tchild=item->child;\n\t\twhile (child && !fail)\n\t\t{\n\t\t\tprint_value(child,depth+1,fmt,p);\n\t\t\tp->offset=update(p);\n\t\t\tif (child->next) {len=fmt?2:1;ptr=ensure(p,len+1);if (!ptr) return 0;*ptr++=',';if(fmt)*ptr++=' ';*ptr=0;p->offset+=len;}\n\t\t\tchild=child->next;\n\t\t}\n\t\tptr=ensure(p,2);if (!ptr) return 0;\t*ptr++=']';*ptr=0;\n\t\tout=(p->buffer)+i;\n\t}\n\telse\n\t{\n\t\t/* Allocate an array to hold the values for each */\n\t\tentries=(char**)cJSON_malloc(numentries*sizeof(char*));\n\t\tif (!entries) return 0;\n\t\tmemset(entries,0,numentries*sizeof(char*));\n\t\t/* Retrieve all the results: */\n\t\tchild=item->child;\n\t\twhile (child && !fail)\n\t\t{\n\t\t\tret=print_value(child,depth+1,fmt,0);\n\t\t\tentries[i++]=ret;\n\t\t\tif (ret) len+=strlen(ret)+2+(fmt?1:0); else fail=1;\n\t\t\tchild=child->next;\n\t\t}\n\t\t\n\t\t/* If we didn't fail, try to malloc the output string */\n\t\tif (!fail)\tout=(char*)cJSON_malloc(len);\n\t\t/* If that fails, we fail. */\n\t\tif (!out) fail=1;\n\n\t\t/* Handle failure. */\n\t\tif (fail)\n\t\t{\n\t\t\tfor (i=0;i<numentries;i++) if (entries[i]) cJSON_free(entries[i]);\n\t\t\tcJSON_free(entries);\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t/* Compose the output array. */\n\t\t*out='[';\n\t\tptr=out+1;*ptr=0;\n\t\tfor (i=0;i<numentries;i++)\n\t\t{\n\t\t\ttmplen=strlen(entries[i]);memcpy(ptr,entries[i],tmplen);ptr+=tmplen;\n\t\t\tif (i!=numentries-1) {*ptr++=',';if(fmt)*ptr++=' ';*ptr=0;}\n\t\t\tcJSON_free(entries[i]);\n\t\t}\n\t\tcJSON_free(entries);\n\t\t*ptr++=']';*ptr++=0;\n\t}\n\treturn out;\t\n}\n\n/* Build an object from the text. */\nstatic const char *parse_object(cJSON *item,const char *value,const char **ep)\n{\n\tcJSON *child;\n\tif (*value!='{')\t{*ep=value;return 0;}\t/* not an object! */\n\t\n\titem->type=cJSON_Object;\n\tvalue=skip(value+1);\n\tif (*value=='}') return value+1;\t/* empty array. */\n\t\n\titem->child=child=cJSON_New_Item();\n\tif (!item->child) return 0;\n\tvalue=skip(parse_string(child,skip(value),ep));\n\tif (!value) return 0;\n\tchild->string=child->valuestring;child->valuestring=0;\n\tif (*value!=':') {*ep=value;return 0;}\t/* fail! */\n\tvalue=skip(parse_value(child,skip(value+1),ep));\t/* skip any spacing, get the value. */\n\tif (!value) return 0;\n\t\n\twhile (*value==',')\n\t{\n\t\tcJSON *new_item;\n\t\tif (!(new_item=cJSON_New_Item()))\treturn 0; /* memory fail */\n\t\tchild->next=new_item;new_item->prev=child;child=new_item;\n\t\tvalue=skip(parse_string(child,skip(value+1),ep));\n\t\tif (!value) return 0;\n\t\tchild->string=child->valuestring;child->valuestring=0;\n\t\tif (*value!=':') {*ep=value;return 0;}\t/* fail! */\n\t\tvalue=skip(parse_value(child,skip(value+1),ep));\t/* skip any spacing, get the value. */\n\t\tif (!value) return 0;\n\t}\n\t\n\tif (*value=='}') return value+1;\t/* end of array */\n\t*ep=value;return 0;\t/* malformed. */\n}\n\n/* Render an object to text. */\nstatic char *print_object(cJSON *item,int depth,int fmt,printbuffer *p)\n{\n\tchar **entries=0,**names=0;\n\tchar *out=0,*ptr,*ret,*str;int len=7,i=0,j;\n\tcJSON *child=item->child;\n\tint numentries=0,fail=0;\n\tsize_t tmplen=0;\n\t/* Count the number of entries. */\n\twhile (child) numentries++,child=child->next;\n\t/* Explicitly handle empty object case */\n\tif (!numentries)\n\t{\n\t\tif (p) out=ensure(p,fmt?depth+4:3);\n\t\telse\tout=(char*)cJSON_malloc(fmt?depth+4:3);\n\t\tif (!out)\treturn 0;\n\t\tptr=out;*ptr++='{';\n\t\tif (fmt) {*ptr++='\\n';for (i=0;i<depth;i++) *ptr++='\\t';}\n\t\t*ptr++='}';*ptr++=0;\n\t\treturn out;\n\t}\n\tif (p)\n\t{\n\t\t/* Compose the output: */\n\t\ti=p->offset;\n\t\tlen=fmt?2:1;\tptr=ensure(p,len+1);\tif (!ptr) return 0;\n\t\t*ptr++='{';\tif (fmt) *ptr++='\\n';\t*ptr=0;\tp->offset+=len;\n\t\tchild=item->child;depth++;\n\t\twhile (child)\n\t\t{\n\t\t\tif (fmt)\n\t\t\t{\n\t\t\t\tptr=ensure(p,depth);\tif (!ptr) return 0;\n\t\t\t\tfor (j=0;j<depth;j++) *ptr++='\\t';\n\t\t\t\tp->offset+=depth;\n\t\t\t}\n\t\t\tprint_string_ptr(child->string,p);\n\t\t\tp->offset=update(p);\n\t\t\t\n\t\t\tlen=fmt?2:1;\n\t\t\tptr=ensure(p,len);\tif (!ptr) return 0;\n\t\t\t*ptr++=':';if (fmt) *ptr++='\\t';\n\t\t\tp->offset+=len;\n\t\t\t\n\t\t\tprint_value(child,depth,fmt,p);\n\t\t\tp->offset=update(p);\n\n\t\t\tlen=(fmt?1:0)+(child->next?1:0);\n\t\t\tptr=ensure(p,len+1); if (!ptr) return 0;\n\t\t\tif (child->next) *ptr++=',';\n\t\t\tif (fmt) *ptr++='\\n';*ptr=0;\n\t\t\tp->offset+=len;\n\t\t\tchild=child->next;\n\t\t}\n\t\tptr=ensure(p,fmt?(depth+1):2);\t if (!ptr) return 0;\n\t\tif (fmt)\tfor (i=0;i<depth-1;i++) *ptr++='\\t';\n\t\t*ptr++='}';*ptr=0;\n\t\tout=(p->buffer)+i;\n\t}\n\telse\n\t{\n\t\t/* Allocate space for the names and the objects */\n\t\tentries=(char**)cJSON_malloc(numentries*sizeof(char*));\n\t\tif (!entries) return 0;\n\t\tnames=(char**)cJSON_malloc(numentries*sizeof(char*));\n\t\tif (!names) {cJSON_free(entries);return 0;}\n\t\tmemset(entries,0,sizeof(char*)*numentries);\n\t\tmemset(names,0,sizeof(char*)*numentries);\n\n\t\t/* Collect all the results into our arrays: */\n\t\tchild=item->child;depth++;if (fmt) len+=depth;\n\t\twhile (child && !fail)\n\t\t{\n\t\t\tnames[i]=str=print_string_ptr(child->string,0);\n\t\t\tentries[i++]=ret=print_value(child,depth,fmt,0);\n\t\t\tif (str && ret) len+=strlen(ret)+strlen(str)+2+(fmt?2+depth:0); else fail=1;\n\t\t\tchild=child->next;\n\t\t}\n\t\t\n\t\t/* Try to allocate the output string */\n\t\tif (!fail)\tout=(char*)cJSON_malloc(len);\n\t\tif (!out) fail=1;\n\n\t\t/* Handle failure */\n\t\tif (fail)\n\t\t{\n\t\t\tfor (i=0;i<numentries;i++) {if (names[i]) cJSON_free(names[i]);if (entries[i]) cJSON_free(entries[i]);}\n\t\t\tcJSON_free(names);cJSON_free(entries);\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t/* Compose the output: */\n\t\t*out='{';ptr=out+1;if (fmt)*ptr++='\\n';*ptr=0;\n\t\tfor (i=0;i<numentries;i++)\n\t\t{\n\t\t\tif (fmt) for (j=0;j<depth;j++) *ptr++='\\t';\n\t\t\ttmplen=strlen(names[i]);memcpy(ptr,names[i],tmplen);ptr+=tmplen;\n\t\t\t*ptr++=':';if (fmt) *ptr++='\\t';\n\t\t\tstrcpy(ptr,entries[i]);ptr+=strlen(entries[i]);\n\t\t\tif (i!=numentries-1) *ptr++=',';\n\t\t\tif (fmt) *ptr++='\\n';*ptr=0;\n\t\t\tcJSON_free(names[i]);cJSON_free(entries[i]);\n\t\t}\n\t\t\n\t\tcJSON_free(names);cJSON_free(entries);\n\t\tif (fmt) for (i=0;i<depth-1;i++) *ptr++='\\t';\n\t\t*ptr++='}';*ptr++=0;\n\t}\n\treturn out;\t\n}\n\n/* Get Array size/item / object item. */\nint    cJSON_GetArraySize(cJSON *array)\t\t\t\t\t\t\t{cJSON *c=array->child;int i=0;while(c)i++,c=c->next;return i;}\ncJSON *cJSON_GetArrayItem(cJSON *array,int item)\t\t\t\t{cJSON *c=array?array->child:0;while (c && item>0) item--,c=c->next; return c;}\ncJSON *cJSON_GetObjectItem(cJSON *object,const char *string)\t{cJSON *c=object?object->child:0;while (c && cJSON_strcasecmp(c->string,string)) c=c->next; return c;}\nint cJSON_HasObjectItem(cJSON *object,const char *string)\t\t{return cJSON_GetObjectItem(object,string)?1:0;}\n\n/* Utility for array list handling. */\nstatic void suffix_object(cJSON *prev,cJSON *item) {prev->next=item;item->prev=prev;}\n/* Utility for handling references. */\nstatic cJSON *create_reference(cJSON *item) {cJSON *ref=cJSON_New_Item();if (!ref) return 0;memcpy(ref,item,sizeof(cJSON));ref->string=0;ref->type|=cJSON_IsReference;ref->next=ref->prev=0;return ref;}\n\n/* Add item to array/object. */\nvoid   cJSON_AddItemToArray(cJSON *array, cJSON *item)\t\t\t\t\t\t{cJSON *c=array->child;if (!item) return; if (!c) {array->child=item;} else {while (c && c->next) c=c->next; suffix_object(c,item);}}\nvoid   cJSON_AddItemToObject(cJSON *object,const char *string,cJSON *item)\t{if (!item) return; if (item->string) cJSON_free(item->string);item->string=cJSON_strdup(string);cJSON_AddItemToArray(object,item);}\nvoid   cJSON_AddItemToObjectCS(cJSON *object,const char *string,cJSON *item)\t{if (!item) return; if (!(item->type&cJSON_StringIsConst) && item->string) cJSON_free(item->string);item->string=(char*)string;item->type|=cJSON_StringIsConst;cJSON_AddItemToArray(object,item);}\nvoid\tcJSON_AddItemReferenceToArray(cJSON *array, cJSON *item)\t\t\t\t\t\t{cJSON_AddItemToArray(array,create_reference(item));}\nvoid\tcJSON_AddItemReferenceToObject(cJSON *object,const char *string,cJSON *item)\t{cJSON_AddItemToObject(object,string,create_reference(item));}\n\ncJSON *cJSON_DetachItemFromArray(cJSON *array,int which)\t\t\t{cJSON *c=array->child;while (c && which>0) c=c->next,which--;if (!c) return 0;\n\tif (c->prev) c->prev->next=c->next;if (c->next) c->next->prev=c->prev;if (c==array->child) array->child=c->next;c->prev=c->next=0;return c;}\nvoid   cJSON_DeleteItemFromArray(cJSON *array,int which)\t\t\t{cJSON_Delete(cJSON_DetachItemFromArray(array,which));}\ncJSON *cJSON_DetachItemFromObject(cJSON *object,const char *string) {int i=0;cJSON *c=object->child;while (c && cJSON_strcasecmp(c->string,string)) i++,c=c->next;if (c) return cJSON_DetachItemFromArray(object,i);return 0;}\nvoid   cJSON_DeleteItemFromObject(cJSON *object,const char *string) {cJSON_Delete(cJSON_DetachItemFromObject(object,string));}\n\n/* Replace array/object items with new ones. */\nvoid   cJSON_InsertItemInArray(cJSON *array,int which,cJSON *newitem)\t\t{cJSON *c=array->child;while (c && which>0) c=c->next,which--;if (!c) {cJSON_AddItemToArray(array,newitem);return;}\n\tnewitem->next=c;newitem->prev=c->prev;c->prev=newitem;if (c==array->child) array->child=newitem; else newitem->prev->next=newitem;}\nvoid   cJSON_ReplaceItemInArray(cJSON *array,int which,cJSON *newitem)\t\t{cJSON *c=array->child;while (c && which>0) c=c->next,which--;if (!c) return;\n\tnewitem->next=c->next;newitem->prev=c->prev;if (newitem->next) newitem->next->prev=newitem;\n\tif (c==array->child) array->child=newitem; else newitem->prev->next=newitem;c->next=c->prev=0;cJSON_Delete(c);}\nvoid   cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem){int i=0;cJSON *c=object->child;while(c && cJSON_strcasecmp(c->string,string))i++,c=c->next;if(c){newitem->string=cJSON_strdup(string);cJSON_ReplaceItemInArray(object,i,newitem);}}\n\n/* Create basic types: */\ncJSON *cJSON_CreateNull(void)\t\t\t\t\t{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_NULL;return item;}\ncJSON *cJSON_CreateTrue(void)\t\t\t\t\t{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_True;return item;}\ncJSON *cJSON_CreateFalse(void)\t\t\t\t\t{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_False;return item;}\ncJSON *cJSON_CreateBool(int b)\t\t\t\t\t{cJSON *item=cJSON_New_Item();if(item)item->type=b?cJSON_True:cJSON_False;return item;}\ncJSON *cJSON_CreateNumber(double num)\t\t\t{cJSON *item=cJSON_New_Item();if(item){item->type=cJSON_Number;item->valuedouble=num;item->valueint=(int)num;}return item;}\ncJSON *cJSON_CreateString(const char *string)\t{cJSON *item=cJSON_New_Item();if(item){item->type=cJSON_String;item->valuestring=cJSON_strdup(string);if(!item->valuestring){cJSON_Delete(item);return 0;}}return item;}\ncJSON *cJSON_CreateArray(void)\t\t\t\t\t{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Array;return item;}\ncJSON *cJSON_CreateObject(void)\t\t\t\t\t{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Object;return item;}\n\n/* Create Arrays: */\ncJSON *cJSON_CreateIntArray(const int *numbers,int count)\t\t{int i;cJSON *n=0,*p=0,*a=cJSON_CreateArray();for(i=0;a && i<count;i++){n=cJSON_CreateNumber(numbers[i]);if(!n){cJSON_Delete(a);return 0;}if(!i)a->child=n;else suffix_object(p,n);p=n;}return a;}\ncJSON *cJSON_CreateFloatArray(const float *numbers,int count)\t{int i;cJSON *n=0,*p=0,*a=cJSON_CreateArray();for(i=0;a && i<count;i++){n=cJSON_CreateNumber(numbers[i]);if(!n){cJSON_Delete(a);return 0;}if(!i)a->child=n;else suffix_object(p,n);p=n;}return a;}\ncJSON *cJSON_CreateDoubleArray(const double *numbers,int count)\t{int i;cJSON *n=0,*p=0,*a=cJSON_CreateArray();for(i=0;a && i<count;i++){n=cJSON_CreateNumber(numbers[i]);if(!n){cJSON_Delete(a);return 0;}if(!i)a->child=n;else suffix_object(p,n);p=n;}return a;}\ncJSON *cJSON_CreateStringArray(const char **strings,int count)\t{int i;cJSON *n=0,*p=0,*a=cJSON_CreateArray();for(i=0;a && i<count;i++){n=cJSON_CreateString(strings[i]);if(!n){cJSON_Delete(a);return 0;}if(!i)a->child=n;else suffix_object(p,n);p=n;}return a;}\n\n/* Duplication */\ncJSON *cJSON_Duplicate(cJSON *item,int recurse)\n{\n\tcJSON *newitem,*cptr,*nptr=0,*newchild;\n\t/* Bail on bad ptr */\n\tif (!item) return 0;\n\t/* Create new item */\n\tnewitem=cJSON_New_Item();\n\tif (!newitem) return 0;\n\t/* Copy over all vars */\n\tnewitem->type=item->type&(~cJSON_IsReference),newitem->valueint=item->valueint,newitem->valuedouble=item->valuedouble;\n\tif (item->valuestring)\t{newitem->valuestring=cJSON_strdup(item->valuestring);\tif (!newitem->valuestring)\t{cJSON_Delete(newitem);return 0;}}\n\tif (item->string)\t\t{newitem->string=cJSON_strdup(item->string);\t\t\tif (!newitem->string)\t\t{cJSON_Delete(newitem);return 0;}}\n\t/* If non-recursive, then we're done! */\n\tif (!recurse) return newitem;\n\t/* Walk the ->next chain for the child. */\n\tcptr=item->child;\n\twhile (cptr)\n\t{\n\t\tnewchild=cJSON_Duplicate(cptr,1);\t\t/* Duplicate (with recurse) each item in the ->next chain */\n\t\tif (!newchild) {cJSON_Delete(newitem);return 0;}\n\t\tif (nptr)\t{nptr->next=newchild,newchild->prev=nptr;nptr=newchild;}\t/* If newitem->child already set, then crosswire ->prev and ->next and move on */\n\t\telse\t\t{newitem->child=newchild;nptr=newchild;}\t\t\t\t\t/* Set newitem->child and move to it */\n\t\tcptr=cptr->next;\n\t}\n\treturn newitem;\n}\n\nvoid cJSON_Minify(char *json)\n{\n\tchar *into=json;\n\twhile (*json)\n\t{\n\t\tif (*json==' ') json++;\n\t\telse if (*json=='\\t') json++;\t/* Whitespace characters. */\n\t\telse if (*json=='\\r') json++;\n\t\telse if (*json=='\\n') json++;\n\t\telse if (*json=='/' && json[1]=='/')  while (*json && *json!='\\n') json++;\t/* double-slash comments, to end of line. */\n\t\telse if (*json=='/' && json[1]=='*') {while (*json && !(*json=='*' && json[1]=='/')) json++;json+=2;}\t/* multiline comments. */\n\t\telse if (*json=='\\\"'){*into++=*json++;while (*json && *json!='\\\"'){if (*json=='\\\\') *into++=*json++;*into++=*json++;}*into++=*json++;} /* string literals, which are \\\" sensitive. */\n\t\telse *into++=*json++;\t\t\t/* All other characters. */\n\t}\n\t*into=0;\t/* and null-terminate. */\n}\n"
  },
  {
    "path": "oss_c_sdk_test/cjson.h",
    "content": "/*\n  Copyright (c) 2009 Dave Gamble\n \n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files (the \"Software\"), to deal\n  in the Software without restriction, including without limitation the rights\n  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n  copies of the Software, and to permit persons to whom the Software is\n  furnished to do so, subject to the following conditions:\n \n  The above copyright notice and this permission notice shall be included in\n  all copies or substantial portions of the Software.\n \n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n  THE SOFTWARE.\n*/\n\n#ifndef cJSON__h\n#define cJSON__h\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\n/* cJSON Types: */\n#define cJSON_False  (1 << 0)\n#define cJSON_True   (1 << 1)\n#define cJSON_NULL   (1 << 2)\n#define cJSON_Number (1 << 3)\n#define cJSON_String (1 << 4)\n#define cJSON_Array  (1 << 5)\n#define cJSON_Object (1 << 6)\n\t\n#define cJSON_IsReference 256\n#define cJSON_StringIsConst 512\n\n/* The cJSON structure: */\ntypedef struct cJSON {\n\tstruct cJSON *next,*prev;\t/* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */\n\tstruct cJSON *child;\t\t/* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */\n\n\tint type;\t\t\t\t\t/* The type of the item, as above. */\n\n\tchar *valuestring;\t\t\t/* The item's string, if type==cJSON_String */\n\tint valueint;\t\t\t\t/* The item's number, if type==cJSON_Number */\n\tdouble valuedouble;\t\t\t/* The item's number, if type==cJSON_Number */\n\n\tchar *string;\t\t\t\t/* The item's name string, if this item is the child of, or is in the list of subitems of an object. */\n} cJSON;\n\ntypedef struct cJSON_Hooks {\n      void *(*malloc_fn)(size_t sz);\n      void (*free_fn)(void *ptr);\n} cJSON_Hooks;\n\n/* Supply malloc, realloc and free functions to cJSON */\nextern void cJSON_InitHooks(cJSON_Hooks* hooks);\n\n\n/* Supply a block of JSON, and this returns a cJSON object you can interrogate. Call cJSON_Delete when finished. */\nextern cJSON *cJSON_Parse(const char *value);\n/* Render a cJSON entity to text for transfer/storage. Free the char* when finished. */\nextern char  *cJSON_Print(cJSON *item);\n/* Render a cJSON entity to text for transfer/storage without any formatting. Free the char* when finished. */\nextern char  *cJSON_PrintUnformatted(cJSON *item);\n/* Render a cJSON entity to text using a buffered strategy. prebuffer is a guess at the final size. guessing well reduces reallocation. fmt=0 gives unformatted, =1 gives formatted */\nextern char *cJSON_PrintBuffered(cJSON *item,int prebuffer,int fmt);\n/* Delete a cJSON entity and all subentities. */\nextern void   cJSON_Delete(cJSON *c);\n\n/* Returns the number of items in an array (or object). */\nextern int\t  cJSON_GetArraySize(cJSON *array);\n/* Retrieve item number \"item\" from array \"array\". Returns NULL if unsuccessful. */\nextern cJSON *cJSON_GetArrayItem(cJSON *array,int item);\n/* Get item \"string\" from object. Case insensitive. */\nextern cJSON *cJSON_GetObjectItem(cJSON *object,const char *string);\nextern int cJSON_HasObjectItem(cJSON *object,const char *string);\n/* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds. */\nextern const char *cJSON_GetErrorPtr(void);\n\t\n/* These calls create a cJSON item of the appropriate type. */\nextern cJSON *cJSON_CreateNull(void);\nextern cJSON *cJSON_CreateTrue(void);\nextern cJSON *cJSON_CreateFalse(void);\nextern cJSON *cJSON_CreateBool(int b);\nextern cJSON *cJSON_CreateNumber(double num);\nextern cJSON *cJSON_CreateString(const char *string);\nextern cJSON *cJSON_CreateArray(void);\nextern cJSON *cJSON_CreateObject(void);\n\n/* These utilities create an Array of count items. */\nextern cJSON *cJSON_CreateIntArray(const int *numbers,int count);\nextern cJSON *cJSON_CreateFloatArray(const float *numbers,int count);\nextern cJSON *cJSON_CreateDoubleArray(const double *numbers,int count);\nextern cJSON *cJSON_CreateStringArray(const char **strings,int count);\n\n/* Append item to the specified array/object. */\nextern void cJSON_AddItemToArray(cJSON *array, cJSON *item);\nextern void\tcJSON_AddItemToObject(cJSON *object,const char *string,cJSON *item);\nextern void\tcJSON_AddItemToObjectCS(cJSON *object,const char *string,cJSON *item);\t/* Use this when string is definitely const (i.e. a literal, or as good as), and will definitely survive the cJSON object */\n/* Append reference to item to the specified array/object. Use this when you want to add an existing cJSON to a new cJSON, but don't want to corrupt your existing cJSON. */\nextern void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item);\nextern void\tcJSON_AddItemReferenceToObject(cJSON *object,const char *string,cJSON *item);\n\n/* Remove/Detatch items from Arrays/Objects. */\nextern cJSON *cJSON_DetachItemFromArray(cJSON *array,int which);\nextern void   cJSON_DeleteItemFromArray(cJSON *array,int which);\nextern cJSON *cJSON_DetachItemFromObject(cJSON *object,const char *string);\nextern void   cJSON_DeleteItemFromObject(cJSON *object,const char *string);\n\t\n/* Update array items. */\nextern void cJSON_InsertItemInArray(cJSON *array,int which,cJSON *newitem);\t/* Shifts pre-existing items to the right. */\nextern void cJSON_ReplaceItemInArray(cJSON *array,int which,cJSON *newitem);\nextern void cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem);\n\n/* Duplicate a cJSON item */\nextern cJSON *cJSON_Duplicate(cJSON *item,int recurse);\n/* Duplicate will create a new, identical cJSON item to the one you pass, in new memory that will\nneed to be released. With recurse!=0, it will duplicate any children connected to the item.\nThe item->next and ->prev pointers are always zero on return from Duplicate. */\n\n/* ParseWithOpts allows you to require (and check) that the JSON is null terminated, and to retrieve the pointer to the final byte parsed. */\n/* If you supply a ptr in return_parse_end and parsing fails, then return_parse_end will contain a pointer to the error. If not, then cJSON_GetErrorPtr() does the job. */\nextern cJSON *cJSON_ParseWithOpts(const char *value,const char **return_parse_end,int require_null_terminated);\n\nextern void cJSON_Minify(char *json);\n\n/* Macros for creating things quickly. */\n#define cJSON_AddNullToObject(object,name)\t\tcJSON_AddItemToObject(object, name, cJSON_CreateNull())\n#define cJSON_AddTrueToObject(object,name)\t\tcJSON_AddItemToObject(object, name, cJSON_CreateTrue())\n#define cJSON_AddFalseToObject(object,name)\t\tcJSON_AddItemToObject(object, name, cJSON_CreateFalse())\n#define cJSON_AddBoolToObject(object,name,b)\tcJSON_AddItemToObject(object, name, cJSON_CreateBool(b))\n#define cJSON_AddNumberToObject(object,name,n)\tcJSON_AddItemToObject(object, name, cJSON_CreateNumber(n))\n#define cJSON_AddStringToObject(object,name,s)\tcJSON_AddItemToObject(object, name, cJSON_CreateString(s))\n\n/* When assigning an integer value, it needs to be propagated to valuedouble too. */\n#define cJSON_SetIntValue(object,val)\t\t\t((object)?(object)->valueint=(object)->valuedouble=(val):(val))\n#define cJSON_SetNumberValue(object,val)\t\t((object)?(object)->valueint=(object)->valuedouble=(val):(val))\n\n/* Macro for iterating over an array */\n#define cJSON_ArrayForEach(pos, head)\t\t\tfor(pos = (head)->child; pos != NULL; pos = pos->next)\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk_test/cjson_utils.c",
    "content": "#include <ctype.h>\n#include <string.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include \"cjson_utils.h\"\n#ifdef WIN32\n#pragma warning(disable:4996)\n#endif\n\nstatic int cJSONUtils_strcasecmp(const char *s1,const char *s2)\n{\n\tif (!s1) return (s1==s2)?0:1;if (!s2) return 1;\n\tfor(; tolower(*s1) == tolower(*s2); ++s1, ++s2)\tif(*s1 == 0)\treturn 0;\n\treturn tolower(*(const unsigned char *)s1) - tolower(*(const unsigned char *)s2);\n}\n\n/* JSON Pointer implementation: */\nstatic int cJSONUtils_Pstrcasecmp(const char *a,const char *e)\n{\n\tif (!a || !e) return (a==e)?0:1;\n\tfor (;*a && *e && *e!='/';a++,e++) {\n\t\tif (*e=='~') {if (!(e[1]=='0' && *a=='~') && !(e[1]=='1' && *a=='/')) return 1;  else e++;}\n\t\telse if (tolower(*a)!=tolower(*e)) return 1;\n\t}\n\tif ((*e!=0 && *e!='/') != (*a!=0)) return 1;\n\treturn 0;\n}\n\nstatic int cJSONUtils_PointerEncodedstrlen(const char *s)\t{int l=0;for (;*s;s++,l++) if (*s=='~' || *s=='/') l++;return l;}\n\nstatic void cJSONUtils_PointerEncodedstrcpy(char *d,const char *s)\n{\n\tfor (;*s;s++)\n\t{\n\t\tif (*s=='/') {*d++='~';*d++='1';}\n\t\telse if (*s=='~') {*d++='~';*d++='0';}\n\t\telse *d++=*s;\n\t}\n\t*d=0;\n}\n\nchar *cJSONUtils_FindPointerFromObjectTo(cJSON *object,cJSON *target)\n{\n\tint type=object->type,c=0;cJSON *obj=0;\n\n\tif (object==target) return strdup(\"\");\n\n\tfor (obj=object->child;obj;obj=obj->next,c++)\n\t{\n\t\tchar *found=cJSONUtils_FindPointerFromObjectTo(obj,target);\n\t\tif (found)\n\t\t{\n\t\t\tif (type==cJSON_Array)\n\t\t\t{\n\t\t\t\tchar *ret=(char*)malloc(strlen(found)+23);\n\t\t\t\tsprintf(ret,\"/%d%s\",c,found);\n\t\t\t\tfree(found);\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t\telse if (type==cJSON_Object)\n\t\t\t{\n\t\t\t\tchar *ret=(char*)malloc(strlen(found)+cJSONUtils_PointerEncodedstrlen(obj->string)+2);\n\t\t\t\t*ret='/';cJSONUtils_PointerEncodedstrcpy(ret+1,obj->string);\n\t\t\t\tstrcat(ret,found);\n\t\t\t\tfree(found);\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t\tfree(found);\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 0;\n}\n\ncJSON *cJSONUtils_GetPointer(cJSON *object,const char *pointer)\n{\n\twhile (*pointer++=='/' && object)\n\t{\n\t\tif (object->type==cJSON_Array)\n\t\t{\n\t\t\tint which=0; while (*pointer>='0' && *pointer<='9') which=(10*which) + *pointer++ - '0';\n\t\t\tif (*pointer && *pointer!='/') return 0;\n\t\t\tobject=cJSON_GetArrayItem(object,which);\n\t\t}\n\t\telse if (object->type==cJSON_Object)\n\t\t{\n\t\t\tobject=object->child;\twhile (object && cJSONUtils_Pstrcasecmp(object->string,pointer)) object=object->next;\t/* GetObjectItem. */\n\t\t\twhile (*pointer && *pointer!='/') pointer++;\n\t\t}\n\t\telse return 0;\n\t}\n\treturn object;\n}\n\n/* JSON Patch implementation. */\nstatic void cJSONUtils_InplaceDecodePointerString(char *string)\n{\n\tchar *s2=string;\n\tfor (;*string;s2++,string++) *s2=(*string!='~')?(*string):((*(++string)=='0')?'~':'/');\n\t*s2=0;\n}\n\nstatic cJSON *cJSONUtils_PatchDetach(cJSON *object,const char *path)\n{\n\tchar *parentptr=0,*childptr=0;cJSON *parent=0,*ret=0;\n\n\tparentptr=strdup(path);\tchildptr=strrchr(parentptr,'/');\tif (childptr) *childptr++=0;\n\tparent=cJSONUtils_GetPointer(object,parentptr);\n\tcJSONUtils_InplaceDecodePointerString(childptr);\n\n\tif (!parent) ret=0;\t/* Couldn't find object to remove child from. */\n\telse if (parent->type==cJSON_Array)\t\tret=cJSON_DetachItemFromArray(parent,atoi(childptr));\n\telse if (parent->type==cJSON_Object)\tret=cJSON_DetachItemFromObject(parent,childptr);\n\tfree(parentptr);\n\treturn ret;\n}\n\nstatic int cJSONUtils_Compare(cJSON *a,cJSON *b)\n{\n\tif (a->type!=b->type)\treturn -1;\t/* mismatched type. */\n\tswitch (a->type)\n\t{\n\tcase cJSON_Number:\treturn (a->valueint!=b->valueint || a->valuedouble!=b->valuedouble)?-2:0;\t/* numeric mismatch. */\n\tcase cJSON_String:\treturn (strcmp(a->valuestring,b->valuestring)!=0)?-3:0;\t\t\t\t\t\t/* string mismatch. */\n\tcase cJSON_Array:\tfor (a=a->child,b=b->child;a && b;a=a->next,b=b->next)\t{int err=cJSONUtils_Compare(a,b);if (err) return err;}\n\t\t\t\t\t\treturn (a || b)?-4:0;\t/* array size mismatch. */\n\tcase cJSON_Object:\n\t\t\t\t\t\tcJSONUtils_SortObject(a);\n\t\t\t\t\t\tcJSONUtils_SortObject(b);\n\t\t\t\t\t\ta=a->child,b=b->child;\n\t\t\t\t\t\twhile (a && b)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint err;\n\t\t\t\t\t\t\tif (cJSONUtils_strcasecmp(a->string,b->string))\treturn -6;\t/* missing member */\n\t\t\t\t\t\t\terr=cJSONUtils_Compare(a,b);if (err) return err;\n\t\t\t\t\t\t\ta=a->next,b=b->next;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (a || b)?-5:0;\t/* object length mismatch */\n\n\tdefault:\t\t\tbreak;\n\t}\n\treturn 0;\n}\n\nstatic int cJSONUtils_ApplyPatch(cJSON *object,cJSON *patch)\n{\n\tcJSON *op=0,*path=0,*value=0,*parent=0;int opcode=0;char *parentptr=0,*childptr=0;\n\n\top=cJSON_GetObjectItem(patch,\"op\");\n\tpath=cJSON_GetObjectItem(patch,\"path\");\n\tif (!op || !path) return 2;\t/* malformed patch. */\n\n\tif\t\t(!strcmp(op->valuestring,\"add\"))\topcode=0;\n\telse if (!strcmp(op->valuestring,\"remove\")) opcode=1;\n\telse if (!strcmp(op->valuestring,\"replace\"))opcode=2;\n\telse if (!strcmp(op->valuestring,\"move\"))\topcode=3;\n\telse if (!strcmp(op->valuestring,\"copy\"))\topcode=4;\n\telse if (!strcmp(op->valuestring,\"test\"))\treturn cJSONUtils_Compare(cJSONUtils_GetPointer(object,path->valuestring),cJSON_GetObjectItem(patch,\"value\"));\n\telse return 3; /* unknown opcode. */\n\n\tif (opcode==1 || opcode==2)\t/* Remove/Replace */\n\t{\n\t\tcJSON_Delete(cJSONUtils_PatchDetach(object,path->valuestring));\t/* Get rid of old. */\n\t\tif (opcode==1) return 0;\t/* For Remove, this is job done. */\n\t}\n\n\tif (opcode==3 || opcode==4)\t/* Copy/Move uses \"from\". */\n\t{\n\t\tcJSON *from=cJSON_GetObjectItem(patch,\"from\");\tif (!from) return 4; /* missing \"from\" for copy/move. */\n\n\t\tif (opcode==3) value=cJSONUtils_PatchDetach(object,from->valuestring);\n\t\tif (opcode==4) value=cJSONUtils_GetPointer(object,from->valuestring);\n\t\tif (!value) return 5; /* missing \"from\" for copy/move. */\n\t\tif (opcode==4) value=cJSON_Duplicate(value,1);\n\t\tif (!value) return 6; /* out of memory for copy/move. */\n\t}\n\telse\t/* Add/Replace uses \"value\". */\n\t{\n\t\tvalue=cJSON_GetObjectItem(patch,\"value\");\n\t\tif (!value) return 7; /* missing \"value\" for add/replace. */\n\t\tvalue=cJSON_Duplicate(value,1);\n\t\tif (!value) return 8; /* out of memory for add/replace. */\n\t}\n\t\t\n\t/* Now, just add \"value\" to \"path\". */\n\n\tparentptr=strdup(path->valuestring);\tchildptr=strrchr(parentptr,'/');\tif (childptr) *childptr++=0;\n\tparent=cJSONUtils_GetPointer(object,parentptr);\n\tcJSONUtils_InplaceDecodePointerString(childptr);\n\n\t/* add, remove, replace, move, copy, test. */\n\tif (!parent) {free(parentptr); cJSON_Delete(value); return 9;}\t/* Couldn't find object to add to. */\n\telse if (parent->type==cJSON_Array)\n\t{\n\t\tif (!strcmp(childptr,\"-\"))\tcJSON_AddItemToArray(parent,value);\n\t\telse\t\t\t\t\t\tcJSON_InsertItemInArray(parent,atoi(childptr),value);\n\t}\n\telse if (parent->type==cJSON_Object)\n\t{\n\t\tcJSON_DeleteItemFromObject(parent,childptr);\n\t\tcJSON_AddItemToObject(parent,childptr,value);\n\t}\n\telse\n\t{\n\t\tcJSON_Delete(value);\n\t}\n\tfree(parentptr);\n\treturn 0;\n}\n\n\nint cJSONUtils_ApplyPatches(cJSON *object,cJSON *patches)\n{\n\tint err;\n\tif (patches->type!=cJSON_Array) return 1;\t/* malformed patches. */\n\tif (patches) patches=patches->child;\n\twhile (patches)\n\t{\n\t\tif ((err=cJSONUtils_ApplyPatch(object,patches))) return err;\n\t\tpatches=patches->next;\n\t}\n\treturn 0;\n}\n\nstatic void cJSONUtils_GeneratePatch(cJSON *patches,const char *op,const char *path,const char *suffix,cJSON *val)\n{\n\tcJSON *patch=cJSON_CreateObject();\n\tcJSON_AddItemToObject(patch,\"op\",cJSON_CreateString(op));\n\tif (suffix)\n\t{\n\t\tchar *newpath=(char*)malloc(strlen(path)+cJSONUtils_PointerEncodedstrlen(suffix)+2);\n\t\tcJSONUtils_PointerEncodedstrcpy(newpath+sprintf(newpath,\"%s/\",path),suffix);\n\t\tcJSON_AddItemToObject(patch,\"path\",cJSON_CreateString(newpath));\n\t\tfree(newpath);\n\t}\n\telse\tcJSON_AddItemToObject(patch,\"path\",cJSON_CreateString(path));\n\tif (val) cJSON_AddItemToObject(patch,\"value\",cJSON_Duplicate(val,1));\n\tcJSON_AddItemToArray(patches,patch);\n}\n\nvoid cJSONUtils_AddPatchToArray(cJSON *array,const char *op,const char *path,cJSON *val)\t{cJSONUtils_GeneratePatch(array,op,path,0,val);}\n\nstatic void cJSONUtils_CompareToPatch(cJSON *patches,const char *path,cJSON *from,cJSON *to)\n{\n\tif (from->type!=to->type)\t{cJSONUtils_GeneratePatch(patches,\"replace\",path,0,to);\treturn;\t}\n\t\n\tswitch (from->type)\n\t{\n\tcase cJSON_Number:\t\n\t\tif (from->valueint!=to->valueint || from->valuedouble!=to->valuedouble)\n\t\t\tcJSONUtils_GeneratePatch(patches,\"replace\",path,0,to);\n\t\treturn;\n\t\t\t\t\t\t\n\tcase cJSON_String:\t\n\t\tif (strcmp(from->valuestring,to->valuestring)!=0)\n\t\t\tcJSONUtils_GeneratePatch(patches,\"replace\",path,0,to);\n\t\treturn;\n\n\tcase cJSON_Array:\n\t{\n\t\tint c;char *newpath=(char*)malloc(strlen(path)+23);\t/* Allow space for 64bit int. */\n\t\tfor (c=0,from=from->child,to=to->child;from && to;from=from->next,to=to->next,c++){\n\t\t\t\t\t\t\t\t\t\tsprintf(newpath,\"%s/%d\",path,c);\tcJSONUtils_CompareToPatch(patches,newpath,from,to);\n\t\t}\n\t\tfor (;from;from=from->next,c++)\t{sprintf(newpath,\"%d\",c);\tcJSONUtils_GeneratePatch(patches,\"remove\",path,newpath,0);\t}\n\t\tfor (;to;to=to->next,c++)\t\tcJSONUtils_GeneratePatch(patches,\"add\",path,\"-\",to);\n\t\tfree(newpath);\n\t\treturn;\n\t}\n\n\tcase cJSON_Object:\n\t{\n\t\tcJSON *a,*b;\n\t\tcJSONUtils_SortObject(from);\n\t\tcJSONUtils_SortObject(to);\n\t\t\n\t\ta=from->child,b=to->child;\n\t\twhile (a || b)\n\t\t{\n\t\t\tint diff=(!a)?1:(!b)?-1:cJSONUtils_strcasecmp(a->string,b->string);\n\t\t\tif (!diff)\n\t\t\t{\n\t\t\t\tchar *newpath=(char*)malloc(strlen(path)+cJSONUtils_PointerEncodedstrlen(a->string)+2);\n\t\t\t\tcJSONUtils_PointerEncodedstrcpy(newpath+sprintf(newpath,\"%s/\",path),a->string);\n\t\t\t\tcJSONUtils_CompareToPatch(patches,newpath,a,b);\n\t\t\t\tfree(newpath);\n\t\t\t\ta=a->next;\n\t\t\t\tb=b->next;\n\t\t\t}\n\t\t\telse if (diff<0)\t{cJSONUtils_GeneratePatch(patches,\"remove\",path,a->string,0);\ta=a->next;}\n\t\t\telse\t\t\t\t{cJSONUtils_GeneratePatch(patches,\"add\",path,b->string,b);\t\tb=b->next;}\n\t\t}\n\t\treturn;\n\t}\n\n\tdefault:\t\t\tbreak;\n\t}\n}\n\n\ncJSON* cJSONUtils_GeneratePatches(cJSON *from,cJSON *to)\n{\n\tcJSON *patches=cJSON_CreateArray();\t\n\tcJSONUtils_CompareToPatch(patches,\"\",from,to);\n\treturn patches;\n}\n\n\nstatic cJSON *cJSONUtils_SortList(cJSON *list)\n{\n\tcJSON *first=list,*second=list,*ptr=list;\n\n\tif (!list || !list->next) return list;\t/* One entry is sorted already. */\n\t\n\twhile (ptr && ptr->next && cJSONUtils_strcasecmp(ptr->string,ptr->next->string)<0) ptr=ptr->next;\t/* Test for list sorted. */\n\tif (!ptr || !ptr->next) return list;\t/* Leave sorted lists unmodified. */\n\tptr=list;\n\n\twhile (ptr) {second=second->next;ptr=ptr->next;if (ptr) ptr=ptr->next;}\t/* Walk two pointers to find the middle. */\n\tif (second && second->prev) second->prev->next=0;\t/* Split the lists */\n\n\tfirst=cJSONUtils_SortList(first);\t/* Recursively sort the sub-lists. */\n\tsecond=cJSONUtils_SortList(second);\n\tlist=ptr=0;\n\n\twhile (first && second)\t/* Merge the sub-lists */\n\t{\t\t\n\t\tif (cJSONUtils_strcasecmp(first->string,second->string)<0)\n\t\t{\n\t\t\tif (!list) list=ptr=first;\n\t\t\telse\t{ptr->next=first;first->prev=ptr;ptr=first;}\n\t\t\tfirst=first->next;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif (!list) list=ptr=second;\n\t\t\telse\t{ptr->next=second;second->prev=ptr;ptr=second;}\n\t\t\tsecond=second->next;\n\t\t}\n\t}\n\tif (first)\t{\tif (!list) return first;\tptr->next=first;\tfirst->prev=ptr;\t}\t/* Append any tails. */\n\tif (second)\t{\tif (!list) return second;\tptr->next=second;\tsecond->prev=ptr;\t}\n\n\treturn list;\n}\n\nvoid cJSONUtils_SortObject(cJSON *object)\t{object->child=cJSONUtils_SortList(object->child);}\n\ncJSON* cJSONUtils_MergePatch(cJSON *target, cJSON *patch)\n{\n\tif (!patch || patch->type != cJSON_Object) {cJSON_Delete(target);return cJSON_Duplicate(patch,1);}\n\tif (!target || target->type != cJSON_Object) {cJSON_Delete(target);target=cJSON_CreateObject();}\n\n\tpatch=patch->child;\n\twhile (patch)\n\t{\n\t\tif (patch->type == cJSON_NULL) cJSON_DeleteItemFromObject(target,patch->string);\n\t\telse\n\t\t{\n\t\t\tcJSON *replaceme=cJSON_DetachItemFromObject(target,patch->string);\n\t\t\tcJSON_AddItemToObject(target,patch->string,cJSONUtils_MergePatch(replaceme,patch));\n\t\t}\n\t\tpatch=patch->next;\n\t}\n\treturn target;\n}\n\ncJSON *cJSONUtils_GenerateMergePatch(cJSON *from,cJSON *to)\n{\n\tcJSON *patch=0;\n\tif (!to) return cJSON_CreateNull();\n\tif (to->type!=cJSON_Object || !from || from->type!=cJSON_Object) return cJSON_Duplicate(to,1);\n\tcJSONUtils_SortObject(from);\n\tcJSONUtils_SortObject(to);\n\tfrom=from->child;to=to->child;\n\tpatch=cJSON_CreateObject();\n\twhile (from || to)\n\t{\n\t\tint compare=from?(to?strcmp(from->string,to->string):-1):1;\n\t\tif (compare<0)\n\t\t{\n\t\t\tcJSON_AddItemToObject(patch,from->string,cJSON_CreateNull());\n\t\t\tfrom=from->next;\n\t\t}\n\t\telse if (compare>0)\n\t\t{\n\t\t\tcJSON_AddItemToObject(patch,to->string,cJSON_Duplicate(to,1));\n\t\t\tto=to->next;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (cJSONUtils_Compare(from,to)) cJSON_AddItemToObject(patch,to->string,cJSONUtils_GenerateMergePatch(from,to));\n\t\t\tfrom=from->next;to=to->next;\n\t\t}\n\t}\n\tif (!patch->child) {cJSON_Delete(patch);return 0;}\n\treturn patch;\n}\n\n"
  },
  {
    "path": "oss_c_sdk_test/cjson_utils.h",
    "content": "#include \"cjson.h\"\n\n/* Implement RFC6901 (https://tools.ietf.org/html/rfc6901) JSON Pointer spec.\t*/\ncJSON *cJSONUtils_GetPointer(cJSON *object,const char *pointer);\n\n/* Implement RFC6902 (https://tools.ietf.org/html/rfc6902) JSON Patch spec.\t\t*/\ncJSON* cJSONUtils_GeneratePatches(cJSON *from,cJSON *to);\nvoid cJSONUtils_AddPatchToArray(cJSON *array,const char *op,const char *path,cJSON *val);\t/* Utility for generating patch array entries.\t*/\nint cJSONUtils_ApplyPatches(cJSON *object,cJSON *patches);\t/* Returns 0 for success. */\n\n/*\n// Note that ApplyPatches is NOT atomic on failure. To implement an atomic ApplyPatches, use:\n//int cJSONUtils_AtomicApplyPatches(cJSON **object, cJSON *patches)\n//{\n//\tcJSON *modme=cJSON_Duplicate(*object,1);\n//\tint error=cJSONUtils_ApplyPatches(modme,patches);\n//\tif (!error)\t{cJSON_Delete(*object);*object=modme;}\n//\telse\t\tcJSON_Delete(modme);\n//\treturn error;\n//}\n// Code not added to library since this strategy is a LOT slower.\n*/\n\n/* Implement RFC7386 (https://tools.ietf.org/html/rfc7396) JSON Merge Patch spec. */\ncJSON* cJSONUtils_MergePatch(cJSON *target, cJSON *patch); /* target will be modified by patch. return value is new ptr for target. */\ncJSON *cJSONUtils_GenerateMergePatch(cJSON *from,cJSON *to); /* generates a patch to move from -> to */\n\nchar *cJSONUtils_FindPointerFromObjectTo(cJSON *object,cJSON *target);\t/* Given a root object and a target object, construct a pointer from one to the other.\t*/\n\nvoid cJSONUtils_SortObject(cJSON *object);\t/* Sorts the members of the object into alphabetical order.\t*/\n"
  },
  {
    "path": "oss_c_sdk_test/oss_config.c",
    "content": "#include \"oss_config.h\"\r\n\r\nchar* TEST_OSS_ENDPOINT = NULL;\r\nchar* TEST_REGION = NULL;\r\nchar* TEST_ACCESS_KEY_ID = NULL;\r\nchar* TEST_ACCESS_KEY_SECRET = NULL;\r\nchar* TEST_BUCKET_NAME = NULL;\r\nchar* TEST_CALLBACK_URL = NULL;\r\n"
  },
  {
    "path": "oss_c_sdk_test/oss_config.h",
    "content": "#ifndef OSS_TEST_CONFIG_H\r\n#define OSS_TEST_CONFIG_H\r\n\r\n#include \"oss_define.h\"\r\n\r\nOSS_CPP_START\r\n\r\nextern char* TEST_OSS_ENDPOINT;\r\nextern char* TEST_REGION;\r\nextern char* TEST_ACCESS_KEY_ID;\r\nextern char* TEST_ACCESS_KEY_SECRET;\r\nextern char* TEST_BUCKET_NAME;\r\nextern char* TEST_CALLBACK_URL;\r\n\r\nOSS_CPP_END\r\n\r\n#endif\r\n"
  },
  {
    "path": "oss_c_sdk_test/oss_test_util.c",
    "content": "#include <sys/stat.h>\n#include \"oss_config.h\"\n#include \"oss_api.h\"\n#include \"oss_test_util.h\"\n#include \"cjson.h\"\n\nchar bucket_prefix[64];\n\nvoid make_rand_string(aos_pool_t *p, int len, aos_string_t *data)\n{\n    char *str = NULL;\n    int i = 0;\n    str = (char *)aos_palloc(p, len + 1);\n    for ( ; i < len; i++) {\n        str[i] = 'a' + rand() % 32;\n    }\n    str[len] = '\\0';\n    aos_str_set(data, str);\n}\n\naos_buf_t *make_random_buf(aos_pool_t *p, int len)\n{\n    int bytes;\n    aos_buf_t *b;\n    aos_string_t str;\n\n    make_rand_string(p, 16, &str);\n    b = aos_create_buf(p, len);\n\n    while (b->last < b->end) {\n        bytes = b->end - b->last;\n        bytes = aos_min(bytes, 16);\n        memcpy(b->last, str.data, bytes);\n        b->last += bytes;\n    }\n\n    return b;\n}\n\nvoid make_random_body(aos_pool_t *p, int count, aos_list_t *bc)\n{\n    int i = 0;\n    int len;\n    aos_buf_t *b;\n\n    srand((int)time(0));\n    for (; i < count; ++i) {\n        len = 1 + (int)(4096.0*rand() / (RAND_MAX+1.0));\n        b = make_random_buf(p, len);\n        aos_list_add_tail(&b->node, bc);\n    }\n}\n\nint make_random_file(aos_pool_t *p, const char *filename, int len)\n{\n    apr_file_t *file;\n    aos_string_t str;\n    apr_size_t nbytes;\n    int ret;\n\n    if ((ret = apr_file_open(&file, filename, APR_CREATE | APR_WRITE | APR_TRUNCATE,\n        APR_UREAD | APR_UWRITE | APR_GREAD, p)) != APR_SUCCESS) {\n            return ret;\n    }\n\n    make_rand_string(p, len, &str);\n    nbytes = len;\n\n    ret = apr_file_write(file, str.data, &nbytes);\n    apr_file_close(file);\n\n    return ret;\n}\n\nint fill_test_file(aos_pool_t *p, const char *filename, const char *content) \n{\n    apr_file_t *file;\n    apr_size_t nbytes;\n    int ret;\n\n    if ((ret = apr_file_open(&file, filename, APR_CREATE | APR_WRITE | APR_TRUNCATE,\n        APR_UREAD | APR_UWRITE | APR_GREAD, p)) != APR_SUCCESS) {\n            return ret;\n    }\n\n    nbytes = strlen(content);\n\n    ret = apr_file_write(file, content, &nbytes);\n    apr_file_close(file);\n\n    return ret;\n}\n\nvoid init_test_config(oss_config_t *config, int is_cname)\n{\n    aos_str_set(&config->endpoint, TEST_OSS_ENDPOINT);\n    aos_str_set(&config->access_key_id, TEST_ACCESS_KEY_ID);\n    aos_str_set(&config->access_key_secret, TEST_ACCESS_KEY_SECRET);\n    aos_str_set(&config->region, TEST_REGION);\n    config->signature_version = 1;\n    config->is_cname = is_cname;\n}\n\nvoid init_test_request_options(oss_request_options_t *options, int is_cname)\n{\n    options->config = oss_config_create(options->pool);\n    init_test_config(options->config, is_cname);\n    options->ctl = aos_http_controller_create(options->pool, 0);\n    options->ctl->options = aos_http_request_options_create(options->pool);\n    options->ctl->options->verify_ssl = AOS_FALSE;\n}\n\naos_status_t * create_test_bucket(const oss_request_options_t *options,\n                                  const char *bucket_name, \n                                  oss_acl_e oss_acl)\n{\n    aos_string_t bucket;\n    aos_table_t *resp_headers;\n    aos_status_t * s;\n\n    aos_str_set(&bucket, bucket_name);\n\n    s = oss_create_bucket(options, &bucket, oss_acl, &resp_headers);\n    return s;\n}\n\naos_status_t * create_test_bucket_with_storage_class(const oss_request_options_t *options,\n                                  const char *bucket_name, \n                                  oss_acl_e oss_acl,\n                                  oss_storage_class_type_e storage_class)\n{\n    aos_string_t bucket;\n    aos_table_t *resp_headers;\n    aos_status_t * s;\n\n    aos_str_set(&bucket, bucket_name);\n\n    s = oss_create_bucket_with_storage_class(options, &bucket, oss_acl, storage_class, &resp_headers);\n    return s;\n}\n\naos_status_t *create_test_object(const oss_request_options_t *options, \n                                 const char *bucket_name, \n                                 const char *object_name, \n                                 const char *data, \n                                 aos_table_t *headers)\n{\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *resp_headers;\n    aos_list_t buffer;\n    aos_buf_t *content;\n    aos_status_t * s;\n\n    test_object_base();\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, data, strlen(data));\n    aos_list_add_tail(&content->node, &buffer);\n\n    s = oss_put_object_from_buffer(options, &bucket, &object, \n                                   &buffer, headers, &resp_headers);\n    return s;\n}\n\naos_status_t *create_test_object_from_file(const oss_request_options_t *options, \n                                          const char *bucket_name,\n                                          const char *object_name, \n                                          const char *filename, \n                                          aos_table_t *headers)\n{\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t file;\n    aos_table_t *resp_headers;\n    aos_status_t * s;\n\n    test_object_base();\n    aos_str_set(&file, filename);\n\n    s = oss_put_object_from_file(options, &bucket, &object, &file, \n                                 headers, &resp_headers);\n    return s;\n}\n\naos_status_t *delete_test_object(const oss_request_options_t *options, \n                                 const char *bucket_name, \n                                 const char *object_name)\n{\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *resp_headers;\n    aos_status_t * s;\n\n    test_object_base();\n    s = oss_delete_object(options, &bucket, &object, &resp_headers);\n    return s;\n}\n\naos_status_t *delete_test_object_by_prefix(const oss_request_options_t *options,\n                                const char *bucket_name,\n                                const char *object_name_prefix)\n{\n    aos_string_t bucket;\n    aos_status_t * s = NULL;\n    oss_list_object_params_t *params = NULL;\n    oss_list_object_content_t *content = NULL;\n    char *nextMarker = \"\";\n\n    aos_str_set(&bucket, bucket_name);\n\n    params = oss_create_list_object_params(options->pool);\n    params->max_ret = 100;\n    aos_str_set(&params->prefix, object_name_prefix);\n    aos_str_set(&params->marker, nextMarker);\n\n    do {\n        s = oss_list_object(options, &bucket, params, NULL);\n        if (!aos_status_is_ok(s))\n        {\n            return s;\n        }\n\n        aos_list_for_each_entry(oss_list_object_content_t, content, &params->object_list, node) {\n            char object_name[128];\n            sprintf(object_name, \"%.*s\", content->key.len, content->key.data);\n            s = delete_test_object(options, bucket_name, object_name);\n            if (!aos_status_is_ok(s))\n            {\n                return s;\n            }\n        }\n\n        nextMarker = apr_psprintf(options->pool, \"%.*s\", params->next_marker.len, params->next_marker.data);\n        aos_str_set(&params->marker, nextMarker);\n        aos_list_init(&params->object_list);\n        aos_list_init(&params->common_prefix_list);\n    } while (params->truncated == AOS_TRUE);\n\n    if (s == NULL) {\n        s = aos_status_create(options->pool);\n        aos_status_set(s, AOSE_OK, NULL, NULL);\n    }\n\n    return s;\n}\n\nvoid clean_bucket(const oss_request_options_t *options, const char* bucket_name)\n{\n    aos_table_t *resp_headers = NULL;\n    oss_list_multipart_upload_params_t *list_upload_params = NULL;\n    oss_list_live_channel_params_t *live_channel_params = NULL;\n    aos_string_t bucket;\n\n    // delete all objects\n    delete_test_object_by_prefix(options, bucket_name, \"\");\n\n    // upload\n    aos_str_set(&bucket, bucket_name);\n    list_upload_params = oss_create_list_multipart_upload_params(options->pool);\n    do {\n        aos_status_t *s;\n        oss_list_multipart_upload_content_t *upload_content;\n        aos_list_init(&list_upload_params->upload_list);\n\n        s = oss_list_multipart_upload(options, &bucket, list_upload_params, &resp_headers);\n\n        if (!aos_status_is_ok(s)) {\n            break;\n        }\n\n        aos_list_for_each_entry(oss_list_multipart_upload_content_t, upload_content, &list_upload_params->upload_list, node) {\n            abort_test_multipart_upload(options, bucket_name, upload_content->key.data, &upload_content->upload_id);\n        }\n\n        if (!list_upload_params->truncated) {\n            break;\n        }\n\n        aos_str_set(&list_upload_params->key_marker, list_upload_params->next_key_marker.data);\n        aos_str_set(&list_upload_params->upload_id_marker, list_upload_params->next_upload_id_marker.data);\n\n    } while (1);\n\n    // live channel\n    live_channel_params = oss_create_list_live_channel_params(options->pool);\n    do {\n        aos_status_t *s;\n        oss_live_channel_content_t *live_chan;\n        aos_list_init(&live_channel_params->live_channel_list);\n\n        s = oss_list_live_channel(options, &bucket, live_channel_params, NULL);\n\n        if (!aos_status_is_ok(s)) {\n            break;\n        }\n\n        aos_list_for_each_entry(oss_live_channel_content_t, live_chan, &live_channel_params->live_channel_list, node) {\n            printf(\"live_chan->name.data:%s\\n\", live_chan->name.data);\n            oss_delete_live_channel(options, &bucket, &live_chan->name, NULL);\n        }\n\n        if (!live_channel_params->truncated) {\n            break;\n        }\n\n        aos_str_set(&live_channel_params->marker, live_channel_params->next_marker.data);\n\n    } while (1);\n\n    /* delete test bucket */\n    oss_delete_bucket(options, &bucket, &resp_headers);\n\n    //printf(\"clean bucket %s done\\n\", bucket_name);\n}\n\nvoid clean_bucket_by_prefix(const char* prefix)\n{\n    //printf(\"clean_bucket_by_prefix:%s\\n\", prefix);\n\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_list_buckets_params_t *params = NULL;\n    oss_list_bucket_content_t *content = NULL;\n\n    /* list all buckets */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    params = oss_create_list_buckets_params(p);\n    params->max_keys = 100;\n    aos_str_set(&params->prefix, prefix);\n    s = oss_list_bucket(options, params, &resp_headers);\n\n    if (!aos_status_is_ok(s)) {\n        return;\n    }\n\n    aos_list_for_each_entry(oss_list_bucket_content_t, content, &params->bucket_list, node) {\n        clean_bucket(options, content->name.data);\n    }\n\n    aos_pool_destroy(p);\n}\n\naos_status_t *init_test_multipart_upload(const oss_request_options_t *options, \n                                         const char *bucket_name, \n                                         const char *object_name, \n                                         aos_string_t *upload_id)\n{\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers;\n    aos_table_t *resp_headers;\n    aos_status_t *s;\n\n    test_object_base();\n    headers = aos_table_make(options->pool, 5);\n\n    s = oss_init_multipart_upload(options, &bucket, &object, \n                                  upload_id, headers, &resp_headers);\n\n    return s;\n}\n\naos_status_t *abort_test_multipart_upload(const oss_request_options_t *options, \n                                          const char *bucket_name, \n                                          const char *object_name, \n                                          aos_string_t *upload_id)\n{\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *resp_headers;\n    aos_status_t *s;\n\n    test_object_base();\n    s = oss_abort_multipart_upload(options, &bucket, &object, upload_id, \n                                   &resp_headers);\n\n    return s;\n}\n\naos_status_t *create_test_live_channel(const oss_request_options_t *options,\n    const char *bucket_name, const char *live_channel)\n{\n    aos_list_t publish_url_list;\n    aos_list_t play_url_list;\n    oss_live_channel_configuration_t *config = NULL;\n    aos_string_t bucket;\n    aos_string_t channel_id;\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&channel_id, live_channel);\n    aos_list_init(&publish_url_list);\n    aos_list_init(&play_url_list);\n\n    config = oss_create_live_channel_configuration_content(options->pool);\n    aos_str_set(&config->name, live_channel);\n    aos_str_set(&config->description, \"live channel description\");\n\n    return  oss_create_live_channel(options, &bucket, config, &publish_url_list,\n        &play_url_list, NULL);\n}\n\naos_status_t *delete_test_live_channel(const oss_request_options_t *options,\n    const char *bucket_name, const char *live_channel)\n{\n    aos_string_t bucket;\n    aos_string_t channel_id;\n\n    aos_str_set(&bucket, bucket_name);\n    aos_str_set(&channel_id, live_channel);\n\n    return oss_delete_live_channel(options, &bucket, &channel_id, NULL);\n}\n\naos_status_t *get_image_info(const oss_request_options_t *options,\n    const char *bucket_name, const char *object_name, image_info_t *info)\n{\n    aos_status_t *s = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t buffer;\n\n    aos_list_init(&buffer);\n    aos_str_set(&bucket, bucket_name);\n    aos_str_set(&object, object_name);\n\n    /* test get object to buffer */\n    params = aos_table_make(options->pool, 1);\n    apr_table_set(params, OSS_PROCESS, \"image/info\");\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers, params, &buffer, &resp_headers);\n\n    if (aos_status_is_ok(s)) {\n        aos_buf_t *content = NULL;\n        char *buf = NULL;\n        int64_t len = 0;\n        int64_t size = 0;\n        int64_t pos = 0;\n        cJSON * root = NULL;\n        cJSON * item = NULL;\n\n        /* get buffer len */\n        len = aos_buf_list_len(&buffer);\n        buf = (char *)aos_pcalloc(options->pool, (apr_size_t)(len + 1));\n        buf[len] = '\\0';\n        \n        /* copy buffer content to memory */\n        aos_list_for_each_entry(aos_buf_t, content, &buffer, node) {\n            size = aos_buf_size(content);\n            memcpy(buf + pos, content->pos, (size_t)size);\n            pos += size;\n        }\n        \n        /* parse image info from json */\n        root = cJSON_Parse(buf);\n        \n        item = cJSON_GetObjectItem(root, \"ImageHeight\");\n        item = cJSON_GetObjectItem(item, \"value\");\n        info->height = atol(item->valuestring);\n        \n        item = cJSON_GetObjectItem(root, \"ImageWidth\");\n        item = cJSON_GetObjectItem(item, \"value\");\n        info->width = atol(item->valuestring);\n        \n        item = cJSON_GetObjectItem(root, \"FileSize\");\n        item = cJSON_GetObjectItem(item, \"value\");\n        info->size = atol(item->valuestring);\n        \n        item = cJSON_GetObjectItem(root, \"Format\");\n        item = cJSON_GetObjectItem(item, \"value\");\n        apr_snprintf(info->format, 64, \"%s\", item->valuestring);\n        \n        cJSON_Delete(root);\n    }\n    return s;\n}\n\n\nchar* gen_test_signed_url(const oss_request_options_t *options, \n                          const char *bucket_name,\n                          const char *object_name, \n                          int64_t expires, \n                          aos_http_request_t *req)\n{\n    aos_string_t bucket;\n    aos_string_t object;\n    char *signed_url = NULL;\n\n    aos_str_set(&bucket, bucket_name);\n    aos_str_set(&object, object_name);\n    signed_url = oss_gen_signed_url(options, &bucket, &object, expires, req);\n    return signed_url;\n}\n\nunsigned long get_file_size(const char *file_path)\n{\n    unsigned long filesize = -1; \n    struct stat statbuff;\n\n    if(stat(file_path, &statbuff) < 0){\n        return filesize;\n    } else {\n        filesize = statbuff.st_size;\n    }\n\n    return filesize;\n}\n\nchar *decrypt(const char *encrypted_str, aos_pool_t *pool)\n{\n    char *res_str = NULL;\n    int i = 0;\n\n    if (encrypted_str == NULL) {\n        return NULL;\n    }\n\n    res_str =  (char *)aos_palloc(pool, strlen(encrypted_str) + 1);\n\n    while (*encrypted_str != '\\0') {\n        res_str[i] = 0x6a ^ *encrypted_str;\n        encrypted_str++;\n        i++;\n    }\n    res_str[i] = '\\0';\n\n    return res_str;\n}\n\nvoid progress_callback(int64_t consumed_bytes, int64_t total_bytes) \n{\n    assert(total_bytes >= consumed_bytes);  \n}\n\nvoid percentage(int64_t consumed_bytes, int64_t total_bytes) \n{\n    assert(total_bytes >= consumed_bytes);\n}\n\nchar * get_text_file_data(aos_pool_t *pool, const char *filepath)\n{\n    apr_status_t s;\n    apr_file_t *thefile;\n    apr_finfo_t finfo;\n    apr_size_t nread = 0;\n    apr_off_t offset = 0;\n    char *buf = NULL;\n\n    s = apr_file_open(&thefile, filepath, APR_READ, APR_UREAD | APR_GREAD, pool);\n    if (s != APR_SUCCESS) {\n        return NULL;\n    }\n\n    s = apr_file_info_get(&finfo, APR_FINFO_SIZE | APR_FINFO_MTIME, thefile);\n    if (s != APR_SUCCESS) {\n        apr_file_close(thefile);\n        return NULL;\n    }\n\n    nread = (apr_size_t)finfo.size;\n    buf = aos_pcalloc(pool, nread + 1);\n    apr_file_seek(thefile, APR_SET, &offset);\n    apr_file_read(thefile, buf, &nread);\n    buf[nread] = '\\0';\n    apr_file_close(thefile);\n    return buf;\n}\n\nchar *get_test_file_path()\n{\n    static int flag = 0;\n    static char path[1024];\n#if defined(WIN32)\n    char ch = '\\\\';\n#else\n    char ch = '/';\n#endif\n    if (!flag) {\n        char *filepath = __FILE__;\n        char * pos = strrchr(filepath, ch);\n        if (pos) {\n            int len = (int)(pos - filepath + 1);\n            sprintf(path, \"%.*s\", len, filepath);\n        } else {\n            sprintf(path, \"oss_c_sdk_test%c\", ch);\n        }\n        flag = 1;\n    }\n    return path;\n}\n\nchar *get_test_bucket_name(aos_pool_t *p, const char* suffix)\n{\n    return apr_psprintf(p, \"%s-%s-bucket\", bucket_prefix, suffix);\n}\n\nvoid set_test_bucket_prefix(const char* prefix)\n{\n    sprintf(bucket_prefix, \"%s\", prefix);\n}\n\n"
  },
  {
    "path": "oss_c_sdk_test/oss_test_util.h",
    "content": "#ifndef OSS_TEST_UTIL_H\n#define OSS_TEST_UTIL_H\n\n#include \"CuTest.h\"\n#include \"aos_http_io.h\"\n#include \"aos_string.h\"\n#include \"aos_transport.h\"\n#include \"aos_status.h\"\n#include \"oss_define.h\"\n\nOSS_CPP_START\n\ntypedef struct {\n    long height;\n    long width;\n    long size;\n    char format[64];\n} image_info_t;\n\n \n#define test_object_base() do {                                         \\\n        aos_str_set(&bucket, bucket_name);                              \\\n        aos_str_set(&object, object_name);                              \\\n    } while(0)\n\n#define TEST_CASE_LOG_OPEN\n#ifdef TEST_CASE_LOG_OPEN\n#define TEST_CASE_LOG(fmt,...)  do { printf(\"%s:%d \"fmt,__FUNCTION__,__LINE__,##__VA_ARGS__); fflush (stdout); } while (0)\n#else\n#define TEST_CASE_LOG(fmt,...) \n#endif\n\nvoid make_rand_string(aos_pool_t *p, int len, aos_string_t *data);\n\naos_buf_t *make_random_buf(aos_pool_t *p, int len);\n\nvoid make_random_body(aos_pool_t *p, int count, aos_list_t *bc);\n\nint make_random_file(aos_pool_t *p, const char *filename, int len);\n\nint fill_test_file(aos_pool_t *p, const char *filename, const char *content);\n\nvoid init_test_config(oss_config_t *config, int is_cname);\n\nvoid init_test_request_options(oss_request_options_t *options, int is_cname);\n\naos_status_t * create_test_bucket(const oss_request_options_t *options,\n    const char *bucket_name, oss_acl_e oss_acl);\n\naos_status_t * create_test_bucket_with_storage_class(const oss_request_options_t *options,\n                                  const char *bucket_name, \n                                  oss_acl_e oss_acl,\n                                  oss_storage_class_type_e storage_class_tp);\n\naos_status_t *create_test_object(const oss_request_options_t *options, const char *bucket_name, \n    const char *object_name, const char *data, aos_table_t *headers);\n\naos_status_t *create_test_object_from_file(const oss_request_options_t *options, const char *bucket_name,\n    const char *object_name, const char *filename, aos_table_t *headers);\n\naos_status_t *delete_test_object(const oss_request_options_t *options,\n    const char *bucket_name, const char *object_name);\n\naos_status_t *delete_test_object_by_prefix(const oss_request_options_t *options,\n    const char *bucket_name,\n    const char *object_name_prefix);\n\naos_status_t *init_test_multipart_upload(const oss_request_options_t *options, const char *bucket_name, \n    const char *object_name, aos_string_t *upload_id);\n\naos_status_t *abort_test_multipart_upload(const oss_request_options_t *options, const char *bucket_name,\n    const char *object_name, aos_string_t *upload_id);\n\naos_status_t *create_test_live_channel(const oss_request_options_t *options, const char *bucket_name,\n    const char *live_channel);\n\naos_status_t *delete_test_live_channel(const oss_request_options_t *options, const char *bucket_name,\n    const char *live_channel);\n\naos_status_t *get_image_info(const oss_request_options_t *options, const char *bucket_name,\n    const char *object_name, image_info_t *info);\n\nchar *gen_test_signed_url(const oss_request_options_t *options, const char *bucket_name,\n    const char *object_name, int64_t expires, aos_http_request_t *req);\n\nunsigned long get_file_size(const char *file_path);\n\nchar *decrypt(const char *encrypted_str, aos_pool_t *pool);\n\nvoid percentage(int64_t consumed_bytes, int64_t total_bytes);\nvoid progress_callback(int64_t consumed_bytes, int64_t total_bytes);\n\nchar * get_text_file_data(aos_pool_t *pool, const char *filepath);\n\n\n\nchar *get_test_file_path();\n\nchar *get_test_bucket_name(aos_pool_t *p, const char* suffix);\n\nvoid set_test_bucket_prefix(const char*prefix);\n\nvoid clean_bucket_by_prefix(const char* prefix);\n\nOSS_CPP_END\n\n#endif\n"
  },
  {
    "path": "oss_c_sdk_test/sample_data.csv",
    "content": "Year,StateAbbr,StateDesc,CityName,GeographicLevel,DataSource,Category,UniqueID,Measure,Data_Value_Unit,DataValueTypeID,Data_Value_Type,Data_Value,Low_Confidence_Limit,High_Confidence_Limit,Data_Value_Footnote_Symbol,Data_Value_Footnote,PopulationCount,GeoLocation,CategoryID,MeasureId,CityFIPS,TractFIPS,Short_Question_Text\n2015,US,United States,,US,BRFSS,Prevention,59,Current lack of health insurance among adults aged 18–64 Years,%,AgeAdjPrv,Age-adjusted prevalence,15.4,15.1,15.7,,,308745538,,PREVENT,ACCESS2,,,Health Insurance\n2015,US,United States,,US,BRFSS,Prevention,59,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,14.8,14.5,15.0,,,308745538,,PREVENT,ACCESS2,,,Health Insurance\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Arthritis among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,22.5,22.3,22.7,,,308745538,,HLTHOUT,ARTHRITIS,,,Arthritis\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,24.7,24.5,24.9,,,308745538,,HLTHOUT,ARTHRITIS,,,Arthritis\n2015,US,United States,,US,BRFSS,Unhealthy Behaviors,59,Binge drinking among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,17.2,16.9,17.4,,,308745538,,UNHBEH,BINGE,,,Binge Drinking\n2015,US,United States,,US,BRFSS,Unhealthy Behaviors,59,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,16.3,16.1,16.5,,,308745538,,UNHBEH,BINGE,,,Binge Drinking\n2015,US,United States,,US,BRFSS,Health Outcomes,59,High blood pressure among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,29.4,29.2,29.7,,,308745538,,HLTHOUT,BPHIGH,,,High Blood Pressure\n2015,US,United States,,US,BRFSS,Health Outcomes,59,High blood pressure among adults aged >=18 Years,%,CrdPrv,Crude prevalence,31.9,31.6,32.2,,,308745538,,HLTHOUT,BPHIGH,,,High Blood Pressure\n2015,US,United States,,US,BRFSS,Prevention,59,Taking medicine for high blood pressure control among adults aged >=18 Years with high blood pressure,%,AgeAdjPrv,Age-adjusted prevalence,57.7,57.1,58.4,,,308745538,,PREVENT,BPMED,,,Taking BP Medication\n2015,US,United States,,US,BRFSS,Prevention,59,Taking medicine for high blood pressure control among adults aged >=18 Years with high blood pressure,%,CrdPrv,Crude prevalence,77.2,76.8,77.7,,,308745538,,PREVENT,BPMED,,,Taking BP Medication\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Cancer (excluding skin cancer) among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,6.0,5.9,6.1,,,308745538,,HLTHOUT,CANCER,,,Cancer (except skin)\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Cancer (excluding skin cancer) among adults aged >=18 Years,%,CrdPrv,Crude prevalence,6.6,6.5,6.8,,,308745538,,HLTHOUT,CANCER,,,Cancer (except skin)\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Current asthma among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,8.7,8.6,8.9,,,308745538,,HLTHOUT,CASTHMA,,,Current Asthma\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Current asthma among adults aged >=18 Years,%,CrdPrv,Crude prevalence,8.8,8.6,9.0,,,308745538,,HLTHOUT,CASTHMA,,,Current Asthma\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Coronary heart disease among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,5.6,5.5,5.8,,,308745538,,HLTHOUT,CHD,,,Coronary Heart Disease\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Coronary heart disease among adults aged >=18 Years,%,CrdPrv,Crude prevalence,6.3,6.2,6.5,,,308745538,,HLTHOUT,CHD,,,Coronary Heart Disease\n2015,US,United States,,US,BRFSS,Prevention,59,Visits to doctor for routine checkup within the past Year among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,68.6,68.3,68.9,,,308745538,,PREVENT,CHECKUP,,,Annual Checkup\n2015,US,United States,,US,BRFSS,Prevention,59,Visits to doctor for routine checkup within the past Year among adults aged >=18 Years,%,CrdPrv,Crude prevalence,70.0,69.7,70.3,,,308745538,,PREVENT,CHECKUP,,,Annual Checkup\n2015,US,United States,,US,BRFSS,Prevention,59,Cholesterol screening among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,75.2,74.9,75.5,,,308745538,,PREVENT,CHOLSCREEN,,,Cholesterol Screening\n2015,US,United States,,US,BRFSS,Prevention,59,Cholesterol screening among adults aged >=18 Years,%,CrdPrv,Crude prevalence,77.0,76.7,77.3,,,308745538,,PREVENT,CHOLSCREEN,,,Cholesterol Screening\n2014,US,United States,,US,BRFSS,Prevention,59,\"Fecal occult blood test, sigmoidoscopy, or colonoscopy among adults aged 50–75 Years\",%,AgeAdjPrv,Age-adjusted prevalence,64.0,63.5,64.5,,,308745538,,PREVENT,COLON_SCREEN,,,Colorectal Cancer Screening\n2014,US,United States,,US,BRFSS,Prevention,59,\"Fecal occult blood test, sigmoidoscopy, or colonoscopy among adults aged 50–75 Years\",%,CrdPrv,Crude prevalence,63.7,63.3,64.1,,,308745538,,PREVENT,COLON_SCREEN,,,Colorectal Cancer Screening\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Chronic obstructive pulmonary disease among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,5.7,5.6,5.9,,,308745538,,HLTHOUT,COPD,,,COPD\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Chronic obstructive pulmonary disease among adults aged >=18 Years,%,CrdPrv,Crude prevalence,6.3,6.2,6.4,,,308745538,,HLTHOUT,COPD,,,COPD\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Physical health not good for >=14 days among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,11.5,11.3,11.7,,,308745538,,HLTHOUT,PHLTH,,,Physical Health\n2014,US,United States,,US,BRFSS,Prevention,59,\"Older adult men aged >=65 Years who are up to date on a core set of clinical preventive services: Flu shot past Year, PPV shot ever, Colorectal cancer screening\",%,AgeAdjPrv,Age-adjusted prevalence,32.9,32.1,33.6,,,308745538,,PREVENT,COREM,,,Core preventive services for older men\n2014,US,United States,,US,BRFSS,Prevention,59,\"Older adult men aged >=65 Years who are up to date on a core set of clinical preventive services: Flu shot past Year, PPV shot ever, Colorectal cancer screening\",%,CrdPrv,Crude prevalence,32.3,31.5,33.0,,,308745538,,PREVENT,COREM,,,Core preventive services for older men\n2014,US,United States,,US,BRFSS,Prevention,59,\"Older adult women aged >=65 Years who are up to date on a core set of clinical preventive services: Flu shot past Year, PPV shot ever, Colorectal cancer screening, and Mammogram past 2 Years\",%,AgeAdjPrv,Age-adjusted prevalence,30.7,30.2,31.4,,,308745538,,PREVENT,COREW,,,Core preventive services for older women\n2014,US,United States,,US,BRFSS,Prevention,59,\"Older adult women aged >=65 Years who are up to date on a core set of clinical preventive services: Flu shot past Year, PPV shot ever, Colorectal cancer screening, and Mammogram past 2 Years\",%,CrdPrv,Crude prevalence,30.7,30.1,31.3,,,308745538,,PREVENT,COREW,,,Core preventive services for older women\n2015,US,United States,,US,BRFSS,Unhealthy Behaviors,59,Current smoking among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,17.1,16.8,17.3,,,308745538,,UNHBEH,CSMOKING,,,Current Smoking\n2015,US,United States,,US,BRFSS,Unhealthy Behaviors,59,Current smoking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,16.8,16.6,17.0,,,308745538,,UNHBEH,CSMOKING,,,Current Smoking\n2014,US,United States,,US,BRFSS,Prevention,59,Visits to dentist or dental clinic among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,64.1,63.8,64.4,,,308745538,,PREVENT,DENTAL,,,Dental Visit\n2014,US,United States,,US,BRFSS,Prevention,59,Visits to dentist or dental clinic among adults aged >=18 Years,%,CrdPrv,Crude prevalence,64.4,64.1,64.7,,,308745538,,PREVENT,DENTAL,,,Dental Visit\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Diagnosed diabetes among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,9.3,9.2,9.5,,,308745538,,HLTHOUT,DIABETES,,,Diabetes\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Diagnosed diabetes among adults aged >=18 Years,%,CrdPrv,Crude prevalence,10.4,10.3,10.6,,,308745538,,HLTHOUT,DIABETES,,,Diabetes\n2015,US,United States,,US,BRFSS,Health Outcomes,59,High cholesterol among adults aged >=18 Years who have been screened in the past 5 Years,%,AgeAdjPrv,Age-adjusted prevalence,31.1,30.8,31.4,,,308745538,,HLTHOUT,HIGHCHOL,,,High Cholesterol\n2015,US,United States,,US,BRFSS,Health Outcomes,59,High cholesterol among adults aged >=18 Years who have been screened in the past 5 Years,%,CrdPrv,Crude prevalence,37.1,36.8,37.4,,,308745538,,HLTHOUT,HIGHCHOL,,,High Cholesterol\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Chronic kidney disease among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,2.5,2.4,2.6,,,308745538,,HLTHOUT,KIDNEY,,,Chronic Kidney Disease\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Chronic kidney disease among adults aged >=18 Years,%,CrdPrv,Crude prevalence,2.7,2.6,2.8,,,308745538,,HLTHOUT,KIDNEY,,,Chronic Kidney Disease\n2015,US,United States,,US,BRFSS,Unhealthy Behaviors,59,No leisure-time physical activity among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,25.5,25.2,25.8,,,308745538,,UNHBEH,LPA,,,Physical Inactivity\n2015,US,United States,,US,BRFSS,Unhealthy Behaviors,59,No leisure-time physical activity among adults aged >=18 Years,%,CrdPrv,Crude prevalence,25.9,25.6,26.1,,,308745538,,UNHBEH,LPA,,,Physical Inactivity\n2014,US,United States,,US,BRFSS,Prevention,59,Mammography use among women aged 50–74 Years,%,AgeAdjPrv,Age-adjusted prevalence,75.5,75.1,75.9,,,308745538,,PREVENT,MAMMOUSE,,,Mammography\n2014,US,United States,,US,BRFSS,Prevention,59,Mammography use among women aged 50–74 Years,%,CrdPrv,Crude prevalence,75.8,75.4,76.2,,,308745538,,PREVENT,MAMMOUSE,,,Mammography\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Mental health not good for >=14 days among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,11.6,11.4,11.8,,,308745538,,HLTHOUT,MHLTH,,,Mental Health\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Mental health not good for >=14 days among adults aged >=18 Years,%,CrdPrv,Crude prevalence,11.4,11.3,11.6,,,308745538,,HLTHOUT,MHLTH,,,Mental Health\n2015,US,United States,,US,BRFSS,Unhealthy Behaviors,59,Obesity among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,28.7,28.4,29.0,,,308745538,,UNHBEH,OBESITY,,,Obesity\n2015,US,United States,,US,BRFSS,Unhealthy Behaviors,59,Obesity among adults aged >=18 Years,%,CrdPrv,Crude prevalence,28.8,28.6,29.1,,,308745538,,UNHBEH,OBESITY,,,Obesity\n2014,US,United States,,US,BRFSS,Prevention,59,Papanicolaou smear use among adult women aged 21–65 Years,%,AgeAdjPrv,Age-adjusted prevalence,81.1,80.6,81.6,,,308745538,,PREVENT,PAPTEST,,,Pap Smear Test\n2014,US,United States,,US,BRFSS,Prevention,59,Papanicolaou smear use among adult women aged 21–65 Years,%,CrdPrv,Crude prevalence,81.8,81.3,82.2,,,308745538,,PREVENT,PAPTEST,,,Pap Smear Test\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Physical health not good for >=14 days among adults aged >=18 Years,%,CrdPrv,Crude prevalence,12.0,11.8,12.2,,,308745538,,HLTHOUT,PHLTH,,,Physical Health\n2014,US,United States,,US,BRFSS,Unhealthy Behaviors,59,Sleeping less than 7 hours among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,35.1,34.8,35.5,,,308745538,,UNHBEH,SLEEP,,,Sleep < 7 hours\n2014,US,United States,,US,BRFSS,Unhealthy Behaviors,59,Sleeping less than 7 hours among adults aged >=18 Years,%,CrdPrv,Crude prevalence,34.8,34.5,35.1,,,308745538,,UNHBEH,SLEEP,,,Sleep < 7 hours\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Stroke among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,2.8,2.7,2.8,,,308745538,,HLTHOUT,STROKE,,,Stroke\n2015,US,United States,,US,BRFSS,Health Outcomes,59,Stroke among adults aged >=18 Years,%,CrdPrv,Crude prevalence,3.0,3.0,3.1,,,308745538,,HLTHOUT,STROKE,,,Stroke\n2014,US,United States,,US,BRFSS,Health Outcomes,59,All teeth lost among adults aged >=65 Years,%,AgeAdjPrv,Age-adjusted prevalence,15.4,15.0,15.8,,,308745538,,HLTHOUT,TEETHLOST,,,Teeth Loss\n2014,US,United States,,US,BRFSS,Health Outcomes,59,All teeth lost among adults aged >=65 Years,%,CrdPrv,Crude prevalence,14.9,14.6,15.3,,,308745538,,HLTHOUT,TEETHLOST,,,Teeth Loss\n2015,AL,Alabama,Birmingham,City,BRFSS,Prevention,0107000,Current lack of health insurance among adults aged 18–64 Years,%,AgeAdjPrv,Age-adjusted prevalence,19.8,19.5,20.2,,,212237,\"(33.5275663773, -86.7988174678)\",PREVENT,ACCESS2,0107000,,Health Insurance\n2015,AL,Alabama,Birmingham,City,BRFSS,Prevention,0107000,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,19.6,19.2,20.0,,,212237,\"(33.5275663773, -86.7988174678)\",PREVENT,ACCESS2,0107000,,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073000100,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,23.9,21.2,27.2,,,3042,\"(33.5794328326, -86.7228323926)\",PREVENT,ACCESS2,0107000,01073000100,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073000300,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,28.8,25.4,32.4,,,2735,\"(33.5428208686, -86.752433978)\",PREVENT,ACCESS2,0107000,01073000300,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073000400,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,26.1,22.6,29.9,,,3338,\"(33.5632449633, -86.7640474064)\",PREVENT,ACCESS2,0107000,01073000400,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073000500,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,28.1,24.6,32.0,,,2864,\"(33.5442404594, -86.7749130719)\",PREVENT,ACCESS2,0107000,01073000500,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073000700,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,31.8,27.0,36.7,,,2577,\"(33.5525406139, -86.8016893706)\",PREVENT,ACCESS2,0107000,01073000700,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073000800,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,22.4,19.1,26.1,,,3859,\"(33.549697789, -86.8330944744)\",PREVENT,ACCESS2,0107000,01073000800,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073001100,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,16.8,13.7,20.5,,,5354,\"(33.5429143325, -86.8756782852)\",PREVENT,ACCESS2,0107000,01073001100,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073001200,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,24.6,22.2,27.2,,,2876,\"(33.5278767706, -86.8604161686)\",PREVENT,ACCESS2,0107000,01073001200,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073001400,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,22.0,18.4,25.7,,,2181,\"(33.5261497258, -86.835146606)\",PREVENT,ACCESS2,0107000,01073001400,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073001500,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,26.3,23.1,29.4,,,3189,\"(33.5298727342, -86.8197191685)\",PREVENT,ACCESS2,0107000,01073001500,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073001600,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,26.8,22.9,30.8,,,3390,\"(33.5372993423, -86.8036590482)\",PREVENT,ACCESS2,0107000,01073001600,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073001902,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,26.9,24.1,29.8,,,1894,\"(33.5532050997, -86.7429801603)\",PREVENT,ACCESS2,0107000,01073001902,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073002000,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,24.4,20.8,28.2,,,3885,\"(33.5541574106, -86.7167229915)\",PREVENT,ACCESS2,0107000,01073002000,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073002100,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,21.5,18.1,25.0,,,3186,\"(33.5650015942, -86.7101024766)\",PREVENT,ACCESS2,0107000,01073002100,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073002200,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,21.7,18.7,25.0,,,2630,\"(33.5521301205, -86.7276759508)\",PREVENT,ACCESS2,0107000,01073002200,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073002303,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,27.0,23.7,30.7,,,2936,\"(33.5383153207, -86.7270445428)\",PREVENT,ACCESS2,0107000,01073002303,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073002305,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,9.9,8.2,12.1,,,2952,\"(33.5333415976, -86.7479566084)\",PREVENT,ACCESS2,0107000,01073002305,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073002306,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,9.5,8.1,11.2,,,3257,\"(33.5213873564, -86.7490031289)\",PREVENT,ACCESS2,0107000,01073002306,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073002400,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,25.1,22.4,27.8,,,3629,\"(33.5260748309, -86.7830315488)\",PREVENT,ACCESS2,0107000,01073002400,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073002700,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,20.7,16.8,24.9,,,3992,\"(33.5176008419, -86.8106887452)\",PREVENT,ACCESS2,0107000,01073002700,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073002900,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,25.7,21.5,29.9,,,2064,\"(33.5132498864, -86.83004749)\",PREVENT,ACCESS2,0107000,01073002900,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073003001,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,18.4,15.3,22.4,,,3779,\"(33.5125158094, -86.8577164946)\",PREVENT,ACCESS2,0107000,01073003001,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073003002,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,26.3,21.7,31.3,,,2203,\"(33.512258109, -86.8441439907)\",PREVENT,ACCESS2,0107000,01073003002,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073003100,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,23.2,20.2,26.7,,,3637,\"(33.5059655756, -86.8745506086)\",PREVENT,ACCESS2,0107000,01073003100,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073003200,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,28.7,25.0,32.8,,,931,\"(33.5094018502, -86.8859081961)\",PREVENT,ACCESS2,0107000,01073003200,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073003300,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,22.2,19.1,25.7,,,947,\"(33.5171261108, -86.8913819749)\",PREVENT,ACCESS2,0107000,01073003300,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073003400,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,26.8,23.0,30.9,,,2477,\"(33.5052229234, -86.9014844656)\",PREVENT,ACCESS2,0107000,01073003400,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073003500,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,22.3,19.1,25.7,,,2780,\"(33.5065714011, -86.9195910063)\",PREVENT,ACCESS2,0107000,01073003500,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073003600,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,17.0,14.5,19.6,,,4683,\"(33.48476397, -86.8981392947)\",PREVENT,ACCESS2,0107000,01073003600,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073003700,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,21.6,19.2,23.9,,,5063,\"(33.4969018589, -86.8907729426)\",PREVENT,ACCESS2,0107000,01073003700,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073003802,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,19.0,16.7,21.6,,,5409,\"(33.4785707794, -86.890000907)\",PREVENT,ACCESS2,0107000,01073003802,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073003803,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,20.9,17.7,24.2,,,4199,\"(33.485945214, -86.869692186)\",PREVENT,ACCESS2,0107000,01073003803,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073003900,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,29.9,26.9,33.0,,,1783,\"(33.4989959327, -86.8647600038)\",PREVENT,ACCESS2,0107000,01073003900,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073004000,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,25.8,21.4,30.3,,,3772,\"(33.4953246015, -86.8516232073)\",PREVENT,ACCESS2,0107000,01073004000,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073004200,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,23.4,20.8,26.1,,,2341,\"(33.5007439361, -86.8270720379)\",PREVENT,ACCESS2,0107000,01073004200,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073004500,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,22.7,19.3,27.4,,,5003,\"(33.5041857556, -86.8033798346)\",PREVENT,ACCESS2,0107000,01073004500,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073004701,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,10.6,8.6,13.4,,,3480,\"(33.5075242148, -86.7836675838)\",PREVENT,ACCESS2,0107000,01073004701,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073004702,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,7.1,6.1,8.7,,,2944,\"(33.5119902661, -86.7694550989)\",PREVENT,ACCESS2,0107000,01073004702,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073004800,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,8.7,7.3,10.3,,,1861,\"(33.4989064008, -86.78269914)\",PREVENT,ACCESS2,0107000,01073004800,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073004901,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,11.0,9.1,13.2,,,1167,\"(33.4971595645, -86.7917440668)\",PREVENT,ACCESS2,0107000,01073004901,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073004902,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,15.2,12.5,18.5,,,3146,\"(33.4935824043, -86.8009294603)\",PREVENT,ACCESS2,0107000,01073004902,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005000,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,17.9,15.4,20.7,,,3482,\"(33.4866689795, -86.8173262831)\",PREVENT,ACCESS2,0107000,01073005000,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005101,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,30.5,26.5,34.4,,,1507,\"(33.4945909008, -86.834763936)\",PREVENT,ACCESS2,0107000,01073005101,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005103,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,17.5,14.4,20.7,,,2587,\"(33.485714885, -86.8327817467)\",PREVENT,ACCESS2,0107000,01073005103,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005104,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,24.9,21.3,28.9,,,2881,\"(33.4749941816, -86.8335421747)\",PREVENT,ACCESS2,0107000,01073005104,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005200,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,20.2,16.4,24.2,,,3740,\"(33.4806708775, -86.8508671514)\",PREVENT,ACCESS2,0107000,01073005200,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005302,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,12.8,10.9,15.1,,,3463,\"(33.5766456449, -86.6965590316)\",PREVENT,ACCESS2,0107000,01073005302,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005500,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,26.5,22.9,30.7,,,1824,\"(33.5670293898, -86.8005567213)\",PREVENT,ACCESS2,0107000,01073005500,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005600,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,12.3,10.0,15.0,,,4367,\"(33.5200981234, -86.7272063198)\",PREVENT,ACCESS2,0107000,01073005600,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005701,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,18.9,15.7,22.3,,,2372,\"(33.4629543329, -86.8898406628)\",PREVENT,ACCESS2,0107000,01073005701,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005702,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,19.8,16.4,23.3,,,3413,\"(33.4698691385, -86.874290602)\",PREVENT,ACCESS2,0107000,01073005702,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005800,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,19.3,16.4,22.3,,,4216,\"(33.479062325, -86.8128063089)\",PREVENT,ACCESS2,0107000,01073005800,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005903,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,15.9,13.9,18.0,,,4933,\"(33.597162309, -86.6766736351)\",PREVENT,ACCESS2,0107000,01073005903,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005905,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,21.4,18.2,24.7,,,5039,\"(33.603988456, -86.7008123418)\",PREVENT,ACCESS2,0107000,01073005905,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005907,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,12.5,10.3,14.9,,,1975,\"(33.6142861501, -86.6691996417)\",PREVENT,ACCESS2,0107000,01073005907,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005908,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,20.9,18.1,23.7,,,1621,\"(33.6182924432, -86.6801483084)\",PREVENT,ACCESS2,0107000,01073005908,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005909,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,14.4,11.8,17.5,,,2524,\"(33.611811773, -86.7214221514)\",PREVENT,ACCESS2,0107000,01073005909,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073005910,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,14.7,12.6,17.1,,,4612,\"(33.6299017499, -86.7194311229)\",PREVENT,ACCESS2,0107000,01073005910,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073010500,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,21.8,18.2,25.9,,,114,\"(33.4363786806, -86.9128923072)\",PREVENT,ACCESS2,0107000,01073010500,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073010701,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,18.5,14.4,23.6,,,74,\"(33.473886155, -86.8146487762)\",PREVENT,ACCESS2,0107000,01073010701,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073010706,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,13.5,11.0,16.3,,,1528,\"(33.4443709442, -86.8405352645)\",PREVENT,ACCESS2,0107000,01073010706,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073010801,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,5.2,4.4,6.3,,,168,\"(33.514097853, -86.7466971362)\",PREVENT,ACCESS2,0107000,01073010801,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073010802,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,5.0,3.9,6.5,,,172,\"(33.4885493477, -86.780843024)\",PREVENT,ACCESS2,0107000,01073010802,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073010803,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,11.3,9.0,14.0,,,514,\"(33.5229093892, -86.7102618642)\",PREVENT,ACCESS2,0107000,01073010803,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073010805,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,7.3,5.5,9.9,,,86,\"(33.4952792472, -86.6987184974)\",PREVENT,ACCESS2,0107000,01073010805,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073011104,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,13.6,11.4,16.1,,,1688,\"(33.6159436433, -86.6557892507)\",PREVENT,ACCESS2,0107000,01073011104,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073011107,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,42,\"(33.5804845249, -86.6301110961)\",PREVENT,ACCESS2,0107000,01073011107,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073011108,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,9,\"(33.6050742596, -86.6316729386)\",PREVENT,ACCESS2,0107000,01073011108,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073011207,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,17.7,15.1,20.6,,,815,\"(33.6718848706, -86.6772510465)\",PREVENT,ACCESS2,0107000,01073011207,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073011209,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,20.2,17.2,24.2,,,1062,\"(33.6557189992, -86.7050698349)\",PREVENT,ACCESS2,0107000,01073011209,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073011210,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,21.5,17.0,26.7,,,1385,\"(33.6641893755, -86.6956170686)\",PREVENT,ACCESS2,0107000,01073011210,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073011803,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,18.1,15.4,21.3,,,928,\"(33.6252575173, -86.6998610409)\",PREVENT,ACCESS2,0107000,01073011803,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073011804,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,18.3,15.2,21.9,,,1157,\"(33.6474916175, -86.7042974424)\",PREVENT,ACCESS2,0107000,01073011804,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073011901,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,6,\"(33.6355414646, -86.736946691)\",PREVENT,ACCESS2,0107000,01073011901,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073011904,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,14.4,12.1,16.8,,,1915,\"(33.593140185, -86.7357930541)\",PREVENT,ACCESS2,0107000,01073011904,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012001,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,14.5,12.5,16.7,,,304,\"(33.5919486112, -86.864384068)\",PREVENT,ACCESS2,0107000,01073012001,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012002,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,44,\"(33.5859234197, -86.8357007188)\",PREVENT,ACCESS2,0107000,01073012002,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012200,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,23,\"(33.5967441904, -87.0879396857)\",PREVENT,ACCESS2,0107000,01073012200,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012302,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,12.7,10.6,15.2,,,144,\"(33.5542816352, -87.0544691416)\",PREVENT,ACCESS2,0107000,01073012302,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012305,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,12.5,10.2,15.1,,,403,\"(33.4695358064, -86.96831739)\",PREVENT,ACCESS2,0107000,01073012305,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012401,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,11.4,8.9,14.2,,,1066,\"(33.5571951048, -86.8777935049)\",PREVENT,ACCESS2,0107000,01073012401,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012402,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,16.7,14.6,19.0,,,418,\"(33.549984172, -86.8994543327)\",PREVENT,ACCESS2,0107000,01073012402,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012500,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,21.0,17.6,24.4,,,410,\"(33.529160486, -86.9346476445)\",PREVENT,ACCESS2,0107000,01073012500,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012602,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,17.5,15.7,19.6,,,371,\"(33.570164674, -86.666430582)\",PREVENT,ACCESS2,0107000,01073012602,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012701,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,44,\"(33.5484078071, -86.6323773455)\",PREVENT,ACCESS2,0107000,01073012701,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012703,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,11.3,8.6,14.9,,,498,\"(33.4681180943, -86.6671888213)\",PREVENT,ACCESS2,0107000,01073012703,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012704,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,8.9,6.8,11.5,,,113,\"(33.5034195908, -86.6180983403)\",PREVENT,ACCESS2,0107000,01073012704,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012803,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,8.6,6.7,11.2,,,1261,\"(33.4439425865, -86.7212936938)\",PREVENT,ACCESS2,0107000,01073012803,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073012910,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,9,\"(33.4345805042, -86.7263292059)\",PREVENT,ACCESS2,0107000,01073012910,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073013002,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,21.3,17.1,25.6,,,1514,\"(33.46604181, -86.8567287797)\",PREVENT,ACCESS2,0107000,01073013002,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073013100,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,21.8,18.8,24.9,,,4424,\"(33.44880214, -86.8878401579)\",PREVENT,ACCESS2,0107000,01073013100,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073013300,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,23.5,19.5,27.5,,,1782,\"(33.4396443569, -86.9248768665)\",PREVENT,ACCESS2,0107000,01073013300,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073013901,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,18.0,14.8,21.7,,,952,\"(33.4729384906, -86.9547337648)\",PREVENT,ACCESS2,0107000,01073013901,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073014302,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,10.0,8.3,12.1,,,2778,\"(33.4244658829, -86.8841474217)\",PREVENT,ACCESS2,0107000,01073014302,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01073014413,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,7.6,5.9,9.8,,,397,\"(33.4226593117, -86.8508620751)\",PREVENT,ACCESS2,0107000,01073014413,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01117030213,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,9.3,7.7,11.4,,,644,\"(33.4395975193, -86.6735959359)\",PREVENT,ACCESS2,0107000,01117030213,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01117030217,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,16,\"(33.4556995763, -86.6520208639)\",PREVENT,ACCESS2,0107000,01117030217,Health Insurance\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Prevention,0107000-01117030303,Current lack of health insurance among adults aged 18–64 Years,%,CrdPrv,Crude prevalence,9.9,8.1,12.0,,,968,\"(33.4258661239, -86.713819356)\",PREVENT,ACCESS2,0107000,01117030303,Health Insurance\n2015,AL,Alabama,Birmingham,City,BRFSS,Health Outcomes,0107000,Arthritis among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,31.0,30.8,31.1,,,212237,\"(33.5275663773, -86.7988174678)\",HLTHOUT,ARTHRITIS,0107000,,Arthritis\n2015,AL,Alabama,Birmingham,City,BRFSS,Health Outcomes,0107000,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,30.9,30.8,31.1,,,212237,\"(33.5275663773, -86.7988174678)\",HLTHOUT,ARTHRITIS,0107000,,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073000100,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,32.5,31.5,33.6,,,3042,\"(33.5794328326, -86.7228323926)\",HLTHOUT,ARTHRITIS,0107000,01073000100,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073000300,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,31.3,30.0,32.4,,,2735,\"(33.5428208686, -86.752433978)\",HLTHOUT,ARTHRITIS,0107000,01073000300,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073000400,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,34.6,33.2,35.9,,,3338,\"(33.5632449633, -86.7640474064)\",HLTHOUT,ARTHRITIS,0107000,01073000400,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073000500,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,37.8,36.3,39.2,,,2864,\"(33.5442404594, -86.7749130719)\",HLTHOUT,ARTHRITIS,0107000,01073000500,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073000700,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,38.5,37.1,39.9,,,2577,\"(33.5525406139, -86.8016893706)\",HLTHOUT,ARTHRITIS,0107000,01073000700,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073000800,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,38.0,36.5,39.3,,,3859,\"(33.549697789, -86.8330944744)\",HLTHOUT,ARTHRITIS,0107000,01073000800,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073001100,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,34.0,32.4,35.5,,,5354,\"(33.5429143325, -86.8756782852)\",HLTHOUT,ARTHRITIS,0107000,01073001100,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073001200,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,36.5,35.4,37.6,,,2876,\"(33.5278767706, -86.8604161686)\",HLTHOUT,ARTHRITIS,0107000,01073001200,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073001400,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,37.1,35.6,38.6,,,2181,\"(33.5261497258, -86.835146606)\",HLTHOUT,ARTHRITIS,0107000,01073001400,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073001500,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,35.2,34.0,36.4,,,3189,\"(33.5298727342, -86.8197191685)\",HLTHOUT,ARTHRITIS,0107000,01073001500,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073001600,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,39.9,38.4,41.3,,,3390,\"(33.5372993423, -86.8036590482)\",HLTHOUT,ARTHRITIS,0107000,01073001600,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073001902,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,35.1,34.0,36.1,,,1894,\"(33.5532050997, -86.7429801603)\",HLTHOUT,ARTHRITIS,0107000,01073001902,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073002000,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,36.3,34.9,37.7,,,3885,\"(33.5541574106, -86.7167229915)\",HLTHOUT,ARTHRITIS,0107000,01073002000,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073002100,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,33.1,31.8,34.3,,,3186,\"(33.5650015942, -86.7101024766)\",HLTHOUT,ARTHRITIS,0107000,01073002100,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073002200,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,32.4,31.2,33.6,,,2630,\"(33.5521301205, -86.7276759508)\",HLTHOUT,ARTHRITIS,0107000,01073002200,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073002303,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,33.4,32.2,34.6,,,2936,\"(33.5383153207, -86.7270445428)\",HLTHOUT,ARTHRITIS,0107000,01073002303,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073002305,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,22.3,21.3,23.3,,,2952,\"(33.5333415976, -86.7479566084)\",HLTHOUT,ARTHRITIS,0107000,01073002305,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073002306,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,26.9,25.9,27.9,,,3257,\"(33.5213873564, -86.7490031289)\",HLTHOUT,ARTHRITIS,0107000,01073002306,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073002400,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,31.0,30.0,31.9,,,3629,\"(33.5260748309, -86.7830315488)\",HLTHOUT,ARTHRITIS,0107000,01073002400,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073002700,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,27.2,25.9,28.5,,,3992,\"(33.5176008419, -86.8106887452)\",HLTHOUT,ARTHRITIS,0107000,01073002700,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073002900,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,38.7,37.0,40.3,,,2064,\"(33.5132498864, -86.83004749)\",HLTHOUT,ARTHRITIS,0107000,01073002900,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073003001,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,24.3,23.6,25.0,,,3779,\"(33.5125158094, -86.8577164946)\",HLTHOUT,ARTHRITIS,0107000,01073003001,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073003002,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,40.9,39.1,42.7,,,2203,\"(33.512258109, -86.8441439907)\",HLTHOUT,ARTHRITIS,0107000,01073003002,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073003100,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,34.1,32.7,35.4,,,3637,\"(33.5059655756, -86.8745506086)\",HLTHOUT,ARTHRITIS,0107000,01073003100,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073003200,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,39.0,37.6,40.3,,,931,\"(33.5094018502, -86.8859081961)\",HLTHOUT,ARTHRITIS,0107000,01073003200,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073003300,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,38.6,37.3,39.9,,,947,\"(33.5171261108, -86.8913819749)\",HLTHOUT,ARTHRITIS,0107000,01073003300,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073003400,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,36.3,34.9,37.7,,,2477,\"(33.5052229234, -86.9014844656)\",HLTHOUT,ARTHRITIS,0107000,01073003400,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073003500,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,32.8,31.5,34.0,,,2780,\"(33.5065714011, -86.9195910063)\",HLTHOUT,ARTHRITIS,0107000,01073003500,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073003600,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,33.4,32.1,34.7,,,4683,\"(33.48476397, -86.8981392947)\",HLTHOUT,ARTHRITIS,0107000,01073003600,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073003700,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,31.2,30.1,32.1,,,5063,\"(33.4969018589, -86.8907729426)\",HLTHOUT,ARTHRITIS,0107000,01073003700,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073003802,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,32.1,31.0,33.2,,,5409,\"(33.4785707794, -86.890000907)\",HLTHOUT,ARTHRITIS,0107000,01073003802,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073003803,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,36.0,34.5,37.3,,,4199,\"(33.485945214, -86.869692186)\",HLTHOUT,ARTHRITIS,0107000,01073003803,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073003900,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,32.9,31.8,33.9,,,1783,\"(33.4989959327, -86.8647600038)\",HLTHOUT,ARTHRITIS,0107000,01073003900,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073004000,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,37.8,36.4,39.3,,,3772,\"(33.4953246015, -86.8516232073)\",HLTHOUT,ARTHRITIS,0107000,01073004000,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073004200,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,36.6,35.5,37.7,,,2341,\"(33.5007439361, -86.8270720379)\",HLTHOUT,ARTHRITIS,0107000,01073004200,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073004500,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,15.1,14.4,15.8,,,5003,\"(33.5041857556, -86.8033798346)\",HLTHOUT,ARTHRITIS,0107000,01073004500,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073004701,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,23.7,22.5,24.9,,,3480,\"(33.5075242148, -86.7836675838)\",HLTHOUT,ARTHRITIS,0107000,01073004701,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073004702,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,27.0,25.9,28.1,,,2944,\"(33.5119902661, -86.7694550989)\",HLTHOUT,ARTHRITIS,0107000,01073004702,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073004800,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,30.1,29.0,31.2,,,1861,\"(33.4989064008, -86.78269914)\",HLTHOUT,ARTHRITIS,0107000,01073004800,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073004901,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,22.1,21.2,23.0,,,1167,\"(33.4971595645, -86.7917440668)\",HLTHOUT,ARTHRITIS,0107000,01073004901,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073004902,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,18.4,17.5,19.4,,,3146,\"(33.4935824043, -86.8009294603)\",HLTHOUT,ARTHRITIS,0107000,01073004902,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005000,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,19.6,18.7,20.4,,,3482,\"(33.4866689795, -86.8173262831)\",HLTHOUT,ARTHRITIS,0107000,01073005000,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005101,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,36.6,35.3,37.8,,,1507,\"(33.4945909008, -86.834763936)\",HLTHOUT,ARTHRITIS,0107000,01073005101,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005103,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,40.1,38.6,41.7,,,2587,\"(33.485714885, -86.8327817467)\",HLTHOUT,ARTHRITIS,0107000,01073005103,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005104,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,18.9,18.0,19.8,,,2881,\"(33.4749941816, -86.8335421747)\",HLTHOUT,ARTHRITIS,0107000,01073005104,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005200,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,37.9,36.1,39.7,,,3740,\"(33.4806708775, -86.8508671514)\",HLTHOUT,ARTHRITIS,0107000,01073005200,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005302,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,33.2,31.8,34.5,,,3463,\"(33.5766456449, -86.6965590316)\",HLTHOUT,ARTHRITIS,0107000,01073005302,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005500,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,36.7,35.4,37.9,,,1824,\"(33.5670293898, -86.8005567213)\",HLTHOUT,ARTHRITIS,0107000,01073005500,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005600,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,31.8,30.3,33.2,,,4367,\"(33.5200981234, -86.7272063198)\",HLTHOUT,ARTHRITIS,0107000,01073005600,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005701,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,35.8,34.1,37.3,,,2372,\"(33.4629543329, -86.8898406628)\",HLTHOUT,ARTHRITIS,0107000,01073005701,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005702,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,37.8,36.0,39.3,,,3413,\"(33.4698691385, -86.874290602)\",HLTHOUT,ARTHRITIS,0107000,01073005702,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005800,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,18.4,17.7,19.1,,,4216,\"(33.479062325, -86.8128063089)\",HLTHOUT,ARTHRITIS,0107000,01073005800,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005903,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,32.2,31.1,33.3,,,4933,\"(33.597162309, -86.6766736351)\",HLTHOUT,ARTHRITIS,0107000,01073005903,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005905,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,34.2,32.9,35.4,,,5039,\"(33.603988456, -86.7008123418)\",HLTHOUT,ARTHRITIS,0107000,01073005905,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005907,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,30.1,28.9,31.3,,,1975,\"(33.6142861501, -86.6691996417)\",HLTHOUT,ARTHRITIS,0107000,01073005907,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005908,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,32.5,31.5,33.5,,,1621,\"(33.6182924432, -86.6801483084)\",HLTHOUT,ARTHRITIS,0107000,01073005908,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005909,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,28.0,26.5,29.4,,,2524,\"(33.611811773, -86.7214221514)\",HLTHOUT,ARTHRITIS,0107000,01073005909,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073005910,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,28.0,26.8,29.1,,,4612,\"(33.6299017499, -86.7194311229)\",HLTHOUT,ARTHRITIS,0107000,01073005910,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073010500,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,41.3,39.4,43.1,,,114,\"(33.4363786806, -86.9128923072)\",HLTHOUT,ARTHRITIS,0107000,01073010500,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073010701,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,15.1,14.0,16.3,,,74,\"(33.473886155, -86.8146487762)\",HLTHOUT,ARTHRITIS,0107000,01073010701,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073010706,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,15.3,14.6,16.0,,,1528,\"(33.4443709442, -86.8405352645)\",HLTHOUT,ARTHRITIS,0107000,01073010706,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073010801,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,24.9,23.9,26.2,,,168,\"(33.514097853, -86.7466971362)\",HLTHOUT,ARTHRITIS,0107000,01073010801,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073010802,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,33.2,31.7,35.0,,,172,\"(33.4885493477, -86.780843024)\",HLTHOUT,ARTHRITIS,0107000,01073010802,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073010803,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,23.8,22.6,25.0,,,514,\"(33.5229093892, -86.7102618642)\",HLTHOUT,ARTHRITIS,0107000,01073010803,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073010805,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,32.0,30.1,34.0,,,86,\"(33.4952792472, -86.6987184974)\",HLTHOUT,ARTHRITIS,0107000,01073010805,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073011104,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,29.8,28.5,31.1,,,1688,\"(33.6159436433, -86.6557892507)\",HLTHOUT,ARTHRITIS,0107000,01073011104,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073011107,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,42,\"(33.5804845249, -86.6301110961)\",HLTHOUT,ARTHRITIS,0107000,01073011107,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073011108,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,9,\"(33.6050742596, -86.6316729386)\",HLTHOUT,ARTHRITIS,0107000,01073011108,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073011207,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,25.3,24.3,26.2,,,815,\"(33.6718848706, -86.6772510465)\",HLTHOUT,ARTHRITIS,0107000,01073011207,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073011209,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,27.2,26.1,28.3,,,1062,\"(33.6557189992, -86.7050698349)\",HLTHOUT,ARTHRITIS,0107000,01073011209,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073011210,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,23.8,22.3,25.3,,,1385,\"(33.6641893755, -86.6956170686)\",HLTHOUT,ARTHRITIS,0107000,01073011210,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073011803,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,28.2,27.0,29.4,,,928,\"(33.6252575173, -86.6998610409)\",HLTHOUT,ARTHRITIS,0107000,01073011803,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073011804,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,25.8,24.6,27.0,,,1157,\"(33.6474916175, -86.7042974424)\",HLTHOUT,ARTHRITIS,0107000,01073011804,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073011901,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,6,\"(33.6355414646, -86.736946691)\",HLTHOUT,ARTHRITIS,0107000,01073011901,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073011904,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,34.8,33.3,36.3,,,1915,\"(33.593140185, -86.7357930541)\",HLTHOUT,ARTHRITIS,0107000,01073011904,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012001,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,44.8,42.9,46.6,,,304,\"(33.5919486112, -86.864384068)\",HLTHOUT,ARTHRITIS,0107000,01073012001,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012002,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,44,\"(33.5859234197, -86.8357007188)\",HLTHOUT,ARTHRITIS,0107000,01073012002,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012200,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,23,\"(33.5967441904, -87.0879396857)\",HLTHOUT,ARTHRITIS,0107000,01073012200,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012302,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,26.3,25.2,27.5,,,144,\"(33.5542816352, -87.0544691416)\",HLTHOUT,ARTHRITIS,0107000,01073012302,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012305,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,30.5,28.6,32.2,,,403,\"(33.4695358064, -86.96831739)\",HLTHOUT,ARTHRITIS,0107000,01073012305,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012401,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,27.4,25.6,29.4,,,1066,\"(33.5571951048, -86.8777935049)\",HLTHOUT,ARTHRITIS,0107000,01073012401,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012402,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,31.9,30.8,33.0,,,418,\"(33.549984172, -86.8994543327)\",HLTHOUT,ARTHRITIS,0107000,01073012402,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012500,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,37.9,36.5,39.4,,,410,\"(33.529160486, -86.9346476445)\",HLTHOUT,ARTHRITIS,0107000,01073012500,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012602,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,35.4,34.5,36.3,,,371,\"(33.570164674, -86.666430582)\",HLTHOUT,ARTHRITIS,0107000,01073012602,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012701,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,44,\"(33.5484078071, -86.6323773455)\",HLTHOUT,ARTHRITIS,0107000,01073012701,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012703,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,14.8,13.8,15.9,,,498,\"(33.4681180943, -86.6671888213)\",HLTHOUT,ARTHRITIS,0107000,01073012703,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012704,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,27.0,25.2,29.0,,,113,\"(33.5034195908, -86.6180983403)\",HLTHOUT,ARTHRITIS,0107000,01073012704,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012803,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,11.9,11.1,12.7,,,1261,\"(33.4439425865, -86.7212936938)\",HLTHOUT,ARTHRITIS,0107000,01073012803,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073012910,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,9,\"(33.4345805042, -86.7263292059)\",HLTHOUT,ARTHRITIS,0107000,01073012910,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073013002,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,41.0,39.1,42.9,,,1514,\"(33.46604181, -86.8567287797)\",HLTHOUT,ARTHRITIS,0107000,01073013002,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073013100,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,38.7,37.5,39.9,,,4424,\"(33.44880214, -86.8878401579)\",HLTHOUT,ARTHRITIS,0107000,01073013100,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073013300,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,39.2,37.6,40.7,,,1782,\"(33.4396443569, -86.9248768665)\",HLTHOUT,ARTHRITIS,0107000,01073013300,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073013901,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,35.0,33.4,36.6,,,952,\"(33.4729384906, -86.9547337648)\",HLTHOUT,ARTHRITIS,0107000,01073013901,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073014302,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,19.0,18.1,19.8,,,2778,\"(33.4244658829, -86.8841474217)\",HLTHOUT,ARTHRITIS,0107000,01073014302,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01073014413,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,17.7,16.9,18.6,,,397,\"(33.4226593117, -86.8508620751)\",HLTHOUT,ARTHRITIS,0107000,01073014413,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01117030213,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,20.3,19.1,21.5,,,644,\"(33.4395975193, -86.6735959359)\",HLTHOUT,ARTHRITIS,0107000,01117030213,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01117030217,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,,,,*,Estimates suppressed for population less than 50,16,\"(33.4556995763, -86.6520208639)\",HLTHOUT,ARTHRITIS,0107000,01117030217,Arthritis\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Health Outcomes,0107000-01117030303,Arthritis among adults aged >=18 Years,%,CrdPrv,Crude prevalence,12.8,12.1,13.6,,,968,\"(33.4258661239, -86.713819356)\",HLTHOUT,ARTHRITIS,0107000,01117030303,Arthritis\n2015,AL,Alabama,Birmingham,City,BRFSS,Unhealthy Behaviors,0107000,Binge drinking among adults aged >=18 Years,%,AgeAdjPrv,Age-adjusted prevalence,11.2,11.1,11.3,,,212237,\"(33.5275663773, -86.7988174678)\",UNHBEH,BINGE,0107000,,Binge Drinking\n2015,AL,Alabama,Birmingham,City,BRFSS,Unhealthy Behaviors,0107000,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,11.3,11.3,11.4,,,212237,\"(33.5275663773, -86.7988174678)\",UNHBEH,BINGE,0107000,,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073000100,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,10.1,9.7,10.5,,,3042,\"(33.5794328326, -86.7228323926)\",UNHBEH,BINGE,0107000,01073000100,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073000300,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,10.8,10.3,11.2,,,2735,\"(33.5428208686, -86.752433978)\",UNHBEH,BINGE,0107000,01073000300,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073000400,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,9.5,9.0,10.0,,,3338,\"(33.5632449633, -86.7640474064)\",UNHBEH,BINGE,0107000,01073000400,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073000500,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,8.6,8.1,9.0,,,2864,\"(33.5442404594, -86.7749130719)\",UNHBEH,BINGE,0107000,01073000500,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073000700,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,7.4,6.9,7.9,,,2577,\"(33.5525406139, -86.8016893706)\",UNHBEH,BINGE,0107000,01073000700,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073000800,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,8.9,8.5,9.3,,,3859,\"(33.549697789, -86.8330944744)\",UNHBEH,BINGE,0107000,01073000800,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073001100,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,9.6,9.2,10.1,,,5354,\"(33.5429143325, -86.8756782852)\",UNHBEH,BINGE,0107000,01073001100,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073001200,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,9.4,9.1,9.7,,,2876,\"(33.5278767706, -86.8604161686)\",UNHBEH,BINGE,0107000,01073001200,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073001400,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,8.9,8.5,9.3,,,2181,\"(33.5261497258, -86.835146606)\",UNHBEH,BINGE,0107000,01073001400,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073001500,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,9.4,9.1,9.8,,,3189,\"(33.5298727342, -86.8197191685)\",UNHBEH,BINGE,0107000,01073001500,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073001600,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,8.2,7.7,8.6,,,3390,\"(33.5372993423, -86.8036590482)\",UNHBEH,BINGE,0107000,01073001600,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073001902,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,9.3,8.9,9.8,,,1894,\"(33.5532050997, -86.7429801603)\",UNHBEH,BINGE,0107000,01073001902,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073002000,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,9.1,8.7,9.6,,,3885,\"(33.5541574106, -86.7167229915)\",UNHBEH,BINGE,0107000,01073002000,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073002100,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,10.0,9.6,10.6,,,3186,\"(33.5650015942, -86.7101024766)\",UNHBEH,BINGE,0107000,01073002100,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073002200,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,10.1,9.7,10.6,,,2630,\"(33.5521301205, -86.7276759508)\",UNHBEH,BINGE,0107000,01073002200,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073002303,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,8.9,8.5,9.4,,,2936,\"(33.5383153207, -86.7270445428)\",UNHBEH,BINGE,0107000,01073002303,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073002305,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,16.3,15.8,16.7,,,2952,\"(33.5333415976, -86.7479566084)\",UNHBEH,BINGE,0107000,01073002305,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073002306,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,15.6,15.2,16.1,,,3257,\"(33.5213873564, -86.7490031289)\",UNHBEH,BINGE,0107000,01073002306,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073002400,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,11.1,10.8,11.5,,,3629,\"(33.5260748309, -86.7830315488)\",UNHBEH,BINGE,0107000,01073002400,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073002700,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,13.6,13.0,14.2,,,3992,\"(33.5176008419, -86.8106887452)\",UNHBEH,BINGE,0107000,01073002700,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073002900,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,8.3,7.8,8.8,,,2064,\"(33.5132498864, -86.83004749)\",UNHBEH,BINGE,0107000,01073002900,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073003001,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,14.3,13.3,15.3,,,3779,\"(33.5125158094, -86.8577164946)\",UNHBEH,BINGE,0107000,01073003001,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073003002,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,7.4,7.0,7.8,,,2203,\"(33.512258109, -86.8441439907)\",UNHBEH,BINGE,0107000,01073003002,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073003100,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,9.5,9.1,10.0,,,3637,\"(33.5059655756, -86.8745506086)\",UNHBEH,BINGE,0107000,01073003100,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073003200,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,7.6,7.3,8.0,,,931,\"(33.5094018502, -86.8859081961)\",UNHBEH,BINGE,0107000,01073003200,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073003300,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,8.4,8.0,8.9,,,947,\"(33.5171261108, -86.8913819749)\",UNHBEH,BINGE,0107000,01073003300,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073002305,Obesity among adults aged >=18 Years,%,CrdPrv,Crude prevalence,31.7,30.4,33.0,,,2952,\"(33.5333415976, -86.7479566084)\",UNHBEH,OBESITY,0107000,01073002305,Obesity\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073003400,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,8.8,8.3,9.3,,,2477,\"(33.5052229234, -86.9014844656)\",UNHBEH,BINGE,0107000,01073003400,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073003500,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,10.0,9.5,10.5,,,2780,\"(33.5065714011, -86.9195910063)\",UNHBEH,BINGE,0107000,01073003500,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073003600,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,9.9,9.4,10.3,,,4683,\"(33.48476397, -86.8981392947)\",UNHBEH,BINGE,0107000,01073003600,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073003700,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,10.3,9.9,10.7,,,5063,\"(33.4969018589, -86.8907729426)\",UNHBEH,BINGE,0107000,01073003700,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073003802,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,10.3,9.9,10.7,,,5409,\"(33.4785707794, -86.890000907)\",UNHBEH,BINGE,0107000,01073003802,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073003803,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,9.2,8.7,9.7,,,4199,\"(33.485945214, -86.869692186)\",UNHBEH,BINGE,0107000,01073003803,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073003900,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,9.5,9.1,9.8,,,1783,\"(33.4989959327, -86.8647600038)\",UNHBEH,BINGE,0107000,01073003900,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073004000,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,8.5,8.0,9.0,,,3772,\"(33.4953246015, -86.8516232073)\",UNHBEH,BINGE,0107000,01073004000,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073004200,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,9.1,8.8,9.4,,,2341,\"(33.5007439361, -86.8270720379)\",UNHBEH,BINGE,0107000,01073004200,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073004500,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,13.8,12.9,14.8,,,5003,\"(33.5041857556, -86.8033798346)\",UNHBEH,BINGE,0107000,01073004500,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073004701,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,16.4,15.7,17.2,,,3480,\"(33.5075242148, -86.7836675838)\",UNHBEH,BINGE,0107000,01073004701,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073004702,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,15.3,14.9,15.7,,,2944,\"(33.5119902661, -86.7694550989)\",UNHBEH,BINGE,0107000,01073004702,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073004800,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,14.1,13.7,14.5,,,1861,\"(33.4989064008, -86.78269914)\",UNHBEH,BINGE,0107000,01073004800,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073004901,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,17.0,16.4,17.7,,,1167,\"(33.4971595645, -86.7917440668)\",UNHBEH,BINGE,0107000,01073004901,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073004902,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,16.3,15.6,17.1,,,3146,\"(33.4935824043, -86.8009294603)\",UNHBEH,BINGE,0107000,01073004902,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073005000,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,16.1,15.6,16.7,,,3482,\"(33.4866689795, -86.8173262831)\",UNHBEH,BINGE,0107000,01073005000,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073005101,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,7.9,7.5,8.3,,,1507,\"(33.4945909008, -86.834763936)\",UNHBEH,BINGE,0107000,01073005101,Binge Drinking\n2015,AL,Alabama,Birmingham,Census Tract,BRFSS,Unhealthy Behaviors,0107000-01073005103,Binge drinking among adults aged >=18 Years,%,CrdPrv,Crude prevalence,7.7,7.4,8.0,,,2587,\"(33.485714885, -86.8327817467)\",UNHBEH,BINGE,0107000,01073005103,Binge Drinking\n"
  },
  {
    "path": "oss_c_sdk_test/test.h.in",
    "content": "#define TEST_DIR \"@PROJECT_SOURCE_DIR@\"\n"
  },
  {
    "path": "oss_c_sdk_test/test_all.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_http_io.h\"\n#include \"oss_config.h\"\n#include \"apr_env.h\"\n#include \"aos_string.h\"\n\nextern CuSuite *test_oss_bucket();\nextern CuSuite *test_oss_object();\nextern CuSuite *test_oss_multipart();\nextern CuSuite *test_oss_live();\nextern CuSuite *test_oss_image();\nextern CuSuite *test_oss_progress();\nextern CuSuite *test_oss_callback();\nextern CuSuite *test_oss_crc();\nextern CuSuite *test_aos();\nextern CuSuite *test_oss_proxy();\nextern CuSuite *test_oss_resumable();\nextern CuSuite *test_oss_select_object();\nextern CuSuite *test_oss_object_tagging();\nextern CuSuite *test_oss_xml();\nextern CuSuite *test_oss_https();\nextern CuSuite* test_oss_sign();\nextern void set_test_bucket_prefix(const char*prefix);\nextern void clean_bucket_by_prefix(const char* prefix);\n\nstatic const struct testlist {\n    const char *testname;\n    CuSuite *(*func)();\n} tests[] = {\n    {\"test_oss_bucket\", test_oss_bucket},\n    {\"test_oss_object\", test_oss_object},\n    {\"test_oss_multipart\", test_oss_multipart},\n    {\"test_oss_live\", test_oss_live},\n    {\"test_oss_image\", test_oss_image},\n    {\"test_oss_progress\", test_oss_progress},\n    {\"test_oss_callback\", test_oss_callback},\n    {\"test_oss_crc\", test_oss_crc},\n    {\"test_oss_proxy\", test_oss_proxy},\n    {\"test_oss_resumable\", test_oss_resumable},\n    {\"test_aos\", test_aos},\n    {\"test_oss_select_object\", test_oss_select_object },\n    {\"test_oss_object_tagging\", test_oss_object_tagging },\n    {\"test_oss_xml\", test_oss_xml },\n    {\"test_oss_https\", test_oss_https },\n    {\"test_oss_sign\", test_oss_sign },\n    {\"LastTest\", NULL}\n};\n\nstatic char *CFG_FILE_PATH = \"\";\nstatic char BUCKET_PREIFX[64];\n\nint has_cfg_info()\n{\n    return (TEST_OSS_ENDPOINT && TEST_ACCESS_KEY_ID && TEST_ACCESS_KEY_SECRET);\n}\n\nvoid load_cfg_from_env()\n{\n    char *str = NULL;\n    apr_env_get(&str, \"OSS_TEST_ENDPOINT\", aos_global_pool);\n    if (str) {\n        TEST_OSS_ENDPOINT = str;\n    }\n\n    str = NULL;\n    apr_env_get(&str, \"OSS_TEST_REGION\", aos_global_pool);\n    if (str) {\n        TEST_REGION = str;\n    }\n    \n    str = NULL;\n    apr_env_get(&str, \"OSS_TEST_ACCESS_KEY_ID\", aos_global_pool);\n    if (str) {\n        TEST_ACCESS_KEY_ID = str;\n    }\n\n    str = NULL;\n    apr_env_get(&str, \"OSS_TEST_ACCESS_KEY_SECRET\", aos_global_pool);\n    if (str) {\n        TEST_ACCESS_KEY_SECRET = str;\n    }\n\n    str = NULL;\n    apr_env_get(&str, \"OSS_TEST_CALLBACK_URL\", aos_global_pool);\n    if (str) {\n        TEST_CALLBACK_URL = str;\n    }\n}\n\nvoid load_cfg_from_file()\n{\n    apr_file_t *file;\n    apr_status_t s;\n    char buffer[256];\n    char *ptr;\n\n    if (has_cfg_info())\n        return;\n\n    s = apr_file_open(&file, CFG_FILE_PATH, APR_READ, APR_UREAD | APR_GREAD, aos_global_pool);\n\n    if (s != APR_SUCCESS)\n        return;\n\n    while (apr_file_gets(buffer, 256, file) == APR_SUCCESS) {\n        aos_string_t str;\n        ptr = strchr(buffer, '=');\n        if (!ptr) {\n            continue;\n        }\n\n        if (!strncmp(buffer, \"AccessKeyId\", 11)) {\n            aos_str_set(&str, ptr + 1);\n            aos_trip_space_and_cntrl(&str);\n            aos_unquote_str(&str);\n            TEST_ACCESS_KEY_ID = aos_pstrdup(aos_global_pool, &str);\n        }\n        else if (!strncmp(buffer, \"AccessKeySecret\", 15)) {\n            aos_str_set(&str, ptr + 1);\n            aos_trip_space_and_cntrl(&str);\n            aos_unquote_str(&str);\n            TEST_ACCESS_KEY_SECRET = aos_pstrdup(aos_global_pool, &str);\n        }\n        else if (!strncmp(buffer, \"Endpoint\", 8)) {\n            aos_str_set(&str, ptr + 1);\n            aos_trip_space_and_cntrl(&str);\n            aos_unquote_str(&str);\n            TEST_OSS_ENDPOINT = aos_pstrdup(aos_global_pool, &str);\n        }\n        else if (!strncmp(buffer, \"Region\", 6)) {\n            aos_str_set(&str, ptr + 1);\n            aos_trip_space_and_cntrl(&str);\n            aos_unquote_str(&str);\n            TEST_REGION = aos_pstrdup(aos_global_pool, &str);\n        }\n        else if (!strncmp(buffer, \"CallbackServer\", 14)) {\n            aos_str_set(&str, ptr + 1);\n            aos_trip_space_and_cntrl(&str);\n            aos_unquote_str(&str);\n            TEST_CALLBACK_URL = aos_pstrdup(aos_global_pool, &str);\n        }\n    }\n    apr_file_close(file);\n}\n\nint init_test_env()\n{\n    /*Get from env*/\n    load_cfg_from_env();\n\n    /*Get from file*/\n    load_cfg_from_file();\n\n    /*gen bucket prefix*/\n    sprintf(BUCKET_PREIFX, \"test-c-sdk-%\"APR_TIME_T_FMT, apr_time_now()/1000);\n    set_test_bucket_prefix(BUCKET_PREIFX);\n\n    return has_cfg_info();\n}\n\nvoid deinit_test_env()\n{\n    clean_bucket_by_prefix(BUCKET_PREIFX);\n}\n\nint run_all_tests(int argc, char *argv[])\n{\n    int i;\n    int exit_code;\n    int list_provided = 0;\n    CuSuite* suite = NULL;\n    int j;\n    int found;\n    CuSuite *st = NULL;\n    CuString *output = NULL;\n\n    for (i = 1; i < argc; i++) {\n        if (!strcmp(argv[i], \"-v\")) {\n            continue;\n        }\n        if (!strcmp(argv[i], \"-l\")) {\n            for (i = 0; tests[i].func != NULL; i++) {\n                printf(\"%s\\n\", tests[i].testname);\n            }\n            exit(0);\n        }\n        if (!strcmp(argv[i], \"-oss_cfg\")) {\n            aos_string_t str;\n            aos_str_set(&str, argv[i + 1]);\n            aos_strip_space(&str);\n            CFG_FILE_PATH = aos_pstrdup(aos_global_pool, &str);\n            i++;\n            continue;\n        }\n        if (!strcmp(argv[i], \"-d\")) {\n            aos_log_set_level(AOS_LOG_DEBUG);\n            continue;\n        }\n        if (argv[i][0] == '-') {\n            fprintf(stderr, \"invalid option: `%s'\\n\", argv[i]);\n            exit(1);\n        }\n        list_provided = 1;\n    }\n\n    if (!init_test_env()) {\n        fprintf(stderr, \"One of AK, SK or Endpoint is not configured.\\n\");\n        exit(1);\n    }\n\n    suite = CuSuiteNew();\n\n    if (!list_provided) {\n        /* add everything */\n        for (i = 0; tests[i].func != NULL; i++) {\n            st = tests[i].func();\n            CuSuiteAddSuite(suite, st);\n            CuSuiteFree(st);\n        }\n    } else {\n        /* add only the tests listed */\n        for (i = 1; i < argc; i++) {\n            found = 0;\n            if (argv[i][0] == '-') {\n                if (!strcmp(argv[i], \"-oss_cfg\")) {\n                    i++;\n                }\n                continue;\n            }\n            for (j = 0; tests[j].func != NULL; j++) {\n                if (!strcmp(argv[i], tests[j].testname)) {\n                    CuSuiteAddSuite(suite, tests[j].func());\n                    found = 1;\n                }\n            }\n            if (!found) {\n                fprintf(stderr, \"invalid test name: `%s'\\n\", argv[i]);\n                exit(1);\n            }\n        }\n    }\n\n    output = CuStringNew();\n    CuSuiteRun(suite);\n    CuSuiteSummary(suite, output);\n    CuSuiteDetails(suite, output);\n    printf(\"%s\\n\", output->buffer);\n\n    exit_code = suite->failCount > 0 ? 1 : 0;\n\n    CuSuiteFreeDeep(suite);\n    CuStringFree(output);\n\n    deinit_test_env();\n\n    return exit_code;\n}\n\nint main(int argc, char *argv[])\n{\n    int exit_code = -1;\n\n    if (aos_http_io_initialize(NULL, 0) != AOSE_OK) {\n        exit(1);\n    }\n\n    aos_log_set_print(aos_log_print_default);\n    aos_log_set_format(aos_log_format_default);\n    aos_log_set_level(AOS_LOG_OFF);\n    exit_code = run_all_tests(argc, argv);\n\n    //aos_http_io_deinitialize last\n    aos_http_io_deinitialize();\n\n    return exit_code;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_aos.c",
    "content": "#include \"CuTest.h\"\n#include \"apr_portable.h\"\n#include \"apr_file_info.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_xml.h\"\n#include \"oss_util.c\"\n#include \"aos_transport.c\"\n#include \"oss_test_util.h\"\n#include \"aos_buf.h\"\n#include \"aos_http_io.h\"\n#include \"aos_fstack.h\"\n\n\nstatic char test_file[1024];\n\nvoid test_aos_setup(CuTest *tc)\n{\n    sprintf(test_file, \"%sBingWallpaper-2017-01-19.jpg\", get_test_file_path());\n}\n\n/*\n * oss_xml.c\n */\nvoid test_get_xml_doc_with_empty_aos_list(CuTest *tc)\n{\n    int ret;\n    mxml_node_t *xml_node;\n    aos_list_t bc;\n    aos_list_init(&bc);\n\n    \n    ret = get_xmldoc(&bc, &xml_node);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    printf(\"test_get_xml_doc_with_empty_aos_list ok\\n\");\n}\n\n/*\n * aos_list.h\n */\n\nvoid test_aos_list_movelist_with_empty_list(CuTest *tc) {\n    aos_list_t list;\n    aos_list_t new_list;\n\n    aos_list_init(&list);\n\n    aos_list_movelist(&list, &new_list);\n    CuAssertTrue(tc, new_list.prev == &new_list);\n    CuAssertTrue(tc, new_list.next == &new_list);\n\n    printf(\"test_aos_list_movelist_with_empty_list ok\\n\");\n}\n\n/*\n * oss_util.c\n */\nvoid test_starts_with_failed(CuTest *tc) {\n    int ret;\n    aos_string_t str;\n    aos_str_set(&str, \"hangzhou.city\");\n    \n    ret = starts_with(&str, \"xixi\");\n    CuAssertIntEquals(tc, 0, ret);\n\n    printf(\"test_starts_with_failed ok\\n\");\n}\n\nvoid test_is_valid_ip(CuTest *tc) {\n    int ret;\n\n    ret = is_valid_ip(\"140.205.63.8\");\n    CuAssertIntEquals(tc, 1, ret);\n\n    ret = is_valid_ip(\"0.0.0.0\");\n    CuAssertIntEquals(tc, 0, ret);\n\n    ret = is_valid_ip(NULL);\n    CuAssertIntEquals(tc, 0, ret);\n\n    ret = is_valid_ip(\"\");\n    CuAssertIntEquals(tc, 0, ret);\n\n    printf(\"test_is_valid_ip ok\\n\");\n}\n\nvoid test_oss_config_resolve(CuTest *tc) {\n    aos_pool_t *p;\n    oss_config_t config;\n    aos_http_controller_t *ctl;\n    aos_pool_create(&p, NULL);\n\n    ctl = aos_http_controller_create(p, 0);\n    ctl->options = aos_http_request_options_create(p);\n\n    \n    config.proxy_user.data = NULL;\n    config.proxy_passwd.data = NULL;\n    config.proxy_host.data = NULL;\n    oss_config_resolve(p, &config, ctl);\n\n    config.proxy_host.data = \"192.168.1.1\";\n    config.proxy_host.len = strlen(\"192.168.1.1\");\n    config.proxy_port = 0;\n    oss_config_resolve(p, &config, ctl);\n    CuAssertStrEquals(tc, \"192.168.1.1\", ctl->options->proxy_host);\n\n    config.proxy_user.data = NULL;\n    config.proxy_passwd.data = NULL;\n    oss_config_resolve(p, &config, ctl);\n    CuAssertStrEquals(tc, NULL, ctl->options->proxy_auth);\n\n    config.proxy_user.data = \"test\";\n    config.proxy_user.len = 4;\n    config.proxy_passwd.data = NULL;\n    oss_config_resolve(p, &config, ctl);\n    CuAssertStrEquals(tc, NULL, ctl->options->proxy_auth);\n\n    config.proxy_user.data = \"test\";\n    config.proxy_user.len = 4;\n    config.proxy_passwd.data = \"test\";\n    config.proxy_passwd.len = 4;\n    oss_config_resolve(p, &config, ctl);\n    CuAssertStrEquals(tc, \"test:test\", ctl->options->proxy_auth);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_oss_config_resolve ok\\n\");\n}\n\nvoid test_oss_request_options_create_with_null_pool(CuTest *tc) {\n    oss_request_options_t *option;\n    option = oss_request_options_create(NULL);\n    CuAssertTrue(tc, NULL != option);\n\n    aos_pool_destroy(option->pool);\n\n    printf(\"test_oss_request_options_create_with_null_pool ok\\n\");\n}\n\nvoid test_oss_get_service_uri(CuTest *tc) {\n    aos_pool_t *p;\n    oss_request_options_t *option;\n    aos_http_request_t *req;\n\n    aos_pool_create(&p, NULL);\n    option = oss_request_options_create(p);\n    req = aos_http_request_create(p);\n    init_test_request_options(option, 0);\n    option->config->is_cname = 0;\n    option->config->endpoint.data = \"192.168.1.1\";\n    option->config->endpoint.len = 11;\n    oss_get_service_uri(option, req);\n    CuAssertStrEquals(tc, \"192.168.1.1\", req->host);\n\n    option->config->is_cname = 1;\n    option->config->endpoint.data = \"192.168.1.1\";\n    option->config->endpoint.len = 11;\n    oss_get_service_uri(option, req);\n    CuAssertStrEquals(tc, \"192.168.1.1\", req->host);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_oss_get_service_uri ok\\n\");\n}\n\nvoid test_oss_get_rtmp_uri(CuTest *tc) {\n    aos_pool_t *p;\n    oss_request_options_t *option;\n    aos_http_request_t *req;\n    aos_string_t bucketname;\n    aos_string_t channelid;\n\n    aos_pool_create(&p, NULL);\n    option = oss_request_options_create(p);\n    req = aos_http_request_create(p);\n    init_test_request_options(option, 0);\n    option->config->endpoint.data = \"http://192.168.1.1\";\n    option->config->endpoint.len = 18;\n\n    bucketname.data = \"test\";\n    bucketname.len = 4;\n\n    channelid.data = \"test\";\n    channelid.len = 4;\n\n    oss_get_rtmp_uri(option, &bucketname, &channelid, req);\n    CuAssertStrEquals(tc, \"192.168.1.1\", req->host);\n\n    option->config->is_cname = 1;\n    oss_get_rtmp_uri(option, &bucketname, &channelid, req);\n    CuAssertStrEquals(tc, \"192.168.1.1\", req->host);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_oss_get_rtmp_uri ok\\n\");\n}\n\nvoid test_oss_write_request_body_from_file(CuTest *tc) {\n    aos_pool_t *p;\n    aos_string_t filename;\n    aos_http_request_t req;\n    int ret;\n    aos_pool_create(&p, NULL);\n\n    filename.data = \"\";\n    filename.len = 0;\n    ret = oss_write_request_body_from_file(p, &filename, &req);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, ret);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_oss_write_request_body_from_file ok\\n\");\n}\n\nvoid test_oss_write_request_body_from_upload_file(CuTest *tc) {\n    aos_pool_t *p;\n    oss_upload_file_t upload_file;\n    aos_http_request_t req;\n    int ret;\n    aos_pool_create(&p, NULL);\n\n    upload_file.filename.data = \"\";\n    upload_file.filename.len = 0;\n    upload_file.file_pos = 0;\n    upload_file.file_last = 100;\n    ret = oss_write_request_body_from_upload_file(p, &upload_file, &req);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, ret);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_oss_write_request_body_from_upload_file ok\\n\");\n}\n\nvoid test_oss_init_read_response_body_to_file(CuTest *tc) {\n    aos_pool_t *p;\n    aos_string_t filename;\n    aos_http_response_t resp;\n    int ret;\n    aos_pool_create(&p, NULL);\n\n    filename.data = \"\";\n    filename.len = 0;\n    ret = oss_init_read_response_body_to_file(p, &filename, &resp);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, ret);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_oss_init_read_response_body_to_file ok\\n\");\n}\n\nvoid test_oss_create_bucket_info(CuTest *tc) {\n    aos_pool_t *p;\n    oss_bucket_info_t *info;\n    aos_pool_create(&p, NULL);\n    info = oss_create_bucket_info(p);\n    CuAssertTrue(tc, info != NULL);\n    aos_pool_destroy(p);\n\n    printf(\"test_oss_create_bucket_info ok\\n\");\n}\n\nvoid test_oss_get_part_size(CuTest *tc) {\n    int64_t file_size = 49999;\n    int64_t part_size = 2;\n\n    oss_get_part_size(file_size, &part_size);\n    CuAssertIntEquals(tc, 5, (int)part_size);\n\n    printf(\"test_oss_get_part_size ok\\n\");\n}\n\nvoid test_part_sort_cmp(CuTest *tc) {\n    oss_upload_part_t part1;\n    oss_upload_part_t part2;\n    int ret;\n\n    part1.part_num = 2;\n    part2.part_num = 1;\n    ret = part_sort_cmp(&part1, &part2);\n    CuAssertIntEquals(tc, 1, ret);\n    printf(\"test_part_sort_cmp ok\\n\");\n}\n\nvoid test_set_content_type(CuTest *tc) {\n    aos_pool_t *p;\n    aos_table_t *headers;\n    aos_pool_create(&p, NULL);\n    headers = aos_table_make(p, 1);\n    set_content_type(NULL, NULL, headers);\n    aos_pool_destroy(p);\n    printf(\"test_set_content_type ok\\n\");\n}\n\nvoid test_oss_check_crc_consistent(CuTest *tc) {\n    aos_pool_t *p;\n    aos_table_t *headers;\n    aos_status_t s;\n    int ret;\n    aos_pool_create(&p, NULL);\n    headers = aos_table_make(p, 1);\n    ret = oss_check_crc_consistent(0, headers, &s);\n    CuAssertIntEquals(tc, 0, ret);\n\n    aos_pool_destroy(p);\n    printf(\"test_oss_check_crc_consistent ok\\n\");\n}\n\nvoid test_oss_get_object_uri_with_cname(CuTest *tc) {\n    aos_pool_t *p;\n    oss_request_options_t *options;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_http_request_t req;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    options->config = oss_config_create(options->pool);\n    options->config->is_cname = 1;\n    aos_str_set(&options->config->endpoint, \"img.abc.com\");\n\n    aos_str_set(&bucket, \"bucket-1\");\n    aos_str_set(&object, \"key-2\");\n    \n    oss_get_object_uri(options, &bucket, &object, &req);\n    CuAssertStrEquals(tc, \"\", req.proto);\n    CuAssertStrEquals(tc, \"key-2\", req.uri);\n    CuAssertStrEquals(tc, \"img.abc.com\", req.host);\n    \n    aos_pool_destroy(p);\n\n    printf(\"test_oss_get_object_uri_with_cname ok\\n\");\n}\n\nvoid test_oss_get_object_uri_with_ip(CuTest *tc) {\n    aos_pool_t *p;\n    oss_request_options_t *options;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_http_request_t req;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    options->config = oss_config_create(options->pool);\n    options->config->is_cname = 0;\n    aos_str_set(&options->config->endpoint, \"http://140.205.63.8\");\n\n    aos_str_set(&bucket, \"bucket-1\");\n    aos_str_set(&object, \"key-2\");\n    \n    oss_get_object_uri(options, &bucket, &object, &req);\n    CuAssertStrEquals(tc, \"http://\", req.proto);\n    CuAssertStrEquals(tc, \"bucket-1/key-2\", req.uri);\n    CuAssertStrEquals(tc, \"140.205.63.8\", req.host);\n    \n    aos_pool_destroy(p);\n\n    printf(\"test_oss_get_object_uri_with_ip ok\\n\");\n}\n\nvoid test_oss_get_bucket_uri_with_ip(CuTest *tc) {\n    aos_pool_t *p;\n    oss_request_options_t *options;\n    aos_string_t bucket;\n    aos_http_request_t req;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    options->config = oss_config_create(options->pool);\n    options->config->is_cname = 0;\n    aos_str_set(&options->config->endpoint, \"140.205.63.8\");\n\n    aos_str_set(&bucket, \"bucket-1\");\n    \n    oss_get_bucket_uri(options, &bucket, &req);\n    CuAssertStrEquals(tc, \"\", req.proto);\n    CuAssertStrEquals(tc, \"bucket-1\", req.uri);\n    CuAssertStrEquals(tc, \"140.205.63.8\", req.host);\n    CuAssertStrEquals(tc, \"bucket-1\", req.resource);\n    \n    aos_pool_destroy(p);\n\n    printf(\"test_oss_get_bucket_uri_with_ip ok\\n\");\n}\n\nvoid test_oss_get_bucket_uri_with_cname(CuTest *tc) {\n    aos_pool_t *p;\n    oss_request_options_t *options;\n    aos_string_t bucket;\n    aos_http_request_t req;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    options->config = oss_config_create(options->pool);\n    options->config->is_cname = 1;\n    aos_str_set(&options->config->endpoint, \"https://img.abc.com\");\n\n    aos_str_set(&bucket, \"bucket-1\");\n    \n    oss_get_bucket_uri(options, &bucket, &req);\n    CuAssertStrEquals(tc, \"https://\", req.proto);\n    CuAssertStrEquals(tc, \"bucket-1\", req.uri);\n    CuAssertStrEquals(tc, \"img.abc.com\", req.host);\n    CuAssertStrEquals(tc, \"bucket-1/\", req.resource);\n    \n    aos_pool_destroy(p);\n\n    printf(\"test_oss_get_bucket_uri_with_cname ok\\n\");\n}\n\nvoid test_oss_temp_file_rename(CuTest *tc) {\n    aos_pool_t *p;\n    int ret;\n    aos_status_t s;\n    ret = oss_temp_file_rename(NULL, NULL, NULL, NULL);\n    CuAssertIntEquals(tc, -1, ret);\n\n    aos_pool_create(&p, NULL);\n\n    s.code = 400;\n    ret = oss_temp_file_rename(&s, \"test-path\", NULL, p);\n#if defined(WIN32)\n    CuAssertIntEquals(tc, 720002, ret);\n#else\n    CuAssertIntEquals(tc, 2, ret);\n#endif\n\n    aos_pool_destroy(p);\n\n\n\n    printf(\"test_oss_temp_file_rename ok\\n\");\n}\n\nvoid test_oss_init_select_object_read_response_body(CuTest *tc) {\n    int ret;\n    aos_pool_t *p;\n    aos_http_response_t resp;\n    aos_pool_create(&p, NULL);\n\n    ret = oss_init_select_object_read_response_body(NULL, NULL);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    ret = oss_init_select_object_read_response_body(p, NULL);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    resp.type = BODY_IN_CALLBACK;\n    ret = oss_init_select_object_read_response_body(p, &resp);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n    printf(\"test_oss_init_select_object_read_response_body ok\\n\");\n}\n\nvoid test_oss_check_select_object_status(CuTest *tc) {\n    aos_http_response_t resp;\n\n    oss_check_select_object_status(NULL, NULL);\n    oss_check_select_object_status(&resp, NULL);\n\n    printf(\"test_oss_check_select_object_status ok\\n\");\n}\n\nvoid test_oss_check_create_select_object_meta_status(CuTest *tc) {\n    aos_http_response_t resp;\n\n    oss_check_create_select_object_meta_status(NULL, NULL, NULL);\n    oss_check_create_select_object_meta_status(&resp, NULL, NULL);\n\n    printf(\"oss_check_create_select_object_meta_status ok\\n\");\n}\n\nvoid test_oss_init_create_select_object_meta_read_response_body(CuTest *tc) {\n    aos_http_response_t resp;\n    aos_pool_t *p;\n    aos_pool_create(&p, NULL);\n\n    oss_init_create_select_object_meta_read_response_body(NULL, NULL);\n    oss_init_create_select_object_meta_read_response_body(p, NULL);\n\n    resp.type = BODY_IN_CALLBACK;\n    oss_init_create_select_object_meta_read_response_body(p, &resp);\n    aos_pool_destroy(p);\n\n    printf(\"test_oss_init_create_select_object_meta_read_response_body ok\\n\");\n}\n\n\nvoid test_aos_log_format_default(CuTest *tc) {\n    /*\n     * check is coredump\n     */\n    aos_log_format_default(AOS_LOG_INFO, \"/tmp/a\", 10, \"fun1\", \"%d-%d\", 1, 2);\n\n    printf(\"test_aos_log_format_default ok\\n\");\n}\n\nvoid test_aos_log_print_default_with_null_file(CuTest *tc) {\n    /*\n     * check is coredump\n     */\n    apr_file_t *thefile = NULL;\n    aos_pool_t *p;\n\n    aos_stderr_file = NULL;\n    aos_log_print_default(\"abc\", 3);\n\n    aos_pool_create(&p, NULL);\n\n    apr_file_open(&thefile, \"stderr_log_file\", APR_CREATE | APR_WRITE, APR_UREAD | APR_UWRITE | APR_GREAD, p);\n    CuAssertTrue(tc, thefile != NULL);\n    aos_stderr_file = thefile;\n    aos_log_print_default(\"abc\", 3);\n    apr_file_close(thefile);\n    aos_stderr_file = NULL;\n    aos_pool_destroy(p);\n\n    printf(\"test_aos_log_print_default_with_null_file ok\\n\");\n}\n\n/*\n * aos_transport\n */\nvoid test_aos_curl_code_to_status(CuTest *tc) {\n    int code = aos_curl_code_to_status(CURLE_OUT_OF_MEMORY);\n    CuAssertIntEquals(tc, AOSE_OUT_MEMORY, code);\n\n    code = aos_curl_code_to_status(CURLE_COULDNT_RESOLVE_PROXY);\n    CuAssertIntEquals(tc, AOSE_NAME_LOOKUP_ERROR, code);\n\n    code = aos_curl_code_to_status(CURLE_COULDNT_RESOLVE_HOST);\n    CuAssertIntEquals(tc, AOSE_NAME_LOOKUP_ERROR, code);\n\n    code = aos_curl_code_to_status(CURLE_COULDNT_CONNECT);\n    CuAssertIntEquals(tc, AOSE_FAILED_CONNECT, code);\n\n    code = aos_curl_code_to_status(CURLE_WRITE_ERROR);\n    CuAssertIntEquals(tc, AOSE_CONNECTION_FAILED, code);\n\n    code = aos_curl_code_to_status(CURLE_OPERATION_TIMEDOUT);\n    CuAssertIntEquals(tc, AOSE_CONNECTION_FAILED, code);\n\n    code = aos_curl_code_to_status(CURLE_PARTIAL_FILE);\n    CuAssertIntEquals(tc, AOSE_OK, code);\n\n    code = aos_curl_code_to_status(CURLE_SSL_CACERT);\n    CuAssertIntEquals(tc, AOSE_FAILED_VERIFICATION, code);\n\n    code = aos_curl_code_to_status(CURLE_FTP_WEIRD_PASV_REPLY);\n    CuAssertIntEquals(tc, AOSE_INTERNAL_ERROR, code);\n\n    printf(\"test_aos_curl_code_to_status ok\\n\");\n}\n\n/*\n * aos_string.h\n */\nvoid test_aos_unquote_str(CuTest *tc) {\n    aos_string_t str;\n    char buff[3];\n\n    aos_str_set(&str, \"\\\"abc\\\"\");\n    aos_unquote_str(&str);\n\n    CuAssertStrnEquals(tc, \"abc\", strlen(\"abc\"), str.data);\n    CuAssertIntEquals(tc, 3, str.len);\n\n    aos_str_set(&str, \"\");\n    aos_unquote_str(&str);\n\n    buff[0] = 'A';\n    buff[1] = 'a';\n    buff[2] = '\\0';\n    aos_str_set(&str, buff);\n    aos_string_tolower(&str);\n    CuAssertStrnEquals(tc, \"aa\", strlen(\"aa\"), str.data);\n\n    printf(\"test_aos_unquote_str ok\\n\");\n}\n\nvoid test_aos_ends_with(CuTest *tc) {\n    int ret;\n    aos_string_t str;\n    aos_string_t suffix;\n\n    aos_str_set(&str, \"abc.mn.qp\");\n\n    aos_str_set(&suffix, \".qp\");\n    ret = aos_ends_with(&str, &suffix);\n    CuAssertIntEquals(tc, 1, ret);\n\n    aos_str_set(&suffix, \".mn\");\n    ret = aos_ends_with(&str, &suffix);\n    CuAssertIntEquals(tc, 0, ret);\n\n    ret = aos_ends_with(&str, NULL);\n    CuAssertIntEquals(tc, 0, ret);\n\n    ret = aos_ends_with(NULL, NULL);\n    CuAssertIntEquals(tc, 0, ret);\n\n    aos_str_set(&suffix, \"abc.mn.qp.adfda\");\n    ret = aos_ends_with(&str, &suffix);\n    CuAssertIntEquals(tc, 0, ret);\n\n    printf(\"test_aos_ends_with ok\\n\");\n}\n\nvoid test_aos_string_is_empty(CuTest *tc) {\n    aos_string_t  str;\n    int ret;\n\n    //empty\n    ret = aos_string_is_empty(NULL);\n    CuAssertIntEquals(tc, 1, ret);\n\n    str.len = 0;\n    ret = aos_string_is_empty(&str);\n    CuAssertIntEquals(tc, 1, ret);\n\n    str.data = NULL;\n    str.len = 1;\n    ret = aos_string_is_empty(&str);\n    CuAssertIntEquals(tc, 1, ret);\n\n    str.data = \"\";\n    str.len = 1;\n    ret = aos_string_is_empty(&str);\n    CuAssertIntEquals(tc, 1, ret);\n\n    ret = aos_is_null_string(NULL);\n    CuAssertIntEquals(tc, 1, ret);\n\n    str.data = NULL;\n    str.len = 1;\n    ret = aos_is_null_string(&str);\n    CuAssertIntEquals(tc, 1, ret);\n\n    str.data = \"\";\n    str.len = 0;\n    ret = aos_is_null_string(&str);\n    CuAssertIntEquals(tc, 1, ret);\n\n    printf(\"test_aos_ends_with ok\\n\");\n}\n\n/*\n * aos_util.h\n */\n\nvoid test_aos_url_encode_failed(CuTest *tc) {\n    int ret;\n    char *dest;\n    dest = (char*)malloc(1024);\n    \n    ret = aos_url_encode(dest, \"/mingdi-hz-3/./xxx/./ddd/\", 1);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, ret);\n\n    free(dest);\n\n    printf(\"test_aos_url_encode_failed ok\\n\");\n}\n\nvoid test_aos_url_encode_with_blank_char(CuTest *tc) {\n    int ret;\n    char *source;\n    char *dest;\n    source = \"abc.xx.com/a b~\";\n    dest = (char*)malloc(20);\n    \n    ret = aos_url_encode(dest, source, strlen(source));\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertStrEquals(tc, \"abc.xx.com%2Fa%20b~\", dest);\n\n    free(dest);\n\n    printf(\"test_aos_url_encode_with_blank_char ok\\n\");\n}\n\nvoid test_aos_url_encode_ex_with_blank_char(CuTest *tc) {\n    int ret;\n    char *source;\n    char *dest;\n    source = \"abc.xx.com/a b~//123/\";\n    dest = (char*)malloc(100);\n\n    ret = aos_url_encode_ex(dest, source, strlen(source), 0);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertStrEquals(tc, \"abc.xx.com%2Fa%20b~%2F%2F123%2F\", dest);\n\n    ret = aos_url_encode_ex(dest, source, strlen(source), 1);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertStrEquals(tc, \"abc.xx.com/a%20b~//123/\", dest);\n\n    free(dest);\n\n    printf(\"test_aos_url_encode_ex_with_blank_char ok\\n\");\n}\n\nvoid test_aos_url_decode_with_percent(CuTest *tc) {\n    int ret;\n    char *in;\n    char *out;\n\n    in = \"abc.xx.com/a%20b\";\n    out = (char*)malloc(20);\n    \n    ret = aos_url_decode(in, out);\n    CuAssertIntEquals(tc, 0, ret);\n    \n    ret = aos_url_decode(NULL, out);\n    CuAssertIntEquals(tc, 0, ret);\n\n    free(out);\n\n    printf(\"test_aos_url_decode_with_percent ok\\n\");\n}\n\nvoid test_aos_url_decode_with_add(CuTest *tc) {\n    int ret;\n    char *in;\n    char *out;\n\n    in = \"abc.xx.com/a+b\";\n    out = (char*)malloc(20);\n    \n    ret = aos_url_decode(in, out);\n    CuAssertIntEquals(tc, 0, ret);\n\n    free(out);\n\n    printf(\"test_aos_url_decode_with_add ok\\n\");\n}\n\nvoid test_aos_url_decode_failed(CuTest *tc) {\n    int ret;\n    char *in;\n    char *out;\n\n    in = \"abc.xx.com/a%xb\";\n    out = (char*)malloc(20);\n    \n    ret = aos_url_decode(in, out);\n    CuAssertIntEquals(tc, -1, ret);\n\n    free(out);\n    \n    printf(\"test_aos_url_decode_failed ok\\n\");\n}\n\n/*\n*aos_status.c\n*/\n\nvoid test_aos_should_retry(CuTest *tc) {\n    aos_status_t s;\n    aos_status_set(&s, 500, \"\", \"\");\n    CuAssertIntEquals(tc, 1, aos_should_retry(&s));\n\n    aos_status_set(&s, 505, \"\", \"\");\n    CuAssertIntEquals(tc, 1, aos_should_retry(&s));\n\n    aos_status_set(&s, 400, \"\", \"\");\n    CuAssertIntEquals(tc, 0, aos_should_retry(&s));\n\n    aos_status_set(&s, -992, \"-992\", \"\");\n    CuAssertIntEquals(tc, 1, aos_should_retry(&s));\n\n    aos_status_set(&s, -995, \"-995\", \"\");\n    CuAssertIntEquals(tc, 1, aos_should_retry(&s));\n\n    aos_status_set(&s, -998, \"-998\", \"\");\n    CuAssertIntEquals(tc, 1, aos_should_retry(&s));\n\n    aos_status_set(&s, -986, \"-986\", \"\");\n    CuAssertIntEquals(tc, 1, aos_should_retry(&s));\n\n    aos_status_set(&s, -993, \"-993\", \"\");\n    CuAssertIntEquals(tc, 0, aos_should_retry(&s));\n\n    aos_status_set(&s, 0, \"0\", \"NULL\");\n    CuAssertIntEquals(tc, 0, aos_should_retry(&s));\n\n    CuAssertIntEquals(tc, 0, aos_should_retry(NULL));\n\n    aos_status_set(&s, 200, \"\", \"\");\n    CuAssertIntEquals(tc, 0, aos_should_retry(&s));\n\n    aos_status_set(&s, 200, NULL, NULL);\n    CuAssertIntEquals(tc, 0, aos_should_retry(&s));\n\n    printf(\"test_aos_should_retry ok\\n\");\n}\n\nvoid test_aos_status_parse_from_body_fail(CuTest *tc) {\n    aos_pool_t *p;\n    aos_status_t *s;\n    aos_list_t buffer;\n    aos_buf_t *content;\n    char *invalid_xml = \"invalid\";\n    char *without_error_xml = \n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<BucketLoggingStatus></BucketLoggingStatus>\";\n    char *without_code_xml = \n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Error><RequestId>aaaaa</RequestId></Error>\";\n    char *without_message_xml = \n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Error><Code>aaaaa</Code></Error>\";\n\n    aos_pool_create(&p, NULL);\n\n    s = aos_status_parse_from_body(p, NULL, 200, NULL);\n    CuAssertTrue(tc, s->code == 200);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\n    aos_list_add_tail(&content->node, &buffer);\n    s = aos_status_parse_from_body(p, &buffer, 400, NULL);\n    CuAssertStrEquals(tc, s->error_code, (char *)AOS_UNKNOWN_ERROR_CODE);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(p, without_error_xml, strlen(without_error_xml));\n    aos_list_add_tail(&content->node, &buffer);\n    s = aos_status_parse_from_body(p, &buffer, 400, NULL);\n    CuAssertStrEquals(tc, s->error_code, (char *)AOS_UNKNOWN_ERROR_CODE);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(p, without_code_xml, strlen(without_code_xml));\n    aos_list_add_tail(&content->node, &buffer);\n    s = aos_status_parse_from_body(p, &buffer, 400, NULL);\n    CuAssertTrue(tc, s->error_code == NULL);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(p, without_message_xml, strlen(without_message_xml));\n    aos_list_add_tail(&content->node, &buffer);\n    s = aos_status_parse_from_body(p, &buffer, 400, NULL);\n    CuAssertTrue(tc, s->error_msg == NULL);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_aos_strtoll(CuTest *tc)\n{\n    int64_t val = 0;\n    char *endptr = NULL;\n\n    val = aos_strtoll(\"0\", NULL, 10);\n    CuAssertTrue(tc, val == 0);\n\n    val = aos_strtoll(\"9223372036854775807\", NULL, 10);\n    CuAssertTrue(tc, val == 9223372036854775807);\n\n    val = aos_strtoll(\"+9223372036854775807\", NULL, 10);\n    CuAssertTrue(tc, val == 9223372036854775807);\n\n    val = aos_strtoll(\"-9223372036854775808\", NULL, 10);\n    CuAssertTrue(tc, val == INT64_MIN);\n\n    val = aos_strtoll(\"-92233720368547758080\", NULL, 10);\n    CuAssertTrue(tc, val == INT64_MIN);\n\n    val = aos_strtoll(\"9223372036854775809\", NULL, 10);\n    CuAssertTrue(tc, val == INT64_MAX);\n\n    val = aos_strtoll(\"2147483648ABC\", &endptr, 10);\n    CuAssertTrue(tc, val == 2147483648);\n    CuAssertStrEquals(tc, endptr, \"ABC\");\n\n    val = aos_strtoll(\" 1234\", NULL, 0);\n    CuAssertTrue(tc, val == 1234);\n\n    //hex\n    val = aos_strtoll(\"0x1234Ac\", NULL, 0);\n    CuAssertTrue(tc, val == 1193132);\n\n    val = aos_strtoll(\"0X1234\", NULL, 0);\n    CuAssertTrue(tc, val == 4660);\n\n    val = aos_strtoll(\"0x1234\", NULL, 16);\n    CuAssertTrue(tc, val == 4660);\n\n    val = aos_strtoll(\"0X1234\", NULL, 16);\n    CuAssertTrue(tc, val == 4660);\n\n    //Oct\n    val = aos_strtoll(\"01234\", NULL, 0);\n    CuAssertTrue(tc, val == 668);\n\n    val = aos_atoi64(\"0\");\n    CuAssertTrue(tc, val == 0);\n\n    val = aos_atoi64(\"9223372036854775807\");\n    CuAssertTrue(tc, val == 9223372036854775807);\n\n    val = aos_atoi64(\"-9223372036854775808\");\n    CuAssertTrue(tc, val == INT64_MIN);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_aos_strtoull(CuTest *tc)\n{\n    uint64_t val = 0;\n    char *endptr = NULL;\n\n    val = aos_strtoull(\"0\", NULL, 10);\n    CuAssertTrue(tc, val == 0);\n\n    val = aos_strtoull(\"9223372036854775807\", NULL, 10);\n    CuAssertTrue(tc, val == 9223372036854775807);\n\n    val = aos_strtoull(\"+922337203685477580\", NULL, 10);\n    CuAssertTrue(tc, val == 922337203685477580);\n\n    val = aos_strtoull(\"18446744073709551615\", NULL, 10);\n    CuAssertTrue(tc, val == UINT64_MAX);\n\n    val = aos_strtoull(\"2147483648ABC\", &endptr, 10);\n    CuAssertTrue(tc, val == 2147483648);\n    CuAssertStrEquals(tc, endptr, \"ABC\");\n\n    val = aos_strtoull(\" 1234\", NULL, 0);\n    CuAssertTrue(tc, val == 1234);\n\n    //hex\n    val = aos_strtoull(\"0x1234Ac\", NULL, 0);\n    CuAssertTrue(tc, val == 1193132);\n\n    val = aos_strtoull(\"0X1234\", NULL, 0);\n    CuAssertTrue(tc, val == 4660);\n\n    val = aos_strtoull(\"0x1234\", NULL, 16);\n    CuAssertTrue(tc, val == 4660);\n\n    val = aos_strtoull(\"0X1234\", NULL, 16);\n    CuAssertTrue(tc, val == 4660);\n\n    //Oct\n    val = aos_strtoull(\"01234\", NULL, 0);\n    CuAssertTrue(tc, val == 668);\n\n    val = aos_atoui64(\"0\");\n    CuAssertTrue(tc, val == 0);\n\n    val = aos_atoui64(\"9223372036854775807\");\n    CuAssertTrue(tc, val == 9223372036854775807);\n\n    val = aos_atoui64(\"18446744073709551615\");\n    CuAssertTrue(tc, val == UINT64_MAX);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_aos_base64_encode(CuTest *tc) {\n    char buff[32];\n    int ret;\n\n    memset(buff, 0, 32);\n    ret = aos_base64_encode((unsigned char *)\"abc\", 3, buff);\n    CuAssertStrEquals(tc, \"YWJj\", buff);\n    CuAssertTrue(tc, ret == 4);\n\n    ret = aos_base64_encode((unsigned char *)\"abcd\", 4, buff);\n    CuAssertStrEquals(tc, \"YWJjZA==\", buff);\n    CuAssertTrue(tc, ret == 8);\n\n    ret = aos_base64_encode((unsigned char *)\"abcde\", 5, buff);\n    CuAssertStrEquals(tc, \"YWJjZGU=\", buff);\n    CuAssertTrue(tc, ret == 8);\n\n    memset(buff, 0, 32);\n    ret = aos_base64_encode((unsigned char *)\"\", 0, buff);\n    CuAssertStrEquals(tc, \"\", buff);\n    CuAssertTrue(tc, ret == 0);\n\n    memset(buff, 0, 32);\n    ret = aos_base64_encode((unsigned char *)\"A\", 1, buff);\n    CuAssertStrEquals(tc, \"QQ==\", buff);\n    CuAssertTrue(tc, ret == 4);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_oss_get_file_info(CuTest *tc) {\n    aos_pool_t *p;\n    apr_finfo_t finfo;\n    aos_string_t filepath;\n    apr_status_t s;\n\n    aos_pool_create(&p, NULL);\n    aos_str_set(&filepath, test_file);\n\n    s = oss_get_file_info(&filepath, p, &finfo); \n    CuAssertIntEquals(tc, AOSE_OK, s);\n\n    CuAssertTrue(tc, finfo.size == 769686);\n    CuAssertTrue(tc, finfo.mtime > 1484755200000000L);\n\n    // negative\n    aos_str_set(&filepath, \"\");\n\n    s = oss_get_file_info(&filepath, p, &finfo); \n    CuAssertTrue(tc, AOSE_OK != s);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\n/*\n * aos_buf.c\n */\n\nvoid test_aos_open_file_for_read(CuTest *tc) {\n    aos_pool_t *p;\n    aos_file_buf_t *fb;\n    apr_status_t s;\n\n    aos_pool_create(&p, NULL);\n\n    fb = aos_create_file_buf(p);\n    s = aos_open_file_for_read(p, test_file, fb);\n    CuAssertIntEquals(tc, AOSE_OK, s);\n    CuAssertTrue(tc, fb->file_pos == 0);\n    CuAssertTrue(tc, fb->file_last == 769686);\n\n    apr_file_close(fb->file);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_aos_create_buf_fail(CuTest *tc) {\n    aos_pool_t *p = NULL;\n    aos_buf_t *buff;\n    aos_pool_create(&p, NULL);\n    buff = aos_create_buf(p, -100);\n    CuAssertTrue(tc, buff == NULL);\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_aos_open_file_for_read_fail(CuTest *tc) {\n    aos_pool_t *p;\n    aos_file_buf_t *fb;\n    apr_status_t s;\n\n    aos_pool_create(&p, NULL);\n    fb = aos_create_file_buf(p);\n    s = aos_open_file_for_read(p, \"invalid-path\", fb);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s);\n\n#if !defined(WIN32)\n    s = aos_open_file_for_read(p, NULL, fb);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s);\n#endif\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_aos_open_file_for_range_read_fail(CuTest *tc) {\n    aos_pool_t *p;\n    aos_file_buf_t *fb;\n    apr_status_t s;\n\n    aos_pool_create(&p, NULL);\n\n    fb = aos_create_file_buf(p);\n    s = aos_open_file_for_range_read(p, test_file, 769696, 769686, fb);\n    CuAssertIntEquals(tc, AOSE_OK, s);\n    CuAssertTrue(tc, fb->file_pos == 769686);\n    CuAssertTrue(tc, fb->file_last == 769686);\n\n    apr_file_close(fb->file);\n\n    s = aos_open_file_for_range_read(p, \"invalid-path\", 769696, 769686, fb);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_aos_open_file_for_write_fail(CuTest *tc) {\n    aos_pool_t *p;\n    aos_file_buf_t *fb;\n    apr_status_t s;\n\n    aos_pool_create(&p, NULL);\n    fb = aos_create_file_buf(p);\n    s = aos_open_file_for_write(p, \"g:/invalid-path\", fb);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s);\n\n#if !defined(WIN32)\n    s = aos_open_file_for_write(p, NULL, fb);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s);\n#endif\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_aos_open_file_for_write_notrunc_fail(CuTest *tc) {\n    aos_pool_t *p;\n    aos_file_buf_t *fb;\n    apr_status_t s;\n\n    aos_pool_create(&p, NULL);\n    fb = aos_create_file_buf(p);\n    s = aos_open_file_for_write_notrunc(p, \"g:/invalid-path\", fb);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s);\n\n    s = aos_open_file_for_write_notrunc(p, \"\", fb);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s);\n\n#if !defined(WIN32)\n    s = aos_open_file_for_write_notrunc(p, NULL, fb);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s);\n#endif\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_aos_buf_append_string_fail(CuTest *tc) {\n\n    aos_buf_append_string(NULL, NULL, NULL, -1);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\n/*\n*aos_http_io.c\n*/\n\nvoid test_aos_request_get_release(CuTest *tc) {\n\n    CURL * handle[AOS_REQUEST_STACK_SIZE + 2];\n    int i;\n\n    for (i = 0; i < AOS_REQUEST_STACK_SIZE + 2; i++) {\n        handle[i] = aos_request_get();\n    }\n\n    for (i = 0; i < AOS_REQUEST_STACK_SIZE + 2; i++) {\n        request_release(handle[i]);\n    }\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_aos_http_controller_create(CuTest *tc) {\n    aos_pool_t *p = NULL;\n    aos_http_controller_t * ctr = NULL;\n\n    ctr = aos_http_controller_create(p, 0);\n    CuAssertTrue(tc, p == NULL);\n    CuAssertTrue(tc, ctr != NULL);\n    CuAssertTrue(tc, ctr->pool != NULL);\n    aos_pool_destroy(ctr->pool);\n\n    CuAssertTrue(tc, ctr->options->verify_ssl == AOS_TRUE);\n    CuAssertTrue(tc, ctr->options->ca_file == NULL);\n    CuAssertTrue(tc, ctr->options->ca_path == NULL);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_aos_read_http_body_file_fail(CuTest *tc) {\n    aos_pool_t *p = NULL;\n    aos_http_request_t *req;\n    aos_file_buf_t *fb;\n    int ret;\n    apr_file_t *thefile;\n    char buffer[16];\n\n    aos_pool_create(&p, NULL);\n    fb = aos_create_file_buf(p);\n    req = aos_http_request_create(p);\n\n    CuAssertTrue(tc, req != NULL);\n    CuAssertTrue(tc, fb != NULL);\n\n    ret = aos_read_http_body_file(req, NULL, 0);\n    CuAssertTrue(tc, ret == AOSE_INVALID_ARGUMENT);\n\n    req->file_buf = fb;\n    ret = aos_read_http_body_file(req, NULL, 0);\n    CuAssertTrue(tc, ret == AOSE_INVALID_ARGUMENT);\n\n    req->file_buf = aos_create_file_buf(p);\n    apr_file_open(&thefile, \"test_file_to_read\", APR_CREATE | APR_WRITE, APR_UREAD | APR_UWRITE | APR_GREAD, p);\n    CuAssertTrue(tc, thefile != NULL);\n    req->file_buf->file = thefile;\n    apr_file_close(thefile);\n    req->file_buf->file_pos = 0;\n    req->file_buf->file_last = 2;\n    ret = aos_read_http_body_file(req, buffer, 1);\n    CuAssertTrue(tc, ret == AOSE_FILE_READ_ERROR);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_aos_write_http_body_file_fail(CuTest *tc) {\n    aos_pool_t *p = NULL;\n    aos_http_response_t *resp;\n    int ret;\n    apr_file_t *thefile;\n\n    aos_pool_create(&p, NULL);\n    resp = aos_http_response_create(p);\n\n    CuAssertTrue(tc, resp != NULL);\n\n    ret = aos_write_http_body_file(resp, NULL, 0);\n    CuAssertTrue(tc, resp->file_buf != NULL);\n    CuAssertTrue(tc, ret == AOSE_INVALID_ARGUMENT);\n\n    resp->file_path = \"g:/invalid-path\";\n    ret = aos_write_http_body_file(resp, NULL, 0);\n    CuAssertTrue(tc, ret == AOSE_OPEN_FILE_ERROR);\n\n    resp->file_buf = aos_create_file_buf(p);\n    apr_file_open(&thefile, \"test_file_to_write\", APR_CREATE | APR_WRITE, APR_UREAD | APR_UWRITE | APR_GREAD, p);\n    CuAssertTrue(tc, thefile != NULL);\n    resp->file_buf->file = thefile;\n    apr_file_close(thefile);\n    ret = aos_write_http_body_file(resp, NULL, 0);\n    CuAssertTrue(tc, ret == AOSE_FILE_WRITE_ERROR);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\n/*\n * aos_util.c\n */\nvoid test_aos_parse_xml_body_fail(CuTest *tc) {\n    aos_pool_t *p;\n    aos_list_t buffer;\n    aos_buf_t *content;\n    mxml_node_t *root;\n    char *invalid_xml = \"invalid\";\n    int ret;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\n    aos_list_add_tail(&content->node, &buffer);\n    ret = aos_parse_xml_body(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_INTERNAL_ERROR, ret);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_aos_http_method_to_string(CuTest *tc) {\n    const char *msg = NULL;\n    msg = aos_http_method_to_string((http_method_e)10);\n    CuAssertStrEquals(tc, \"UNKNOWN\", msg);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void fstack_func1_pt(void *a)\n{\n}\nstatic void fstack_func2_pt()\n{\n}\nstatic int fstack_func3_pt(void *a)\n{\n    return 0;\n}\nstatic int fstack_func4_pt()\n{\n    return 0;\n}\n\nvoid test_aos_fstack(CuTest *tc) {\n    aos_pool_t *p;\n    aos_array_header_t *header;\n    aos_fstack_item_t *item;\n    aos_func_u func_u;\n\n    aos_pool_create(&p, NULL);\n\n    header = aos_fstack_create(p, 5);\n    CuAssertTrue(tc, header != NULL);\n\n    func_u.func1 = fstack_func1_pt;\n    aos_fstack_push(header, NULL, func_u, 1);\n    func_u.func2 = fstack_func2_pt;\n    aos_fstack_push(header, NULL, func_u, 2);\n    func_u.func3 = fstack_func3_pt;\n    aos_fstack_push(header, NULL, func_u, 3);\n    func_u.func4 = fstack_func4_pt;\n    aos_fstack_push(header, NULL, func_u, 4);\n    aos_fstack_push(header, NULL, func_u, 5);\n\n    item = aos_fstack_pop(header);\n    CuAssertTrue(tc, item != NULL);\n    CuAssertTrue(tc, item->order == 5);\n    item = aos_fstack_pop(header);\n    CuAssertTrue(tc, item != NULL);\n    CuAssertTrue(tc, item->order == 4);\n    item = aos_fstack_pop(header);\n    CuAssertTrue(tc, item != NULL);\n    CuAssertTrue(tc, item->order == 3);\n    item = aos_fstack_pop(header);\n    CuAssertTrue(tc, item != NULL);\n    CuAssertTrue(tc, item->order == 2);\n    item = aos_fstack_pop(header);\n    CuAssertTrue(tc, item != NULL);\n    CuAssertTrue(tc, item->order == 1);\n\n    item = aos_fstack_pop(header);\n    CuAssertTrue(tc, item == NULL);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_oss_create_api_result_content(CuTest *tc) {\n    aos_pool_t *p;\n    void *ret_void;\n    aos_pool_create(&p, NULL);\n\n    ret_void = oss_create_api_result_content(p, -10);\n    CuAssertTrue(tc, ret_void == NULL);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_get_string_to_sign_negative(CuTest *tc) {\n    aos_pool_t *p;\n    int ret;\n    aos_string_t canon_res;\n    aos_table_t *headers;\n    aos_table_t *params;\n    aos_string_t signstr;\n    char special_query[AOS_MAX_QUERY_ARG_LEN+1];\n    char special_header[AOS_MAX_HEADER_LEN + 1];\n\n    aos_pool_create(&p, NULL);\n\n    aos_str_set(&canon_res, \"\");\n    headers = aos_table_make(p, 1);\n    params = aos_table_make(p, 1);\n    apr_table_set(headers, OSS_CONTENT_TYPE, \"image/jpeg\");\n    ret = oss_get_string_to_sign(p, HTTP_GET, &canon_res, headers, params, &signstr);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, ret);\n\n    aos_str_set(&canon_res, \"\");\n    headers = aos_table_make(p, 1);\n    params = aos_table_make(p, 1);\n    apr_table_set(headers, OSS_CANNONICALIZED_HEADER_DATE, \"Fri, 06 Sep 2019 08:54:24 GMT\");\n    ret = oss_get_string_to_sign(p, HTTP_GET, &canon_res, headers, NULL, &signstr);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    //long params \n    aos_str_set(&canon_res, \"\");\n    headers = aos_table_make(p, 1);\n    params = aos_table_make(p, 1);\n    apr_table_set(headers, OSS_CANNONICALIZED_HEADER_DATE, \"Fri, 06 Sep 2019 08:54:24 GMT\");\n    memset(special_query, 0x30, AOS_MAX_QUERY_ARG_LEN);\n    special_query[AOS_MAX_QUERY_ARG_LEN] = '\\0';\n    apr_table_set(params, \"x-oss-process\", special_query);\n    ret = oss_get_string_to_sign(p, HTTP_GET, &canon_res, headers, params, &signstr);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, ret);\n\n    //user meta header too many\n    aos_str_set(&canon_res, \"\");\n    headers = aos_table_make(p, 1);\n    params = aos_table_make(p, 1);\n    apr_table_set(headers, OSS_CANNONICALIZED_HEADER_DATE, \"Fri, 06 Sep 2019 08:54:24 GMT\");\n    memset(special_header, 0x30, AOS_MAX_HEADER_LEN);\n    special_header[AOS_MAX_HEADER_LEN] = '\\0';\n    apr_table_set(headers, \"x-oss-meta-user1\", special_header);\n    ret = oss_get_string_to_sign(p, HTTP_GET, &canon_res, headers, params, &signstr);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_sign_request_negative(CuTest *tc) {\n    aos_pool_t *p;\n    oss_config_t config;\n    aos_http_request_t *req;\n    int ret;\n    char special_res[AOS_MAX_URI_LEN + 1];\n\n    aos_pool_create(&p, NULL);\n\n    req = aos_http_request_create(p);\n    memset(special_res, 0x30, AOS_MAX_URI_LEN);\n    special_res[AOS_MAX_URI_LEN] = '\\0';\n    req->resource = special_res;\n    ret = oss_sign_request(req, &config);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, ret);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_get_oss_request_signature_negative(CuTest *tc) {\n    aos_pool_t *p;\n    oss_request_options_t *option;\n    aos_http_request_t *req;\n    char special_query[AOS_MAX_QUERY_ARG_LEN + 1];\n    int ret;\n    aos_string_t expires;\n    aos_string_t signature;\n\n    aos_pool_create(&p, NULL);\n    option = oss_request_options_create(p);\n    req = aos_http_request_create(p);\n    req->headers = aos_table_make(p, 1);\n    req->query_params = aos_table_make(p, 1);\n    init_test_request_options(option, 0);\n    memset(special_query, 0x30, AOS_MAX_QUERY_ARG_LEN);\n    special_query[AOS_MAX_QUERY_ARG_LEN] = '\\0';\n    apr_table_set(req->query_params, \"x-oss-process\", special_query);\n    aos_str_set(&expires, \"12343\");\n    ret = get_oss_request_signature(option, req, &expires, &signature);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, ret);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_get_signed_url_negative(CuTest *tc) {\n    aos_pool_t *p;\n    oss_request_options_t *option;\n    aos_http_request_t *req;\n    char special_query[AOS_MAX_QUERY_ARG_LEN + 1];\n    char speical_path[AOS_MAX_URI_LEN + 1];\n    int ret;\n    aos_string_t expires;\n    aos_string_t signed_url;\n\n    aos_pool_create(&p, NULL);\n\n    memset(special_query, 0x30, AOS_MAX_QUERY_ARG_LEN);\n    special_query[AOS_MAX_QUERY_ARG_LEN] = '\\0';\n    memset(speical_path, 0x30, AOS_MAX_URI_LEN);\n    speical_path[AOS_MAX_URI_LEN] = '\\0';\n    aos_str_set(&expires, \"12343\");\n\n    option = oss_request_options_create(p);\n    req = aos_http_request_create(p);\n    req->query_params = aos_table_make(p, 1);\n    init_test_request_options(option, 0);\n    if (option->config->signature_version != 4) {\n        apr_table_set(req->query_params, \"x-oss-process\", special_query);\n        ret = oss_get_signed_url(option, req, &expires, &signed_url);\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, ret);\n    }\n/*\n    init_test_request_options(option, 0);\n    req = aos_http_request_create(p);\n    //req->resource = \"TEST\";\n    ret = oss_get_signed_url(option, req, &expires, &signed_url);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, ret);\n\n\n\n    //aos_str_set(&option->config->sts_token, \"test\");\n    aos_str_set(&option->config->endpoint, \"\");\n    req->query_params = aos_table_make(p, 1);\n    req->uri = speical_path;\n    ret = oss_get_signed_url(option, req, &expires, &signed_url);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, ret);\n    aos_pool_destroy(p);\n*/\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_get_rtmp_signed_url_negative(CuTest *tc) {\n    aos_pool_t *p;\n    oss_request_options_t *option;\n    aos_http_request_t *req;\n    char special_query[AOS_MAX_QUERY_ARG_LEN + 1];\n    int ret;\n    aos_string_t expires;\n    aos_string_t play_list_name;\n    aos_string_t signed_url;\n    aos_table_t *params;\n\n    aos_pool_create(&p, NULL);\n\n    memset(special_query, 0x30, AOS_MAX_QUERY_ARG_LEN);\n    special_query[AOS_MAX_QUERY_ARG_LEN] = '\\0';\n    aos_str_set(&expires, \"12343\");\n    aos_str_set(&play_list_name, \"test\");\n\n    option = oss_request_options_create(p);\n    req = aos_http_request_create(p);\n    init_test_request_options(option, 0);\n    apr_table_set(req->query_params, \"x-oss-process\", special_query);\n\n    params = aos_table_make(p, 1);\n    apr_table_set(params, \"x-oss-param1\", \"test1\");\n    apr_table_set(params, \"x-oss-param2\", \"test2\");\n\n    req->uri = \"test\";\n    ret = oss_get_rtmp_signed_url(option, req, &expires, &play_list_name, params, &signed_url);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, ret);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_is_valid_bucket_name(CuTest *tc) {\n    int i;\n    aos_string_t name;\n    char *invalid_name_list[] =\n    { \"a\", \"1\", \"!\", \"aa\", \"12\", \"a1\",\n        \"a!\", \"1!\", \"aAa\", \"1A1\", \"a!a\", \"FengChao@123\", \"-a123\", \"a_123\", \"a123-\",\n        \"1234567890123456789012345678901234567890123456789012345678901234\", \"\"\n    };\n\n    for (i = 0; i < sizeof(invalid_name_list) / sizeof(invalid_name_list[0]); i++) {\n        aos_str_set(&name, invalid_name_list[i]);\n        CuAssertIntEquals(tc, 0, oss_is_valid_bucket_name(&name));\n    }\n\n    aos_str_null(&name);\n    CuAssertIntEquals(tc, 0, oss_is_valid_bucket_name(&name));\n\n    CuAssertIntEquals(tc, 0, oss_is_valid_bucket_name(NULL));\n\n    aos_str_set(&name, \"valid-bucket-name-1234\");\n    CuAssertIntEquals(tc, 1, oss_is_valid_bucket_name(&name));\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_is_valid_object_name(CuTest *tc) {\n    aos_string_t name;\n    aos_str_set(&name, \"\");\n    CuAssertIntEquals(tc, 0, oss_is_valid_object_name(&name));\n\n    aos_str_null(&name);\n    CuAssertIntEquals(tc, 0, oss_is_valid_object_name(&name));\n\n    CuAssertIntEquals(tc, 0, oss_is_valid_object_name(NULL));\n\n    aos_str_set(&name, \"?\");\n    CuAssertIntEquals(tc, 1, oss_is_valid_object_name(&name));\n \n    //ex\n    aos_str_set(&name, \"\");\n    CuAssertIntEquals(tc, 0, oss_is_valid_object_name_ex(&name, 1));\n\n    aos_str_null(&name);\n    CuAssertIntEquals(tc, 0, oss_is_valid_object_name_ex(&name, 1));\n\n    CuAssertIntEquals(tc, 0, oss_is_valid_object_name_ex(&name, 1));\n\n    aos_str_set(&name, \"?\");\n    CuAssertIntEquals(tc, 0, oss_is_valid_object_name_ex(&name, 1));\n\n    aos_str_set(&name, \"?123\");\n    CuAssertIntEquals(tc, 0, oss_is_valid_object_name_ex(&name, 1));\n\n\n    aos_str_set(&name, \"\");\n    CuAssertIntEquals(tc, 0, oss_is_valid_object_name_ex(&name, 0));\n\n    aos_str_null(&name);\n    CuAssertIntEquals(tc, 0, oss_is_valid_object_name_ex(&name, 0));\n\n    CuAssertIntEquals(tc, 0, oss_is_valid_object_name_ex(&name, 0));\n\n    aos_str_set(&name, \"?\");\n    CuAssertIntEquals(tc, 1, oss_is_valid_object_name_ex(&name, 0));\n\n    aos_str_set(&name, \"?123\");\n    CuAssertIntEquals(tc, 1, oss_is_valid_object_name_ex(&name, 0));\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_preprocess_endpoint(CuTest *tc) {\n    int i;\n    aos_string_t name;\n    char *endpoints[] =\n    {\n        \"www.test.com/abc\",\n        \"www.test.com/abc?test=1\",\n        \"www.test.com/abc?test=1#segment\",\n        \"www.test.com?test=1#segment\",\n        \"www.test.com#abc\",\n        \"www.test.com\"\n    };\n\n    char *ip_endpoints[] = \n    {\n        \"192.168.1.1:8080/abc\",\n        \"192.168.1.1:8080/abc?test=1\",\n        \"192.168.1.1:8080?test=1#segment\",\n        \"192.168.1.1:8080\"\n    };\n\n    char *ip_endpoints2[] =\n    {\n        \"192.168.1.1/abc\",\n        \"192.168.1.1/abc?test=1\",\n        \"192.168.1.1?test=1#segment\",\n        \"192.168.1.1\"\n    };\n\n    for (i = 0; i < sizeof(endpoints) / sizeof(endpoints[0]); i++) {\n        aos_str_set(&name, endpoints[i]);\n        oss_preprocess_endpoint(&name);\n        CuAssertIntEquals(tc, strlen(\"www.test.com\"), name.len);\n        CuAssertIntEquals(tc, 0, strncmp(\"www.test.com\", name.data, name.len));\n    }\n    CuAssertIntEquals(tc, 6, i);\n\n    for (i = 0; i < sizeof(ip_endpoints) / sizeof(ip_endpoints[0]); i++) {\n        aos_str_set(&name, ip_endpoints[i]);\n        oss_preprocess_endpoint(&name);\n        CuAssertIntEquals(tc, strlen(\"192.168.1.1:8080\"), name.len);\n        CuAssertIntEquals(tc, 0, strncmp(\"192.168.1.1:8080\", name.data, name.len));\n    }\n    CuAssertIntEquals(tc, 4, i);\n\n    for (i = 0; i < sizeof(ip_endpoints2) / sizeof(ip_endpoints2[0]); i++) {\n        aos_str_set(&name, ip_endpoints2[i]);\n        oss_preprocess_endpoint(&name);\n        CuAssertIntEquals(tc, strlen(\"192.168.1.1\"), name.len);\n        CuAssertIntEquals(tc, 0, strncmp(\"192.168.1.1\", name.data, name.len));\n    }\n    CuAssertIntEquals(tc, 4, i);\n\n    aos_str_set(&name, \"\");\n    oss_preprocess_endpoint(&name);\n    CuAssertIntEquals(tc, 0, name.len);\n\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_get_host_from_authority(CuTest *tc) {\n    aos_pool_t *p;\n    oss_request_options_t *option;\n    int i;\n    aos_string_t name;\n    char *value;\n    char *authoritys[] =\n    {\n        \"www.test.com:8192\",\n        \"www.test.com\",\n        \"test:test@www.test.com:80\",\n        \"test:test@www.test.com\",\n    };\n\n    char *ip_authoritys[] =\n    {\n        \"192.168.1.1:8192\",\n        \"192.168.1.1\",\n        \"test:test@192.168.1.1:8192\",\n        \"test:test@192.168.1.1\",\n    };\n\n    aos_pool_create(&p, NULL);\n    option = oss_request_options_create(p);\n\n    for (i = 0; i < sizeof(authoritys) / sizeof(authoritys[0]); i++) {\n        aos_str_set(&name, authoritys[i]);\n        value = oss_get_host_from_authority(option, &name);\n        CuAssertStrEquals(tc, value, \"www.test.com\");\n    }\n    CuAssertIntEquals(tc, 4, i);\n\n    for (i = 0; i < sizeof(ip_authoritys) / sizeof(ip_authoritys[0]); i++) {\n        aos_str_set(&name, ip_authoritys[i]);\n        value = oss_get_host_from_authority(option, &name);\n        CuAssertStrEquals(tc, value, \"192.168.1.1\");\n    }\n    CuAssertIntEquals(tc, 4, i);\n\n    aos_str_set(&name, \"\");\n    value = oss_get_host_from_authority(option, &name);\n    CuAssertPtrEquals(tc, value, NULL);\n\n    value = oss_get_host_from_authority(option, NULL);\n    CuAssertPtrEquals(tc, value, NULL);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\n\nvoid test_oss_fill_read_response_header(CuTest *tc) {\n    aos_table_t *headers;\n    oss_fill_read_response_header(NULL, &headers);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\n\nstatic void test_oss_is_valid_host(CuTest *tc) {\n    int i;\n    const char *valid_host[] =\n    {\n        \"www.test.com:8192\",\n        \"www.test.com\",\n        \"test:test@www.test.com:80\",\n        \"test:test@www.test.com\",\n        \"192.168.1.1:8192\",\n        \"192.168.1.1\",\n        \"test:test@192.168.1.1:8192\",\n        \"test:test@192.168.1.1\",\n        \"www.test-inc_CN.com\",\n        \"a\"\n    };\n\n    const char *invalid_host[] =\n    {\n        \"www.test.com#www.test.cn:8192\",\n        \"test:test@www.test.com#www.test.cn:8192\",\n        \"www.test.com#www.test.cn\",\n        \"www.test.com\\\\www.test.cn\",\n        \"\",\n        \":\",\n        \"@:\",\n        NULL\n    };\n\n    for (i = 0; i < sizeof(valid_host) / sizeof(valid_host[0]); i++) {\n        CuAssertIntEquals(tc, 1, oss_is_valid_host(valid_host[i]));\n    }\n    CuAssertIntEquals(tc, 10, i);\n\n    for (i = 0; i < sizeof(invalid_host) / sizeof(invalid_host[0]); i++) {\n        CuAssertIntEquals(tc, 0, oss_is_valid_host(invalid_host[i]));\n    }\n    CuAssertIntEquals(tc, 8, i);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nCuSuite *test_aos()\n{\n    CuSuite* suite = CuSuiteNew();\n    \n    SUITE_ADD_TEST(suite, test_aos_setup);\n    SUITE_ADD_TEST(suite, test_get_xml_doc_with_empty_aos_list);\n    SUITE_ADD_TEST(suite, test_aos_list_movelist_with_empty_list);\n    SUITE_ADD_TEST(suite, test_starts_with_failed);\n    SUITE_ADD_TEST(suite, test_is_valid_ip);\n    SUITE_ADD_TEST(suite, test_oss_config_resolve);\n    SUITE_ADD_TEST(suite, test_oss_request_options_create_with_null_pool);\n    SUITE_ADD_TEST(suite, test_oss_get_service_uri);\n    SUITE_ADD_TEST(suite, test_oss_get_rtmp_uri);\n    SUITE_ADD_TEST(suite, test_oss_write_request_body_from_file);\n    SUITE_ADD_TEST(suite, test_oss_write_request_body_from_upload_file);\n    SUITE_ADD_TEST(suite, test_oss_init_read_response_body_to_file);\n    SUITE_ADD_TEST(suite, test_oss_create_bucket_info);\n    SUITE_ADD_TEST(suite, test_oss_get_part_size);\n    SUITE_ADD_TEST(suite, test_part_sort_cmp);\n    SUITE_ADD_TEST(suite, test_set_content_type);\n    SUITE_ADD_TEST(suite, test_oss_check_crc_consistent);\n    SUITE_ADD_TEST(suite, test_oss_get_object_uri_with_cname);\n    SUITE_ADD_TEST(suite, test_oss_get_object_uri_with_ip);\n    SUITE_ADD_TEST(suite, test_oss_get_bucket_uri_with_cname);\n    SUITE_ADD_TEST(suite, test_oss_get_bucket_uri_with_ip);\n    SUITE_ADD_TEST(suite, test_oss_temp_file_rename);\n    SUITE_ADD_TEST(suite, test_oss_init_select_object_read_response_body);\n    SUITE_ADD_TEST(suite, test_oss_check_select_object_status);\n    SUITE_ADD_TEST(suite, test_oss_check_create_select_object_meta_status);\n    SUITE_ADD_TEST(suite, test_oss_init_create_select_object_meta_read_response_body);\n    SUITE_ADD_TEST(suite, test_aos_log_format_default);\n    SUITE_ADD_TEST(suite, test_aos_log_print_default_with_null_file);\n    SUITE_ADD_TEST(suite, test_aos_curl_code_to_status);\n    SUITE_ADD_TEST(suite, test_aos_unquote_str);\n    SUITE_ADD_TEST(suite, test_aos_ends_with);\n    SUITE_ADD_TEST(suite, test_aos_string_is_empty);\n    SUITE_ADD_TEST(suite, test_aos_url_encode_failed);\n    SUITE_ADD_TEST(suite, test_aos_url_encode_with_blank_char);\n    SUITE_ADD_TEST(suite, test_aos_url_encode_ex_with_blank_char);\n    SUITE_ADD_TEST(suite, test_aos_url_decode_with_percent);\n    SUITE_ADD_TEST(suite, test_aos_url_decode_with_add);\n    SUITE_ADD_TEST(suite, test_aos_url_decode_failed);\n    SUITE_ADD_TEST(suite, test_aos_should_retry);\n    SUITE_ADD_TEST(suite, test_aos_status_parse_from_body_fail);\n    SUITE_ADD_TEST(suite, test_aos_strtoll);\n    SUITE_ADD_TEST(suite, test_aos_strtoull);\n    SUITE_ADD_TEST(suite, test_aos_base64_encode);\n    SUITE_ADD_TEST(suite, test_oss_get_file_info); \n    SUITE_ADD_TEST(suite, test_aos_open_file_for_read);\n    SUITE_ADD_TEST(suite, test_aos_create_buf_fail);\n    SUITE_ADD_TEST(suite, test_aos_open_file_for_read_fail);\n    SUITE_ADD_TEST(suite, test_aos_open_file_for_range_read_fail);\n    SUITE_ADD_TEST(suite, test_aos_open_file_for_write_fail);\n    SUITE_ADD_TEST(suite, test_aos_open_file_for_write_notrunc_fail);\n    SUITE_ADD_TEST(suite, test_aos_buf_append_string_fail);\n    SUITE_ADD_TEST(suite, test_aos_request_get_release);\n    SUITE_ADD_TEST(suite, test_aos_http_controller_create);\n    SUITE_ADD_TEST(suite, test_aos_read_http_body_file_fail);\n    SUITE_ADD_TEST(suite, test_aos_write_http_body_file_fail);\n    SUITE_ADD_TEST(suite, test_aos_parse_xml_body_fail);\n    SUITE_ADD_TEST(suite, test_aos_http_method_to_string);\n    SUITE_ADD_TEST(suite, test_aos_fstack);\n    SUITE_ADD_TEST(suite, test_oss_create_api_result_content);\n    SUITE_ADD_TEST(suite, test_oss_get_string_to_sign_negative);\n    SUITE_ADD_TEST(suite, test_oss_sign_request_negative);\n    SUITE_ADD_TEST(suite, test_get_oss_request_signature_negative);\n    SUITE_ADD_TEST(suite, test_oss_get_signed_url_negative);\n    SUITE_ADD_TEST(suite, test_oss_get_rtmp_signed_url_negative);\n    SUITE_ADD_TEST(suite, test_oss_is_valid_bucket_name);\n    SUITE_ADD_TEST(suite, test_oss_preprocess_endpoint);\n    SUITE_ADD_TEST(suite, test_oss_fill_read_response_header);\n    SUITE_ADD_TEST(suite, test_oss_get_host_from_authority);\n    SUITE_ADD_TEST(suite, test_oss_is_valid_host);\n    SUITE_ADD_TEST(suite, test_oss_is_valid_object_name);\n\n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_bucket.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n\nvoid test_bucket_setup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n    char *object_name1 = \"oss_test_object1\";\n    char *object_name2 = \"oss_test_object2\";\n    char *object_name3 = \"oss_tmp1/\";\n    char *object_name4 = \"oss_tmp2/\";\n    char *object_name5 = \"oss_tmp3/\";\n    char *object_name6 = \"oss_tmp3/1\";\n    char *str = \"test c oss sdk\";\n    aos_table_t *headers1 = NULL;\n    aos_table_t *headers2 = NULL;\n    aos_table_t *headers3 = NULL;\n    aos_table_t *headers4 = NULL;\n    aos_table_t *headers5 = NULL;\n    int i = 0;\n\n    //set bucket name\n    TEST_BUCKET_NAME = get_test_bucket_name(aos_global_pool, \"bucket\");\n\n    //set log level, default AOS_LOG_WARN\n    aos_log_set_level(AOS_LOG_WARN);\n\n    //set log output, default stderr\n    aos_log_set_output(NULL);\n\n    //create test bucket\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n    TEST_CASE_LOG(\"create test bucket success!\\n\");\n\n    //create test object\n    headers1 = aos_table_make(p, 0);\n    headers2 = aos_table_make(p, 0);\n    headers3 = aos_table_make(p, 0);\n    headers4 = aos_table_make(p, 0);\n    headers5 = aos_table_make(p, 0);\n    create_test_object(options, TEST_BUCKET_NAME, object_name1, str, headers1);\n    create_test_object(options, TEST_BUCKET_NAME, object_name2, str, headers2);\n    create_test_object(options, TEST_BUCKET_NAME, object_name3, str, headers3);\n    create_test_object(options, TEST_BUCKET_NAME, object_name4, str, headers4);\n    create_test_object(options, TEST_BUCKET_NAME, object_name5, str, headers5);\n    for (i = 0; i < 1100; i++) {\n        char *obj_name = apr_psprintf(p, \"%s/%d.txt\", object_name6, i);\n        create_test_object(options, TEST_BUCKET_NAME, obj_name, str, NULL);\n    }\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_bucket_cleanup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t prefix;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n\n    // delete objects\n    aos_str_set(&prefix, \"oss_test_object\");\n    oss_delete_objects_by_prefix(options, &bucket, &prefix);\n    \n    aos_str_set(&prefix, \"oss_tmp1\");\n    oss_delete_objects_by_prefix(options, &bucket, &prefix);\n\n    aos_str_set(&prefix, \"oss_tmp2\");\n    oss_delete_objects_by_prefix(options, &bucket, &prefix);\n\n    aos_str_set(&prefix, \"oss_tmp3\");\n    oss_delete_objects_by_prefix(options, &bucket, &prefix);\n\n    // delete all objects\n    prefix.data = NULL;\n    prefix.len = 0;\n    oss_delete_objects_by_prefix(options, &bucket, &prefix);\n\n    /* delete test bucket */\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_delete_bucket(options, &bucket, &resp_headers);\n\n    aos_pool_destroy(p);\n}\n\nvoid test_create_bucket(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    oss_acl = OSS_ACL_PRIVATE;\n\n    //create the same bucket twice with same bucket acl\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n\n    //create the same bucket with different bucket acl\n    oss_acl = OSS_ACL_PUBLIC_READ;\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n    aos_pool_destroy(p);\n\n    printf(\"test_create_bucket ok\\n\");\n}\n\nvoid test_create_bucket_with_storage_class(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    aos_string_t bucket;\n    aos_table_t *resp_headers = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n    oss_storage_class_type_e storage_class_tp = OSS_STORAGE_CLASS_IA;\n    char IA_BUCKET_NAME[128] = {0};\n    apr_snprintf(IA_BUCKET_NAME, 127, \"%s-ia\", TEST_BUCKET_NAME);\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    aos_str_set(&bucket, IA_BUCKET_NAME);\n    oss_delete_bucket(options, &bucket, &resp_headers);\n    apr_sleep(apr_time_from_sec(5));\n\n    //create the bucket with storage class\n    s = create_test_bucket_with_storage_class(options, IA_BUCKET_NAME, oss_acl, storage_class_tp);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n\n     //create the same bucket again with different storage class\n    s = create_test_bucket_with_storage_class(options, IA_BUCKET_NAME, \n                                            oss_acl, OSS_STORAGE_CLASS_ARCHIVE);\n    // 409: BucketAlreadyExists Cannot modify existing bucket's storage class\n    CuAssertIntEquals(tc, 409, s->code);\n\n     //create the same bucket again with different storage class\n    s = create_test_bucket_with_storage_class(options, IA_BUCKET_NAME, \n                                            oss_acl, OSS_STORAGE_CLASS_STANDARD);\n    // 409: BucketAlreadyExists Cannot modify existing bucket's storage class\n    CuAssertIntEquals(tc, 409, s->code);\n\n    //delete bucket \n    aos_str_set(&bucket, IA_BUCKET_NAME);\n    s = oss_delete_bucket(options, &bucket, &resp_headers);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_delete_bucket(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_status_t *s = NULL;\n    aos_string_t bucket;\n    oss_acl_e oss_acl;\n    int is_cname = 0;\n    oss_request_options_t *options;\n    aos_table_t *resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_acl = OSS_ACL_PUBLIC_READ;\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n\n    //delete bucket not empty\n    s = oss_delete_bucket(options, &bucket, &resp_headers);\n    CuAssertIntEquals(tc, 409, s->code);\n    CuAssertStrEquals(tc, \"BucketNotEmpty\", s->error_code);\n    CuAssertTrue(tc, s->req_id != NULL);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_delete_bucket ok\\n\");\n}\n\nvoid test_put_bucket_acl(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_acl_e oss_acl;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_acl = OSS_ACL_PUBLIC_READ_WRITE;\n    s = oss_put_bucket_acl(options, &bucket, oss_acl, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    aos_pool_destroy(p);\n\n    printf(\"test_put_bucket_acl ok\\n\");\n}\n\n/* only object has OSS_ACL_DEFAULT acl, it will return 400 while put bucket acl to OSS_ACL_DEFAULT */\nvoid test_put_bucket_acl_invalid_acl(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_acl_e oss_acl;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_acl = OSS_ACL_DEFAULT;\n    s = oss_put_bucket_acl(options, &bucket, oss_acl, &resp_headers);\n    CuAssertIntEquals(tc, 400, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    CuAssertStrEquals(tc, \"InvalidArgument\", s->error_code); \n    aos_pool_destroy(p);\n\n    printf(\"test_put_bucket_acl_invalid_acl ok\\n\");\n}\n\nvoid test_get_bucket_acl(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_string_t oss_acl;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_get_bucket_acl(options, &bucket, &oss_acl, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertStrEquals(tc, \"public-read-write\", oss_acl.data);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_get_bucket_acl(options, &bucket, &oss_acl, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_get_bucket_acl ok\\n\");\n}\n\nvoid test_get_bucket_location(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_string_t oss_location;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_get_bucket_location(options, &bucket, &oss_location, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    TEST_CASE_LOG(\"endpoint: %s, location: %s\\n\", TEST_OSS_ENDPOINT, oss_location.data);\n    CuAssertIntEquals(tc, 1, oss_location.len != 0);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_get_bucket_location(options, &bucket, &oss_location, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_get_bucket_info(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_bucket_info_t bucket_info;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_get_bucket_info(options, &bucket, &bucket_info, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    TEST_CASE_LOG(\"endpoint: %s, location: %s\\n\", TEST_OSS_ENDPOINT, bucket_info.location.data);\n    TEST_CASE_LOG(\"user id %s, name %s, \\n\", bucket_info.owner_id.data, bucket_info.owner_name.data);\n    CuAssertTrue(tc, bucket_info.location.len != 0);\n    CuAssertTrue(tc, bucket_info.acl.len != 0);\n    CuAssertTrue(tc, bucket_info.created_date.len != 0);\n    CuAssertTrue(tc, bucket_info.extranet_endpoint.len != 0);\n    CuAssertTrue(tc, bucket_info.intranet_endpoint.len != 0);\n    CuAssertTrue(tc, bucket_info.owner_id.len != 0);\n    CuAssertTrue(tc, bucket_info.owner_name.len != 0);\n    CuAssertStrEquals(tc, bucket_info.storage_class.data, \"Standard\");\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_str_set(&bucket, \"impossibleexistbucket\");\n    s = oss_get_bucket_info(options, &bucket, &bucket_info, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_get_bucket_stat(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_bucket_stat_t bucket_stat;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_get_bucket_stat(options, &bucket, &bucket_stat, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    TEST_CASE_LOG(\"storage %d, object count %d, multipart upload count %d\\n\", \\\n            (int)bucket_stat.storage_in_bytes, (int)bucket_stat.object_count, (int)bucket_stat.multipart_upload_count);\n    CuAssertTrue(tc, bucket_stat.object_count > 0);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_get_bucket_stat(options, &bucket, &bucket_stat, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_head_bucket(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    char *oss_location = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_head_bucket(options, &bucket, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    oss_location = (char*)(apr_table_get(resp_headers, OSS_CANNONICALIZED_HEADER_REGION));\n    TEST_CASE_LOG(\"region is %s\\n\", oss_location);\n    CuAssertPtrNotNull(tc, oss_location);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_get_bucket_storage_capacity(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    long oss_storage_capacity = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_get_bucket_storage_capacity(options, &bucket, &oss_storage_capacity, &resp_headers);\n    TEST_CASE_LOG(\"get storage capacity %ld\\n\", oss_storage_capacity);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_get_bucket_storage_capacity(options, &bucket, &oss_storage_capacity, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_put_bucket_storage_capacity(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    long oss_storage_capacity = 0;\n    long capacity = 100;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_put_bucket_storage_capacity(options, &bucket, capacity, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    aos_pool_destroy(p);\n    TEST_CASE_LOG(\"set capacity %ld success\\n\", capacity);\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_get_bucket_storage_capacity(options, &bucket, &oss_storage_capacity, &resp_headers);\n    TEST_CASE_LOG(\"get storage capacity %ld\\n\", oss_storage_capacity);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, capacity, oss_storage_capacity);\n    CuAssertPtrNotNull(tc, resp_headers);\n    aos_pool_destroy(p);\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_put_bucket_storage_capacity(options, &bucket, -1, &resp_headers);\n    if (s->error_msg) {\n        printf(\"%s %s\\n\", s->error_msg, s->error_code);\n    }\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    aos_pool_destroy(p);\n\n    printf(\"test_put_bucket_storage_capacity ok\\n\");\n}\n\nvoid test_put_bucket_logging(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_logging_config_content_t *content;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    content = oss_create_logging_rule_content(p);\n\n    aos_str_set(&content->target_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&content->prefix, \"my-log-\");\n    s = oss_put_bucket_logging(options, &bucket, content, &resp_headers);\n    if (s->error_msg) {\n        printf(\"%s %s\\n\", s->error_msg, s->error_code);\n    }\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_get_bucket_logging(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_logging_config_content_t *content = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    content = oss_create_logging_rule_content(p);\n\n    s = oss_get_bucket_logging(options, &bucket, content, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    CuAssertStrEquals(tc, TEST_BUCKET_NAME, content->target_bucket.data);\n    CuAssertStrEquals(tc, \"my-log-\", content->prefix.data);\n\n    TEST_CASE_LOG(\"%s: bucket:%s, prefix:%s\\n\", __FUNCTION__, \n                content->target_bucket.data, content->prefix.data);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_get_bucket_logging(options, &bucket, content, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_delete_bucket_logging(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_logging_config_content_t *content = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n\n    s = oss_delete_bucket_logging(options, &bucket, &resp_headers);\n    CuAssertIntEquals(tc, 204, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    content = oss_create_logging_rule_content(p);\n\n    s = oss_get_bucket_logging(options, &bucket, content, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    CuAssertStrEquals(tc, \"\", content->target_bucket.data);\n    CuAssertStrEquals(tc, \"\", content->prefix.data);\n\n    TEST_CASE_LOG(\"%s: bucket:%s, prefix:%s\\n\", __FUNCTION__, \n                content->target_bucket.data, content->prefix.data);\n \n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_list_object(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_list_object_params_t *params = NULL;\n    oss_list_object_content_t *content = NULL;\n    int size = 0;\n    char *key = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    params = oss_create_list_object_params(p);\n    params->max_ret = 1;\n    params->truncated = 0;\n    aos_str_set(&params->prefix, \"oss_test_object\");\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_list_object(options, &bucket, params, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 1, params->truncated);\n    CuAssertStrEquals(tc, \"oss_test_object1\", params->next_marker.data);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_list_for_each_entry(oss_list_object_content_t, content, &params->object_list, node) {\n        ++size;\n        key = apr_psprintf(p, \"%.*s\", content->key.len, content->key.data);\n        CuAssertStrEquals(tc, \"Standard\", content->storage_class.data);\n        CuAssertStrEquals(tc, \"Normal\", content->type.data);\n    }\n    CuAssertIntEquals(tc, 1 ,size);\n    CuAssertStrEquals(tc, \"oss_test_object1\", key);\n    \n    size = 0;\n    resp_headers = NULL;\n    aos_list_init(&params->object_list);\n    aos_str_set(&params->marker, params->next_marker.data);\n    s = oss_list_object(options, &bucket, params, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 0, params->truncated);\n    aos_list_for_each_entry(oss_list_object_content_t, content, &params->object_list, node) {\n        ++size;\n        key = apr_psprintf(p, \"%.*s\", content->key.len, content->key.data);\n    }\n    CuAssertIntEquals(tc, 1 ,size);\n    CuAssertStrEquals(tc, \"oss_test_object2\", key);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_list_object(options, &bucket, params, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_list_object ok\\n\");\n}\n\nvoid test_list_buckets(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_list_buckets_params_t *params = NULL;\n    oss_list_bucket_content_t *content = NULL;\n    int size = 0;\n\n    TEST_CASE_LOG(\"begin test\\n\");\n    /* list all buckets */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    params = oss_create_list_buckets_params(p);\n    params->max_keys = 100;\n    s = oss_list_bucket(options, params, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_list_for_each_entry(oss_list_bucket_content_t, content, &params->bucket_list, node) {\n        ++size;\n    }\n    TEST_CASE_LOG(\"Get %d buckets total\\n\", size);\n    CuAssertIntEquals(tc, 1 , size > 0);\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_list_buckets_with_invalid_prefix(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_list_buckets_params_t *params = NULL;\n\n    /* list bucket one by one */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    params = oss_create_list_buckets_params(p);\n    params->max_keys = 1;\n    aos_str_set(&params->prefix, \"impossibleMatch\");\n\n    s = oss_list_bucket(options, params, &resp_headers);\n    CuAssertIntEquals(tc, 400, s->code);\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_list_buckets_with_iterator(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_list_buckets_params_t *params = NULL;\n    oss_list_bucket_content_t *content = NULL;\n    oss_acl_e oss_acl;\n    int match_num = 0;\n    int size = 0;\n    aos_string_t bucket;\n    char BUCKET_NAME2[128] = {0};\n    apr_snprintf(BUCKET_NAME2, 127, \"%s-test-itor\", TEST_BUCKET_NAME);\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    oss_acl = OSS_ACL_PRIVATE;\n    //create the second bucket to iterate\n    s = create_test_bucket(options, BUCKET_NAME2, oss_acl);\n    if (s->error_code) {\n        TEST_CASE_LOG(\"bucket name %s, %s %s\\n\", BUCKET_NAME2, s->error_code, s->error_msg);\n    }\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n\n    /* list bucket one by one */\n    params = oss_create_list_buckets_params(p);\n    params->max_keys = 1;\n\n    s = oss_list_bucket(options, params, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    aos_list_for_each_entry(oss_list_bucket_content_t, content, &params->bucket_list, node) {\n        TEST_CASE_LOG(\"Get bucket %s\\n\", content->name.data);\n        if (!strcmp(content->name.data, TEST_BUCKET_NAME)\n                || !strcmp(content->name.data, BUCKET_NAME2) ) {\n            match_num++;\n        }\n        size++;\n    }\n    CuAssertIntEquals(tc, 1, size);\n\n    while (params->truncated) {\n        aos_list_init(&params->bucket_list);\n        aos_str_set(&params->marker, params->next_marker.data);\n        params->max_keys = 10;\n        TEST_CASE_LOG(\"marker:%s, next marker: %s\\n\", params->marker.data, params->next_marker.data);\n        s = oss_list_bucket(options, params, &resp_headers);\n        CuAssertIntEquals(tc, 200, s->code);\n        aos_list_for_each_entry(oss_list_bucket_content_t, content, &params->bucket_list, node) {\n            TEST_CASE_LOG(\"Get bucket %s\\n\", content->name.data);\n            if (!strcmp(content->name.data, TEST_BUCKET_NAME)\n                    || !strcmp(content->name.data, BUCKET_NAME2) ) {\n                match_num++;\n            }\n            size++;\n        }\n        CuAssertIntEquals(tc, 1, size > 1);\n        if (size > 100) {\n            if (match_num != 2) {\n                TEST_CASE_LOG(\"not found expect bucket within %d buckets\", size);\n                match_num = 2;\n            }\n            break;\n        }\n    }\n\n    CuAssertIntEquals(tc, 2, match_num);\n\n    //delete bucket \n    aos_str_set(&bucket, BUCKET_NAME2);\n    s = oss_delete_bucket(options, &bucket, &resp_headers);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_list_object_with_delimiter(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_list_object_params_t *params = NULL;\n    oss_list_object_common_prefix_t *common_prefix = NULL;\n    int size = 0;\n    char *prefix = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    params = oss_create_list_object_params(p);\n    params->max_ret = 5;\n    params->truncated = 0;\n    aos_str_set(&params->prefix, \"oss_tmp\");\n    aos_str_set(&params->delimiter, \"/\");\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_list_object(options, &bucket, params, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 0, params->truncated);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_list_for_each_entry(oss_list_object_common_prefix_t, common_prefix, &params->common_prefix_list, node) {\n        ++size;\n        prefix = apr_psprintf(p, \"%.*s\", common_prefix->prefix.len, \n                              common_prefix->prefix.data);\n        if (size == 1) {\n            CuAssertStrEquals(tc, \"oss_tmp1/\", prefix);\n        } else if (size == 2) {\n            CuAssertStrEquals(tc, \"oss_tmp2/\", prefix);\n        }\n    }\n    CuAssertIntEquals(tc, 3, size);\n    aos_pool_destroy(p);\n\n    printf(\"test_list_object_with_delimiter ok\\n\");\n}\n\nvoid test_lifecycle(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t lifecycle_rule_list;\n    oss_lifecycle_rule_content_t *invalid_rule_content = NULL;\n    oss_lifecycle_rule_content_t *rule_content = NULL;\n    oss_lifecycle_rule_content_t *rule_content1 = NULL;\n    oss_lifecycle_rule_content_t *rule_content2 = NULL;\n    oss_lifecycle_rule_content_t *rule_content3 = NULL;\n    oss_lifecycle_rule_content_t *rule_content4 = NULL;\n    int size = 0;\n    char *rule_id = NULL;\n    char *prefix = NULL;\n    char *status = NULL;\n    int days = INT_MAX;\n    char* date = NULL;\n    char* created_before_date = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n\n    //put invalid lifecycle rule\n    aos_list_init(&lifecycle_rule_list);\n    invalid_rule_content = oss_create_lifecycle_rule_content(p);\n    aos_str_set(&invalid_rule_content->id, \"\");\n    aos_str_set(&invalid_rule_content->prefix, \"pre\");\n    aos_list_add_tail(&invalid_rule_content->node, &lifecycle_rule_list);\n    s = oss_put_bucket_lifecycle(options, &bucket, &lifecycle_rule_list, \n                                 &resp_headers);\n    CuAssertIntEquals(tc, 400, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //put lifecycle\n    resp_headers = NULL;\n    aos_list_init(&lifecycle_rule_list);\n    rule_content1 = oss_create_lifecycle_rule_content(p);\n    aos_str_set(&rule_content1->id, \"1\");\n    aos_str_set(&rule_content1->prefix, \"pre1\");\n    aos_str_set(&rule_content1->status, \"Enabled\");\n    rule_content1->days = 1;\n\n    rule_content2 = oss_create_lifecycle_rule_content(p);\n    aos_str_set(&rule_content2->id, \"2\");\n    aos_str_set(&rule_content2->prefix, \"pre2\");\n    aos_str_set(&rule_content2->status, \"Enabled\");\n    aos_str_set(&rule_content2->date, \"2022-10-11T00:00:00.000Z\");\n\n    rule_content3 = oss_create_lifecycle_rule_content(p);\n    aos_str_set(&rule_content3->id, \"3\");\n    aos_str_set(&rule_content3->prefix, \"pre3\");\n    aos_str_set(&rule_content3->status, \"Enabled\");\n    aos_str_set(&rule_content3->created_before_date, \"2017-10-11T00:00:00.000Z\");\n    rule_content3->abort_multipart_upload_dt.days=1;\n\n    rule_content4 = oss_create_lifecycle_rule_content(p);\n    aos_str_set(&rule_content4->id, \"4\");\n    aos_str_set(&rule_content4->prefix, \"pre4\");\n    aos_str_set(&rule_content4->status, \"Enabled\");\n    aos_str_set(&rule_content4->created_before_date, \"2017-10-11T00:00:00.000Z\");\n    aos_str_set(&rule_content4->abort_multipart_upload_dt.created_before_date, \"2012-10-11T00:00:00.000Z\");\n \n    aos_list_add_tail(&rule_content1->node, &lifecycle_rule_list);\n    aos_list_add_tail(&rule_content2->node, &lifecycle_rule_list);\n    aos_list_add_tail(&rule_content3->node, &lifecycle_rule_list);\n    aos_list_add_tail(&rule_content4->node, &lifecycle_rule_list);\n\n    s = oss_put_bucket_lifecycle(options, &bucket, &lifecycle_rule_list, \n                                 &resp_headers);\n    if (s->error_msg) {\n        TEST_CASE_LOG(\"%s %s\\n\", s->error_msg, s->error_code);\n    }\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //get lifecycle\n    resp_headers = NULL;\n    aos_list_init(&lifecycle_rule_list);\n    s = oss_get_bucket_lifecycle(options, &bucket, &lifecycle_rule_list, \n                                 &resp_headers);\n    if (s->error_msg) {\n        printf(\"%s %s\", s->error_msg, s->error_code);\n    }\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_list_for_each_entry(oss_lifecycle_rule_content_t, rule_content, &lifecycle_rule_list, node) {\n        if (size == 0) {\n            rule_id = apr_psprintf(p, \"%.*s\", rule_content->id.len, \n                    rule_content->id.data);\n            CuAssertStrEquals(tc, \"1\", rule_id);\n            prefix = apr_psprintf(p, \"%.*s\", rule_content->prefix.len, \n                    rule_content->prefix.data);\n            CuAssertStrEquals(tc, \"pre1\", prefix);\n            date = apr_psprintf(p, \"%.*s\", rule_content->date.len, \n                    rule_content->date.data);\n            CuAssertStrEquals(tc, \"\", date);\n            status = apr_psprintf(p, \"%.*s\", rule_content->status.len, \n                    rule_content->status.data);\n            CuAssertStrEquals(tc, \"Enabled\", status);\n            days = rule_content->days;\n            CuAssertIntEquals(tc, 1, days);\n        }\n        else if (size == 1){\n            rule_id = apr_psprintf(p, \"%.*s\", rule_content->id.len, \n                    rule_content->id.data);\n            CuAssertStrEquals(tc, \"2\", rule_id);\n            prefix = apr_psprintf(p, \"%.*s\", rule_content->prefix.len, \n                    rule_content->prefix.data);\n            CuAssertStrEquals(tc, \"pre2\", prefix);\n            date = apr_psprintf(p, \"%.*s\", rule_content->date.len, \n                    rule_content->date.data);\n            CuAssertStrEquals(tc, \"2022-10-11T00:00:00.000Z\", date);\n            status = apr_psprintf(p, \"%.*s\", rule_content->status.len, \n                    rule_content->status.data);\n            CuAssertStrEquals(tc, \"Enabled\", status);\n            days = rule_content->days;\n            CuAssertIntEquals(tc, INT_MAX, days);\n        } else if (size == 2) {\n            rule_id = apr_psprintf(p, \"%.*s\", rule_content->id.len, \n                    rule_content->id.data);\n            CuAssertStrEquals(tc, \"3\", rule_id);\n\n            prefix = apr_psprintf(p, \"%.*s\", rule_content->prefix.len, \n                    rule_content->prefix.data);\n            CuAssertStrEquals(tc, \"pre3\", prefix);\n\n            date = apr_psprintf(p, \"%.*s\", rule_content->date.len, \n                    rule_content->date.data);\n            CuAssertStrEquals(tc, \"\", date);\n\n            created_before_date = apr_psprintf(p, \"%.*s\", rule_content->created_before_date.len, \n                    rule_content->created_before_date.data);\n            CuAssertStrEquals(tc, \"2017-10-11T00:00:00.000Z\", created_before_date);\n\n            days = rule_content->abort_multipart_upload_dt.days;\n            CuAssertIntEquals(tc, 1, days);\n\n            status = apr_psprintf(p, \"%.*s\", rule_content->status.len, \n                    rule_content->status.data);\n            CuAssertStrEquals(tc, \"Enabled\", status);\n            days = rule_content->days;\n            CuAssertIntEquals(tc, INT_MAX, days);\n        } else if (size == 3) {\n            rule_id = apr_psprintf(p, \"%.*s\", rule_content->id.len, \n                    rule_content->id.data);\n            CuAssertStrEquals(tc, \"4\", rule_id);\n\n            prefix = apr_psprintf(p, \"%.*s\", rule_content->prefix.len, \n                    rule_content->prefix.data);\n            CuAssertStrEquals(tc, \"pre4\", prefix);\n\n            created_before_date = apr_psprintf(p, \"%.*s\", rule_content->created_before_date.len, \n                    rule_content->created_before_date.data);\n            CuAssertStrEquals(tc, \"2017-10-11T00:00:00.000Z\", created_before_date);\n\n            created_before_date = apr_psprintf(p, \"%.*s\", \n                    rule_content->abort_multipart_upload_dt.created_before_date.len, \n                    rule_content->abort_multipart_upload_dt.created_before_date.data);\n            CuAssertStrEquals(tc, \"2012-10-11T00:00:00.000Z\", created_before_date);\n\n            days = rule_content->abort_multipart_upload_dt.days;\n            CuAssertIntEquals(tc, INT_MAX, days);\n\n            status = apr_psprintf(p, \"%.*s\", rule_content->status.len, \n                    rule_content->status.data);\n            CuAssertStrEquals(tc, \"Enabled\", status);\n            days = rule_content->days;\n            CuAssertIntEquals(tc, INT_MAX, days);\n        }\n\n        ++size;\n    }\n    CuAssertIntEquals(tc, 4 ,size);\n\n    //delete lifecycle\n    resp_headers = NULL;\n    s = oss_delete_bucket_lifecycle(options, &bucket, &resp_headers);\n    CuAssertIntEquals(tc, 204, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_delete_bucket_lifecycle(options, &bucket, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    resp_headers = NULL;\n    aos_list_init(&lifecycle_rule_list);\n    s = oss_get_bucket_lifecycle(options, &bucket, &lifecycle_rule_list,\n        &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_lifecycle ok\\n\");\n}\n\nvoid test_put_bucket_website(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_website_config_t website_config;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n\n    aos_str_set(&website_config.suffix_str, \"index.html\");\n    aos_str_set(&website_config.key_str, \"\");\n\n    s = oss_put_bucket_website(options, &bucket, &website_config, \n                               &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_str_set(&website_config.key_str, \"errorDocument.html\");\n    s = oss_put_bucket_website(options, &bucket, &website_config, \n                               &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_get_bucket_website(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_website_config_t website_config;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_get_bucket_website(options, &bucket, &website_config, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertStrEquals(tc, \"index.html\", website_config.suffix_str.data);\n    CuAssertStrEquals(tc, \"errorDocument.html\", website_config.key_str.data);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_get_bucket_website(options, &bucket, &website_config, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_delete_bucket_website(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_delete_bucket_website(options, &bucket, &resp_headers);\n    CuAssertIntEquals(tc, 204, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_put_bucket_referer(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_referer_config_t referer_config;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n\n    aos_list_init(&referer_config.referer_list);\n    oss_create_and_add_refer(p, &referer_config, \"http://www.aliyun.com\");\n    oss_create_and_add_refer(p, &referer_config, \"https://www.aliyun.com\");\n    referer_config.allow_empty_referer = 0;\n\n    s = oss_put_bucket_referer(options, &bucket, &referer_config, \n                               &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    referer_config.allow_empty_referer = 1;\n    s = oss_put_bucket_referer(options, &bucket, &referer_config, \n                               &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_get_bucket_referer(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_referer_config_t referer_config;\n    oss_referer_t *referer;\n    int match_num = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_list_init(&referer_config.referer_list);\n    s = oss_get_bucket_referer(options, &bucket, &referer_config, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 1, referer_config.allow_empty_referer);\n    aos_list_for_each_entry(oss_referer_t, referer, &referer_config.referer_list, node) {\n        TEST_CASE_LOG(\"get referer %s\\n\", referer->referer.data);\n        if (!strcmp(referer->referer.data, \"http://www.aliyun.com\") \n            || !strcmp(referer->referer.data, \"https://www.aliyun.com\")) {\n            match_num++;\n        }\n    }\n\n    CuAssertIntEquals(tc, 2, match_num);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_get_bucket_referer(options, &bucket, &referer_config, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_put_bucket_cors(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t cors_rule_list;\n    oss_cors_rule_t *cors_rule1 = NULL, *cors_rule2 = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n\n    aos_list_init(&cors_rule_list);\n\n    cors_rule1 = oss_create_cors_rule(p);\n    aos_list_add_tail(&cors_rule1->node, &cors_rule_list);\n\n    oss_create_sub_cors_rule(p, &cors_rule1->allowed_origin_list, \"allowed_origin_1_1\");\n    oss_create_sub_cors_rule(p, &cors_rule1->allowed_origin_list, \"allowed_origin_2_1\");\n\n    oss_create_sub_cors_rule(p, &cors_rule1->allowed_method_list, \"PUT\");\n    oss_create_sub_cors_rule(p, &cors_rule1->allowed_method_list, \"GET\");\n\n    oss_create_sub_cors_rule(p, &cors_rule1->allowed_head_list, \"Authorization\");\n\n    oss_create_sub_cors_rule(p, &cors_rule1->expose_head_list, \"expose_head_1_1\");\n    oss_create_sub_cors_rule(p, &cors_rule1->expose_head_list, \"expose_head_2_1\");\n\n    cors_rule2 = oss_create_cors_rule(p);\n    aos_list_add_tail(&cors_rule2->node, &cors_rule_list);\n\n    oss_create_sub_cors_rule(p, &cors_rule2->allowed_origin_list, \"allowed_origin_2_1\");\n    oss_create_sub_cors_rule(p, &cors_rule2->allowed_origin_list, \"allowed_origin_2_2\");\n\n    oss_create_sub_cors_rule(p, &cors_rule2->allowed_method_list, \"PUT\");\n    oss_create_sub_cors_rule(p, &cors_rule2->allowed_method_list, \"GET\");\n\n    oss_create_sub_cors_rule(p, &cors_rule2->allowed_head_list, \"Authorization\");\n\n    oss_create_sub_cors_rule(p, &cors_rule2->expose_head_list, \"expose_head_2_1\");\n    oss_create_sub_cors_rule(p, &cors_rule2->expose_head_list, \"expose_head_2_2\");\n\n    s = oss_put_bucket_cors(options, &bucket, &cors_rule_list, \n                                 &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    cors_rule1->max_age_seconds = 100000;\n    s = oss_put_bucket_cors(options, &bucket, &cors_rule_list, \n                                 &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_get_bucket_cors(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t cors_rule_list;\n    oss_cors_rule_t *cors_rule = NULL;\n    oss_sub_cors_rule_t *sub_cors_rule = NULL;\n    int size = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_list_init(&cors_rule_list);\n    s = oss_get_bucket_cors(options, &bucket, &cors_rule_list, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    aos_list_for_each_entry(oss_cors_rule_t, cors_rule, &cors_rule_list, node) {\n        TEST_CASE_LOG(\"%d\\n\", cors_rule->max_age_seconds);\n        aos_list_for_each_entry(oss_sub_cors_rule_t, sub_cors_rule, &cors_rule->allowed_origin_list, node) {\n            int is_match_put_before = !strncmp(\"allowed_origin\", sub_cors_rule->rule.data, 14);\n            CuAssertIntEquals(tc, 1, is_match_put_before);\n            TEST_CASE_LOG(\"%s\\n\", sub_cors_rule->rule.data);\n        }\n\n        aos_list_for_each_entry(oss_sub_cors_rule_t, sub_cors_rule, &cors_rule->allowed_method_list, node) {\n            int is_match_put_before = strcmp(\"PUT\", sub_cors_rule->rule.data) \n                            || strcmp(\"GET\", sub_cors_rule->rule.data);\n            CuAssertIntEquals(tc, 1, is_match_put_before);\n            TEST_CASE_LOG(\"%s\\n\", sub_cors_rule->rule.data);\n        }\n\n        aos_list_for_each_entry(oss_sub_cors_rule_t, sub_cors_rule, &cors_rule->allowed_head_list, node) {\n            CuAssertStrEquals(tc, \"authorization\", sub_cors_rule->rule.data);\n            TEST_CASE_LOG(\"%s\\n\", sub_cors_rule->rule.data);\n        }\n\n        aos_list_for_each_entry(oss_sub_cors_rule_t, sub_cors_rule, &cors_rule->expose_head_list, node) {\n            int is_match_put_before = !strncmp(\"expose_head\", sub_cors_rule->rule.data, 11);\n            CuAssertIntEquals(tc, 1, is_match_put_before);\n            TEST_CASE_LOG(\"%s\\n\", sub_cors_rule->rule.data);\n        }\n        size++;\n    }\n\n    CuAssertIntEquals(tc, 2, size);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_get_bucket_cors(options, &bucket, &cors_rule_list, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_delete_bucket_cors(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_delete_bucket_cors(options, &bucket, &resp_headers);\n    CuAssertIntEquals(tc, 204, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_delete_objects_quiet(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_status_t *s = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    char *object_name1 = \"oss_test_object1\";\n    char *object_name2 = \"oss_test_object2\";\n    oss_object_key_t *content1 = NULL;\n    oss_object_key_t *content2 = NULL;\n    aos_list_t object_list;\n    aos_list_t deleted_object_list;\n    int is_quiet = 1;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n\n    aos_list_init(&object_list);\n    aos_list_init(&deleted_object_list);\n    content1 = oss_create_oss_object_key(p);\n    aos_str_set(&content1->key, object_name1);\n    aos_list_add_tail(&content1->node, &object_list);\n    content2 = oss_create_oss_object_key(p);\n    aos_str_set(&content2->key, object_name2);\n    aos_list_add_tail(&content2->node, &object_list);\n\n    s = oss_delete_objects(options, &bucket, &object_list, is_quiet,\n        &resp_headers, &deleted_object_list);\n\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_delete_objects(options, &bucket, &object_list, is_quiet,\n        &resp_headers, &deleted_object_list);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_delete_objects_quiet ok\\n\");\n}\n\nvoid test_delete_objects_not_quiet(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_status_t *s = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    char *object_name1 = \"oss_tmp1/\";\n    char *object_name2 = \"oss_tmp2/\";\n    oss_object_key_t *content = NULL;\n    oss_object_key_t *content1 = NULL;\n    oss_object_key_t *content2 = NULL;\n    aos_list_t object_list;\n    aos_list_t deleted_object_list;\n    int is_quiet = 0;\n    \n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n\n    aos_list_init(&object_list);\n    aos_list_init(&deleted_object_list);\n    content1 = oss_create_oss_object_key(p);\n    aos_str_set(&content1->key, object_name1);\n    aos_list_add_tail(&content1->node, &object_list);\n    content2 = oss_create_oss_object_key(p);\n    aos_str_set(&content2->key, object_name2);\n    aos_list_add_tail(&content2->node, &object_list);\n    \n    s = oss_delete_objects(options, &bucket, &object_list, is_quiet, \n        &resp_headers, &deleted_object_list);\n\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_list_for_each_entry(oss_object_key_t, content, &deleted_object_list, node) {\n        printf(\"Deleted key:%.*s\\n\", content->key.len, content->key.data);\n    }\n    aos_pool_destroy(p);\n\n    printf(\"test_delete_objects_not_quiet ok\\n\");\n}\n\nvoid test_delete_objects_by_prefix(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_status_t *s = NULL;\n    aos_string_t prefix;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n\n    // delete none\n    aos_str_set(&prefix, \"oss_tmp3/2\");\n\n    s = oss_delete_objects_by_prefix(options, &bucket, &prefix);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    // delete one object\n    aos_str_set(&prefix, \"oss_tmp3/1/0.txt\");\n\n    s = oss_delete_objects_by_prefix(options, &bucket, &prefix);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    // delete multi-objects\n    aos_str_set(&prefix, \"oss_tmp3/1\");\n\n    s = oss_delete_objects_by_prefix(options, &bucket, &prefix);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_delete_objects_by_prefix(options, &bucket, &prefix);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_delete_object_by_prefix ok\\n\");\n}\n\nvoid test_oss_head_bucket(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_head_bucket(options, &bucket, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_head_bucket(options, &bucket, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\r\nvoid test_bucket_invalid_parameter(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    oss_request_options_t *options = NULL;\r\n    int is_cname = 0;\r\n    int i;\r\n    char *invalid_name_list[] =\r\n    { \"a\", \"1\", \"!\", \"aa\", \"12\", \"a1\",\r\n        \"a!\", \"1!\", \"aAa\", \"1A1\", \"a!a\", \"FengChao@123\", \"-a123\", \"a_123\", \"a123-\",\r\n        \"1234567890123456789012345678901234567890123456789012345678901234\", \"\"\r\n    };\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n\r\n    for (i = 0; i < sizeof(invalid_name_list) / sizeof(invalid_name_list[0]); i++) {\r\n        aos_string_t bucket;\r\n        aos_status_t *s = NULL;\r\n        aos_table_t *resp_headers = NULL;\r\n        aos_str_set(&bucket, invalid_name_list[i]);\r\n\r\n        s = oss_create_bucket(options, &bucket, OSS_ACL_DEFAULT, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_create_bucket_with_storage_class(options, &bucket, OSS_ACL_DEFAULT, OSS_STORAGE_CLASS_STANDARD, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_delete_bucket(options, &bucket, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_bucket_acl(options, &bucket, OSS_ACL_DEFAULT, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_bucket_acl(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_head_bucket(options, &bucket, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_bucket_location(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_bucket_info(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_bucket_stat(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_bucket_referer(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_bucket_storage_capacity(options, &bucket, 1024L, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_bucket_storage_capacity(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_list_object(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_bucket_logging(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_bucket_logging(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_delete_bucket_logging(options, &bucket, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_bucket_lifecycle(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_bucket_cors(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_bucket_cors(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_delete_bucket_cors(options, &bucket, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_bucket_referer(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_bucket_website(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_bucket_website(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_delete_bucket_website(options, &bucket, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_bucket_lifecycle(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_delete_bucket_lifecycle(options, &bucket, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_delete_objects(options, &bucket, NULL, 0, &resp_headers, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_delete_objects_by_prefix(options, &bucket, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n    }\r\n\r\n    aos_pool_destroy(p);\r\n\r\n    printf(\"test_bucket_invalid_parameter ok\\n\");\r\n}\r\n\nCuSuite *test_oss_bucket()\n{\n    CuSuite* suite = CuSuiteNew();\n\n    SUITE_ADD_TEST(suite, test_bucket_setup);\n    SUITE_ADD_TEST(suite, test_create_bucket);\n    SUITE_ADD_TEST(suite, test_get_bucket_info);\n    SUITE_ADD_TEST(suite, test_get_bucket_stat);\n    SUITE_ADD_TEST(suite, test_put_bucket_website);\n    SUITE_ADD_TEST(suite, test_get_bucket_website);\n    SUITE_ADD_TEST(suite, test_delete_bucket_website);\n    SUITE_ADD_TEST(suite, test_put_bucket_referer);\n    SUITE_ADD_TEST(suite, test_get_bucket_referer);\n    SUITE_ADD_TEST(suite, test_put_bucket_logging);\n    SUITE_ADD_TEST(suite, test_get_bucket_logging);\n    SUITE_ADD_TEST(suite, test_delete_bucket_logging);\n    SUITE_ADD_TEST(suite, test_put_bucket_cors);\n    SUITE_ADD_TEST(suite, test_get_bucket_cors);\n    SUITE_ADD_TEST(suite, test_delete_bucket_cors);\n    SUITE_ADD_TEST(suite, test_get_bucket_location);\n    SUITE_ADD_TEST(suite, test_put_bucket_storage_capacity);\n    SUITE_ADD_TEST(suite, test_get_bucket_storage_capacity);\n    SUITE_ADD_TEST(suite, test_list_buckets);\n    SUITE_ADD_TEST(suite, test_list_buckets_with_invalid_prefix);\n    SUITE_ADD_TEST(suite, test_list_buckets_with_iterator);\n    SUITE_ADD_TEST(suite, test_put_bucket_acl);\n    SUITE_ADD_TEST(suite, test_put_bucket_acl_invalid_acl);\n    SUITE_ADD_TEST(suite, test_get_bucket_acl);\n    SUITE_ADD_TEST(suite, test_delete_objects_by_prefix);\n    SUITE_ADD_TEST(suite, test_list_object);\n    SUITE_ADD_TEST(suite, test_list_object_with_delimiter);\n    SUITE_ADD_TEST(suite, test_delete_bucket);\n    SUITE_ADD_TEST(suite, test_lifecycle);\n    SUITE_ADD_TEST(suite, test_delete_objects_quiet);\n    SUITE_ADD_TEST(suite, test_delete_objects_not_quiet);\n    SUITE_ADD_TEST(suite, test_create_bucket_with_storage_class);\n    SUITE_ADD_TEST(suite, test_oss_head_bucket);\n    SUITE_ADD_TEST(suite, test_bucket_invalid_parameter);\n    SUITE_ADD_TEST(suite, test_bucket_cleanup);\n    \n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_callback.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n\nvoid test_callback_setup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n\n    TEST_BUCKET_NAME = get_test_bucket_name(aos_global_pool, \"callback\");\n\n    /* create test bucket */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n\n    CuAssertIntEquals(tc, 200, s->code);\n    aos_pool_destroy(p);\n}\n\nvoid test_callback_cleanup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    char *object_name1 = \"oss_test_cb_put_object.ts\";\n    char *object_name2 = \"oss_test_cb_multipart_object.ts\";\n\n    //aos_table_t *resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    /* delete test object */\n    delete_test_object(options, TEST_BUCKET_NAME, object_name1);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name2);\n\n    /* delete test bucket */\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_delete_bucket(options, &bucket, NULL);\n    apr_sleep(apr_time_from_sec(3));\n\n    aos_pool_destroy(p);\n}\n\nvoid test_callback_put_object_from_buffer(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_cb_put_object.ts\";\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    aos_list_t buffer;\n    aos_buf_t *content;\n    char *buf = NULL;\n    int64_t len = 0;\n    int64_t size = 0;\n    int64_t pos = 0;\n    char b64_buf[1024];\n    int b64_len;\n    char callback[1024];\n    \n    /* JSON format */\n    char *callback_fmt =  \"{\"\n        \"\\\"callbackUrl\\\":\\\"%s\\\",\"\n        \"\\\"callbackHost\\\":\\\"oss-cn-hangzhou.aliyuncs.com\\\",\"\n        \"\\\"callbackBody\\\":\\\"bucket=${bucket}&object=${object}&size=${size}&mimeType=${mimeType}\\\",\"\n        \"\\\"callbackBodyType\\\":\\\"application/x-www-form-urlencoded\\\"\"\n        \"}\";\n\n    aos_log_level_e oldLogLevel;\n    oldLogLevel = aos_log_level;\n    aos_log_set_level(AOS_LOG_DEBUG);\n\n    sprintf(callback, callback_fmt, TEST_CALLBACK_URL);\n\n    /* init test */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n   \n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_list_init(&buffer);\n\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    /* put call into header */\n    b64_len = aos_base64_encode((unsigned char*)callback, strlen(callback), b64_buf);\n    b64_buf[b64_len] = '\\0';\n\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, OSS_CALLBACK, b64_buf);\n    \n    /* test put object */\n    s = oss_do_put_object_from_buffer(options, &bucket, &object, &buffer, \n        headers, NULL, NULL, &resp_headers, &resp_body);\n\n    aos_log_set_level(oldLogLevel);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    /* get buffer len */\n    len = aos_buf_list_len(&resp_body);\n    buf = (char *)aos_pcalloc(p, (apr_size_t)(len + 1));\n    buf[len] = '\\0';\n\n    /* copy buffer content to memory */\n    aos_list_for_each_entry(aos_buf_t, content, &resp_body, node) {\n        size = aos_buf_size(content);\n        memcpy(buf + pos, content->pos, (size_t)size);\n        pos += size;\n    }\n    CuAssertStrEquals(tc, buf, \"{\\\"Status\\\":\\\"OK\\\"}\");\n\n    aos_pool_destroy(p);\n\n    /* head object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    s = oss_head_object(options, &bucket, &object, NULL, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_callback_put_object_from_buffer ok\\n\");\n}\n\nvoid test_callback_multipart_from_buffer(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_cb_multipart_object.ts\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    oss_list_upload_part_params_t *params = NULL;\n    aos_string_t upload_id;\n    aos_list_t complete_part_list;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_list_part_content_t *part_content1 = NULL;\n    oss_complete_part_content_t *complete_content1 = NULL;\n    int part_num = 1;\n    aos_list_t resp_body;\n    aos_buf_t *content;\n    char *buf = NULL;\n    int64_t len = 0;\n    int64_t size = 0;\n    int64_t pos = 0;\n    char b64_buf[1024];\n    int b64_len;\n    char callback[1024];\n\n    /* JSON format */\n    char *callback_fmt =  \"{\"\n        \"\\\"callbackUrl\\\":\\\"%s\\\",\"\n        \"\\\"callbackHost\\\":\\\"oss-cn-hangzhou.aliyuncs.com\\\",\"\n        \"\\\"callbackBody\\\":\\\"bucket=${bucket}&object=${object}&size=${size}&mimeType=${mimeType}\\\",\"\n        \"\\\"callbackBodyType\\\":\\\"application/x-www-form-urlencoded\\\"\"\n        \"}\";\n    sprintf(callback, callback_fmt, TEST_CALLBACK_URL);\n\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    /* put call into header */\n    b64_len = aos_base64_encode((unsigned char*)callback, strlen(callback), b64_buf);\n    b64_buf[b64_len] = '\\0';\n\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, OSS_CALLBACK, b64_buf);\n\n    //init mulitipart\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, object_name, &upload_id);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //upload part\n    aos_list_init(&buffer);\n    make_random_body(p, 2, &buffer);\n\n    s = oss_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num++, &buffer, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_list_init(&buffer);\n    make_random_body(p, 200, &buffer);\n    s = oss_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num++, &buffer, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //list part\n    params = oss_create_list_upload_part_params(p);\n    params->max_ret = 1;\n    aos_list_init(&complete_part_list);\n\n    s = oss_list_upload_part(options, &bucket, &object, &upload_id, \n                             params, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content1, &params->part_list, node) {\n        complete_content1 = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content1->part_number, part_content1->part_number.data);\n        aos_str_set(&complete_content1->etag, part_content1->etag.data);\n        aos_list_add_tail(&complete_content1->node, &complete_part_list);\n    }\n\n    //complete multipart\n    s = oss_do_complete_multipart_upload(options, &bucket, &object, &upload_id,\n            &complete_part_list, headers, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    /* get buffer len */\n    len = aos_buf_list_len(&resp_body);\n    buf = (char *)aos_pcalloc(p, (apr_size_t)(len + 1));\n    buf[len] = '\\0';\n\n    /* copy buffer content to memory */\n    aos_list_for_each_entry(aos_buf_t, content, &resp_body, node) {\n        size = aos_buf_size(content);\n        memcpy(buf + pos, content->pos, (size_t)size);\n        pos += size;\n    }\n    CuAssertStrEquals(tc, buf, \"{\\\"Status\\\":\\\"OK\\\"}\");\n\n    aos_pool_destroy(p);\n\n    printf(\"test_callback_multipart_from_buffer ok\\n\");\n}\n\nCuSuite *test_oss_callback()\n{\n    CuSuite* suite = CuSuiteNew();\n\n    SUITE_ADD_TEST(suite, test_callback_setup);\n    SUITE_ADD_TEST(suite, test_callback_put_object_from_buffer);\n    SUITE_ADD_TEST(suite, test_callback_multipart_from_buffer); \n    SUITE_ADD_TEST(suite, test_callback_cleanup);\n\n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_crc.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n#include \"aos_crc64.h\"\n\nvoid test_crc_setup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n\n    TEST_BUCKET_NAME = get_test_bucket_name(aos_global_pool, \"crc\");\n\n    /* create test bucket */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n\n    CuAssertIntEquals(tc, 200, s->code);\n    aos_pool_destroy(p);\n}\n\nvoid test_crc_cleanup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    char *object_name1 = \"oss_test_crc_put_object.txt\";\n    char *object_name2 = \"oss_test_crc_append_object.txt\";\n    char *object_name3 = \"oss_test_crc_multipart_object.txt\";\n\n    aos_table_t *resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    /* delete test object */\n    delete_test_object(options, TEST_BUCKET_NAME, object_name1);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name2);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name3);\n\n    /* delete test bucket */\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_delete_bucket(options, &bucket, &resp_headers);\n    apr_sleep(apr_time_from_sec(3));\n\n    aos_pool_destroy(p);\n}\n\nvoid test_crc_append_object_from_buffer(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_crc_append_object.txt\";\n    aos_string_t bucket;\n    aos_string_t object;\n    char *str = \"Time is a bird for ever on the wing.\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    int64_t position = 0;\n    uint64_t initcrc = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    aos_list_t buffer;\n    aos_buf_t *content = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n\n    /* append object */\n    aos_list_init(&buffer);\n    content = aos_buf_pack(p, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    oss_delete_object(options, &bucket, &object, NULL);\n\n    s = oss_do_append_object_from_buffer(options, &bucket, &object, position, \n        initcrc, &buffer, headers, NULL, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    position = aos_atoi64((char*)(apr_table_get(resp_headers, OSS_NEXT_APPEND_POSITION)));\n    initcrc = aos_atoui64((char*)(apr_table_get(resp_headers, OSS_HASH_CRC64_ECMA)));\n\n    /* append object */\n    s = oss_do_append_object_from_buffer(options, &bucket, &object, position, \n        initcrc, &buffer, NULL, NULL, NULL, NULL, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    /* delete object */\n    s= oss_delete_object(options, &bucket, &object, NULL);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_crc_append_object_from_buffer ok\\n\");\n}\n\nvoid test_crc_append_object_from_file(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_crc_append_object.txt\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    int64_t position = 0;\n    uint64_t initcrc = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n\n    make_random_file(p, object_name, 10240);\n    aos_str_set(&filename, object_name);\n\n    oss_delete_object(options, &bucket, &object, NULL);\n\n    /* append object */\n    s = oss_do_append_object_from_file(options, &bucket, &object, position, \n        initcrc, &filename, headers, NULL, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    position = aos_atoi64((char*)(apr_table_get(resp_headers, OSS_NEXT_APPEND_POSITION)));\n    initcrc = aos_atoui64((char*)(apr_table_get(resp_headers, OSS_HASH_CRC64_ECMA)));\n\n    /* append object */\n    s = oss_do_append_object_from_file(options, &bucket, &object, position, \n        initcrc, &filename, NULL, NULL, NULL, NULL, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    /* delete object */\n    s= oss_delete_object(options, &bucket, &object, NULL);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    apr_file_remove(object_name, p);\n    aos_pool_destroy(p);\n\n    printf(\"test_crc_append_object_from_file ok\\n\");\n}\n\nvoid test_crc_disable_crc(CuTest *tc) \n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_crc_put_object.txt\";\n    char *str = \"Sow nothing, reap nothing.\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    oss_request_options_t *options = NULL;\n    aos_list_t resp_body;\n    aos_list_t buffer;\n    aos_buf_t *content;\n\n    /* init test*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n   \n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    options->ctl->options->enable_crc = AOS_FALSE;\n    \n    /* test put object */\n    s = oss_put_object_from_buffer(options, &bucket, &object, &buffer, NULL, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    /* test get object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    options->ctl->options->enable_crc = AOS_FALSE;\n\n    s = oss_get_object_to_buffer(options, &bucket, &object, NULL, NULL, &buffer, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_crc_disable_crc ok\\n\");\n}\n\n/* Test crc64() on vector[0..len-1] which should have CRC-64 crc.  Also test\n   crc64_combine() on vector[] split in two. */\nstatic void crc64_combine_test(CuTest *tc, void *vector, size_t len, uint64_t crc)\n{\n    uint64_t crc1, crc2;\n\n    /* test crc64() */\n    crc1 = aos_crc64(0, vector, len);\n    CuAssertTrue(tc, crc1 == crc);\n\n    /* test crc64_combine() */\n    crc1 = aos_crc64(0, vector, (len + 1) >> 1);\n    crc2 = aos_crc64(0, (char*)vector + ((len + 1) >> 1), len >> 1);\n    crc1 = aos_crc64_combine(crc1, crc2, len >> 1);\n    CuAssertTrue(tc, crc1 == crc);\n}\n\nvoid test_crc_combine(CuTest *tc)\n{\n    char *str1 = \"123456789\";\n    size_t len1 = 9;\n    uint64_t crc1 = UINT64_C(0x995dc9bbdf1939fa);\n    char *str2 = \"This is a test of the emergency broadcast system.\";\n    size_t len2 = 49;\n    uint64_t crc2 = UINT64_C(0x27db187fc15bbc72);\n\n    crc64_combine_test(tc, str1, len1, crc1);\n    crc64_combine_test(tc, str2, len2, crc2);\n\n    CuAssertTrue(tc, aos_crc64_combine(crc1, crc2, 0) == crc1);\n\n    printf(\"test_crc_combine ok\\n\");\n}\n\nvoid test_crc_negative(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_crc_append_object_neg.txt\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    int64_t position = 0;\n    oss_request_options_t *options = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    make_random_file(p, object_name, 1024);\n    aos_str_set(&filename, object_name);\n\n    oss_delete_object(options, &bucket, &object, NULL);\n\n    /* append object */\n    s = oss_do_append_object_from_file(options, &bucket, &object, position, 1, \n        &filename, NULL, NULL, NULL, NULL, NULL);\n    //CuAssertIntEquals(tc, 200, s->code);\n\n    /* delete object */\n    s= oss_delete_object(options, &bucket, &object, NULL);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    apr_file_remove(object_name, p);\n    aos_pool_destroy(p);\n\n    printf(\"test_crc_negative ok\\n\");\n}\n\nvoid test_crc_big_endian(CuTest *tc)\n{\n    char *str1 = \"12345678\";\n    char *str2 = \"87654321\";\n    char *str3 = \"123456789\";\n    uint64_t crc1;\n    uint64_t crc2;\n\n    crc1 = aos_crc64_test(0, str1, 8, 0);\n    crc2 = aos_crc64_test(0, str2, 8, 1);\n\n   // CuAssertTrue(tc, crc1 == crc2);\n\n    crc1 = aos_crc64_test(0, str3, 9, 0);\n    \n    (void)(crc1);\n    (void)(crc2);\n\n    printf(\"test_crc_big_endian ok\\n\");\n}\n\nCuSuite *test_oss_crc()\n{\n    CuSuite* suite = CuSuiteNew();\n\n    SUITE_ADD_TEST(suite, test_crc_setup);\n    SUITE_ADD_TEST(suite, test_crc_append_object_from_buffer);\n    SUITE_ADD_TEST(suite, test_crc_append_object_from_file);\n    SUITE_ADD_TEST(suite, test_crc_disable_crc);\n    SUITE_ADD_TEST(suite, test_crc_combine);\n    SUITE_ADD_TEST(suite, test_crc_negative);\n    SUITE_ADD_TEST(suite, test_crc_big_endian);\n    SUITE_ADD_TEST(suite, test_crc_cleanup);\n\n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_https.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n#include \"aos_crc64.h\"\n\nstatic char ca_file[1024];\nstatic char test_endpoint[1024];\n\nvoid test_https_setup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n\n    TEST_BUCKET_NAME = get_test_bucket_name(aos_global_pool, \"https\");\n\n    /* create test bucket */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n\n    sprintf(ca_file, \"%sca-certificates.crt\", get_test_file_path());\n\n    if (!strncasecmp(\"http://\", TEST_OSS_ENDPOINT, 7)) {\n        sprintf(test_endpoint, \"https://%s\", TEST_OSS_ENDPOINT + 7);\n    }\n\n    CuAssertIntEquals(tc, 200, s->code);\n    aos_pool_destroy(p);\n}\n\nvoid test_https_cleanup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    char *object_name1 = \"oss_test_https_put_object.txt\";\n\n    aos_table_t *resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    /* delete test object */\n    delete_test_object(options, TEST_BUCKET_NAME, object_name1);\n\n    /* delete test bucket */\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_delete_bucket(options, &bucket, &resp_headers);\n    apr_sleep(apr_time_from_sec(3));\n\n    aos_pool_destroy(p);\n}\n\nvoid init_test_https_request_options(oss_request_options_t *options, int is_cname)\n{\n    options->config = oss_config_create(options->pool);\n\n    aos_str_set(&options->config->endpoint, test_endpoint);\n    aos_str_set(&options->config->access_key_id, TEST_ACCESS_KEY_ID);\n    aos_str_set(&options->config->access_key_secret, TEST_ACCESS_KEY_SECRET);\n    options->config->is_cname = is_cname;\n\n    options->ctl = aos_http_controller_create(options->pool, 0);\n    options->ctl->options = aos_http_request_options_create(options->pool);\n    options->ctl->options->verify_ssl = AOS_TRUE;\n    options->ctl->options->ca_file = ca_file;\n    options->ctl->options->ca_path = get_test_file_path();\n}\n\nvoid test_https_put_object_from_buffer(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_https_put_object.txt\";\n    char *str = \"Sow nothing, reap nothing.\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_list_t buffer;\n    aos_buf_t *content;\n\n    /* init test*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_https_request_options(options, is_cname);\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    headers = aos_table_make(p, 2);\n    apr_table_set(headers, \"Expect\", \"\");\n    apr_table_set(headers, \"Transfer-Encoding\", \"\");\n\n    /* test put object */\n    s = oss_put_object_from_buffer(options, &bucket, &object, &buffer, headers, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    /* test get object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_https_request_options(options, is_cname);\n\n    s = oss_get_object_to_buffer(options, &bucket, &object, NULL, NULL, &buffer, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    CuAssertIntEquals(tc, AOS_TRUE, options->ctl->options->verify_ssl);\n    CuAssertStrEquals(tc, ca_file, options->ctl->options->ca_file);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_https_put_object_from_buffer ok\\n\");\n}\n\nvoid test_https_list_object(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_list_object_params_t *params = NULL;\n    oss_list_object_content_t *content = NULL;\n    int size = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_https_request_options(options, is_cname);\n    params = oss_create_list_object_params(p);\n    params->max_ret = 1;\n    params->truncated = 0;\n    aos_str_set(&params->prefix, \"oss_test_https_\");\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_list_object(options, &bucket, params, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, AOS_TRUE, options->ctl->options->verify_ssl);\n    CuAssertStrEquals(tc, ca_file, options->ctl->options->ca_file);\n\n    aos_list_for_each_entry(oss_list_object_content_t, content, &params->object_list, node) {\n        ++size;\n    }\n    CuAssertIntEquals(tc, 1 ,size);\n\n    printf(\"test_https_list_object ok\\n\");\n}\n\nvoid test_https_list_object_negative(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_list_object_params_t *params = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_https_request_options(options, is_cname);\n    options->ctl->options->ca_file = \"\";\n    options->ctl->options->ca_path = \"\";\n    params = oss_create_list_object_params(p);\n    params->max_ret = 1;\n    params->truncated = 0;\n    aos_str_set(&params->prefix, \"oss_test_https_\");\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_list_object(options, &bucket, params, &resp_headers);\n    CuAssertIntEquals(tc, -996, s->code);\n    CuAssertStrEquals(tc, \"Problem with the SSL CA cert (path? access rights?)\", s->error_msg);\n    CuAssertIntEquals(tc, AOS_TRUE, options->ctl->options->verify_ssl);\n\n    printf(\"test_https_list_object_negative ok\\n\");\n}\n\n\nCuSuite *test_oss_https()\n{\n    CuSuite* suite = CuSuiteNew();\n\n    SUITE_ADD_TEST(suite, test_https_setup);\n    SUITE_ADD_TEST(suite, test_https_put_object_from_buffer);\n    SUITE_ADD_TEST(suite, test_https_list_object);\n    SUITE_ADD_TEST(suite, test_https_list_object_negative);\n    SUITE_ADD_TEST(suite, test_https_cleanup);\n\n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_image.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"aos_transport.h\"\n#include \"aos_http_io.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n#include \"apr_time.h\"\n\nstatic char test_file[1024];\nstatic char *original_image  = \"example.jpg\";\nstatic char *processed_image = \"processed_example.jpg\";\n\nstatic void put_example_image(CuTest *tc);\n\nvoid test_image_setup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n\n    TEST_BUCKET_NAME = get_test_bucket_name(aos_global_pool, \"image\");\n\n    // create test bucket\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    sprintf(test_file, \"%sexample.jpg\", get_test_file_path());\n\n    aos_pool_destroy(p);\n}\n\nvoid test_image_cleanup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n\n    aos_table_t *resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    /* delete test object */\n    delete_test_object(options, TEST_BUCKET_NAME, original_image);\n    delete_test_object(options, TEST_BUCKET_NAME, processed_image);\n\n    /* delete test bucket */\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_delete_bucket(options, &bucket, &resp_headers);\n    apr_sleep(apr_time_from_sec(3));\n\n    aos_pool_destroy(p);\n}\n\nvoid test_resize_image(CuTest *tc) {\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    image_info_t image_info;\n\n    /* put original image */\n    put_example_image(tc);\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, original_image);\n    aos_list_init(&buffer);\n\n    params = aos_table_make(p, 1);\n    apr_table_set(params, OSS_PROCESS, \"image/resize,m_fixed,w_100,h_100\");\n\n    /* get processed image to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers, \n                                 params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_str_set(&object, processed_image);\n\n    /* put processed image */\n    s= oss_put_object_from_buffer(options, &bucket, &object, &buffer,\n                                   headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    /* check processed image */\n    s = get_image_info(options, TEST_BUCKET_NAME, processed_image, &image_info);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 100, image_info.height);\n    CuAssertIntEquals(tc, 100, image_info.width);\n    //CuAssertIntEquals(tc, 3347, image_info.size);\n    CuAssertStrEquals(tc, \"jpg\", image_info.format);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resize_image ok\\n\");\n}\n\nvoid test_crop_image(CuTest *tc) {\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    image_info_t image_info;\n\n    /* put original image */\n    put_example_image(tc);\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, original_image);\n    aos_list_init(&buffer);\n\n    params = aos_table_make(p, 1);\n    apr_table_set(params, OSS_PROCESS, \"image/crop,w_100,h_100,x_100,y_100,r_1\");\n\n    /* get processed image to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers, \n                                 params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_str_set(&object, processed_image);\n\n    /* put processed image */\n    s= oss_put_object_from_buffer(options, &bucket, &object, &buffer,\n                                   headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    /* check processed image */\n    s = get_image_info(options, TEST_BUCKET_NAME, processed_image, &image_info);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 100, image_info.height);\n    CuAssertIntEquals(tc, 100, image_info.width);\n    CuAssertIntEquals(tc, 1969, image_info.size);\n    CuAssertStrEquals(tc, \"jpg\", image_info.format);\n\n    aos_pool_destroy(p);\n    \n    printf(\"test_crop_image ok\\n\");\n}\n\nvoid test_rotate_image(CuTest *tc) {\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    image_info_t image_info;\n\n    /* put original image */\n    put_example_image(tc);\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, original_image);\n    aos_list_init(&buffer);\n\n    params = aos_table_make(p, 1);\n    apr_table_set(params, OSS_PROCESS, \"image/rotate,90\");\n\n    /* get processed image to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers, \n                                 params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_str_set(&object, processed_image);\n\n    /* put processed image */\n    s= oss_put_object_from_buffer(options, &bucket, &object, &buffer,\n                                   headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    /* check processed image */\n    s = get_image_info(options, TEST_BUCKET_NAME, processed_image, &image_info);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 400, image_info.height);\n    CuAssertIntEquals(tc, 267, image_info.width);\n    CuAssertIntEquals(tc, 20998, image_info.size);\n    CuAssertStrEquals(tc, \"jpg\", image_info.format);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_rotate_image ok\\n\");\n}\n\nvoid test_sharpen_image(CuTest *tc) {\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    image_info_t image_info;\n\n    /* put original image */\n    put_example_image(tc);\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, original_image);\n    aos_list_init(&buffer);\n\n    params = aos_table_make(p, 1);\n    apr_table_set(params, OSS_PROCESS, \"image/sharpen,100\");\n\n    /* get processed image to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers, \n                                 params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_str_set(&object, processed_image);\n\n    /* put processed image */\n    s= oss_put_object_from_buffer(options, &bucket, &object, &buffer,\n                                   headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    /* check processed image */\n    s = get_image_info(options, TEST_BUCKET_NAME, processed_image, &image_info);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 267, image_info.height);\n    CuAssertIntEquals(tc, 400, image_info.width);\n    CuAssertIntEquals(tc, 23015, image_info.size);\n    CuAssertStrEquals(tc, \"jpg\", image_info.format);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_sharpen_image ok\\n\");\n}\n\nvoid test_watermark_image(CuTest *tc) {\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    image_info_t image_info;\n\n    /* put original image */\n    put_example_image(tc);\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, original_image);\n    aos_list_init(&buffer);\n\n    params = aos_table_make(p, 1);\n    apr_table_set(params, OSS_PROCESS, \"image/watermark,text_SGVsbG8g5Zu-54mH5pyN5YqhIQ\");\n\n    /* get processed image to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers, \n                                 params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_str_set(&object, processed_image);\n\n    /* put processed image */\n    s= oss_put_object_from_buffer(options, &bucket, &object, &buffer,\n                                   headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    /* check processed image */\n    s = get_image_info(options, TEST_BUCKET_NAME, processed_image, &image_info);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 267, image_info.height);\n    CuAssertIntEquals(tc, 400, image_info.width);\n    CuAssertStrEquals(tc, \"jpg\", image_info.format);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_watermark_image ok\\n\");\n}\n\nvoid test_format_image(CuTest *tc) {\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    image_info_t image_info;\n\n    /* put original image */\n    put_example_image(tc);\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, original_image);\n    aos_list_init(&buffer);\n\n    params = aos_table_make(p, 1);\n    apr_table_set(params, OSS_PROCESS, \"image/format,png\");\n\n    /* get processed image to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers, \n                                 params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_str_set(&object, processed_image);\n\n    /* put processed image */\n    s= oss_put_object_from_buffer(options, &bucket, &object, &buffer,\n                                   headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    /* check processed image */\n    s = get_image_info(options, TEST_BUCKET_NAME, processed_image, &image_info);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 267, image_info.height);\n    CuAssertIntEquals(tc, 400, image_info.width);\n    CuAssertIntEquals(tc, 160733, image_info.size);\n    CuAssertStrEquals(tc, \"png\", image_info.format);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_format_image ok\\n\");\n}\n\nvoid put_example_image(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    char *content_type = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, original_image);\n    aos_str_set(&filename, test_file);\n\n    s = oss_put_object_from_file(options, &bucket, &object, &filename, \n        headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    /* head object */\n    s = oss_head_object(options, &bucket, &object, headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    \n    content_type = (char*)(apr_table_get(resp_headers, OSS_CONTENT_TYPE));\n    CuAssertStrEquals(tc, \"image/jpeg\", content_type);\n\n    aos_pool_destroy(p);\n}\n\nCuSuite *test_oss_image()\n{\n    CuSuite* suite = CuSuiteNew();\n\n    SUITE_ADD_TEST(suite, test_image_setup);\n    SUITE_ADD_TEST(suite, test_resize_image);\n    SUITE_ADD_TEST(suite, test_crop_image);\n    SUITE_ADD_TEST(suite, test_rotate_image);\n    SUITE_ADD_TEST(suite, test_sharpen_image);\n    SUITE_ADD_TEST(suite, test_watermark_image);\n    SUITE_ADD_TEST(suite, test_format_image);\n    SUITE_ADD_TEST(suite, test_image_cleanup);\n\n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_live.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"aos_transport.h\"\n#include \"aos_http_io.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n#include \"apr_time.h\"\n\nvoid test_live_setup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n\n    TEST_BUCKET_NAME = get_test_bucket_name(aos_global_pool, \"live\");\n\n    //create test bucket\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n}\n\nvoid test_live_cleanup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    //delete test bucket\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_delete_bucket(options, &bucket, &resp_headers);\n    apr_sleep(apr_time_from_sec(3));\n\n    aos_pool_destroy(p);\n}\n\nvoid test_create_live_channel_default(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t publish_url_list;\n    aos_list_t play_url_list;\n    oss_live_channel_configuration_t *config = NULL;\n    oss_live_channel_configuration_t info;\n    char *live_channel_name = \"test_live_channel_create_def\";\n    char *live_channel_desc = \"my test live channel\";\n    aos_string_t bucket;\n    aos_string_t channel_name;\n    oss_live_channel_publish_url_t *publish_url;\n    oss_live_channel_play_url_t *play_url;\n    char *content = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&channel_name, live_channel_name);\n\n    config = oss_create_live_channel_configuration_content(options->pool);\n    aos_str_set(&config->name, live_channel_name);\n    aos_str_set(&config->description, live_channel_desc);\n\n\n    // create\n    aos_list_init(&publish_url_list);\n    aos_list_init(&play_url_list);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_create_live_channel(options, &bucket, config, &publish_url_list,\n        &play_url_list, NULL);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    //valid bucketname\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_create_live_channel(options, &bucket, config, &publish_url_list,\n        &play_url_list, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_list_for_each_entry(oss_live_channel_publish_url_t, publish_url, &publish_url_list, node) {\n        content = apr_psprintf(p, \"%.*s\", publish_url->publish_url.len,\n            publish_url->publish_url.data);\n        CuAssertStrnEquals(tc, AOS_RTMP_PREFIX, strlen(AOS_RTMP_PREFIX), content);\n        CuAssertIntEquals(tc, 1, aos_ends_with(&publish_url->publish_url, &channel_name));\n    }\n\n    aos_list_for_each_entry(oss_live_channel_play_url_t, play_url, &play_url_list, node) {\n        content = apr_psprintf(p, \"%.*s\", play_url->play_url.len,\n            play_url->play_url.data);\n        CuAssertStrnEquals(tc, AOS_HTTP_PREFIX, strlen(AOS_HTTP_PREFIX), content);\n        CuAssertIntEquals(tc, 1, aos_ends_with(&play_url->play_url, &config->target.play_list_name));\n    }\n\n    // get info\n    s = oss_get_live_channel_info(options, &bucket, &channel_name, &info, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n    content = apr_psprintf(p, \"%.*s\", info.name.len, info.name.data);\n    CuAssertStrEquals(tc, live_channel_name, content);\n    content = apr_psprintf(p, \"%.*s\", info.description.len, info.description.data);\n    CuAssertStrEquals(tc, live_channel_desc, content);\n    content = apr_psprintf(p, \"%.*s\", info.status.len, info.status.data);\n    CuAssertStrEquals(tc, LIVE_CHANNEL_STATUS_ENABLED, content);\n    content = apr_psprintf(p, \"%.*s\", info.target.type.len, info.target.type.data);\n    CuAssertStrEquals(tc, LIVE_CHANNEL_DEFAULT_TYPE, content);\n    content = apr_psprintf(p, \"%.*s\", info.target.play_list_name.len, info.target.play_list_name.data);\n    CuAssertStrEquals(tc, LIVE_CHANNEL_DEFAULT_PLAYLIST, content);\n    CuAssertIntEquals(tc, LIVE_CHANNEL_DEFAULT_FRAG_DURATION, info.target.frag_duration);\n    CuAssertIntEquals(tc, LIVE_CHANNEL_DEFAULT_FRAG_COUNT, info.target.frag_count);\n    // delete\n    s = oss_delete_live_channel(options, &bucket, &channel_name, NULL);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_get_live_channel_info(options, &bucket, &channel_name, &info, NULL);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_create_live_channel_default ok\\n\");\n}\n\nvoid test_create_live_channel(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t publish_url_list;\n    aos_list_t play_url_list;\n    oss_live_channel_configuration_t *config = NULL;\n    oss_live_channel_configuration_t info;\n    char *live_channel_name = \"test_live_channel_create\";\n    char *live_channel_desc = \"my test live channel,<>{}=?//&\";\n    aos_string_t bucket;\n    aos_string_t channel_name;\n    oss_live_channel_publish_url_t *publish_url;\n    oss_live_channel_play_url_t *play_url;\n    aos_table_t *resp_headers = NULL;\n    char *content = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&channel_name, live_channel_name);\n\n    config = oss_create_live_channel_configuration_content(options->pool);\n    aos_str_set(&config->name, live_channel_name);\n    aos_str_set(&config->description, live_channel_desc);\n    aos_str_set(&config->status, LIVE_CHANNEL_STATUS_DISABLED);\n    aos_str_set(&config->target.type, \"HLS\");\n    aos_str_set(&config->target.play_list_name, \"myplay.m3u8\");\n    config->target.frag_duration = 100;\n    config->target.frag_count = 99;\n\n    // create\n    aos_list_init(&publish_url_list);\n    aos_list_init(&play_url_list);\n    s = oss_create_live_channel(options, &bucket, config, &publish_url_list,\n        &play_url_list, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_list_for_each_entry(oss_live_channel_publish_url_t, publish_url, &publish_url_list, node) {\n        content = apr_psprintf(p, \"%.*s\", publish_url->publish_url.len,\n            publish_url->publish_url.data);\n        CuAssertStrnEquals(tc, AOS_RTMP_PREFIX, strlen(AOS_RTMP_PREFIX), content);\n        CuAssertIntEquals(tc, 1, aos_ends_with(&publish_url->publish_url, &channel_name));\n    }\n\n    aos_list_for_each_entry(oss_live_channel_play_url_t, play_url, &play_url_list, node) {\n        content = apr_psprintf(p, \"%.*s\", play_url->play_url.len,\n            play_url->play_url.data);\n        CuAssertStrnEquals(tc, AOS_HTTP_PREFIX, strlen(AOS_HTTP_PREFIX), content);\n        CuAssertIntEquals(tc, 1, aos_ends_with(&play_url->play_url, &config->target.play_list_name));\n    }\n\n    // get info\n    s = oss_get_live_channel_info(options, &bucket, &channel_name, &info, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n    content = apr_psprintf(p, \"%.*s\", info.name.len, info.name.data);\n    CuAssertStrEquals(tc, live_channel_name, content);\n    content = apr_psprintf(p, \"%.*s\", info.description.len, info.description.data);\n    CuAssertStrEquals(tc, live_channel_desc, content);\n    content = apr_psprintf(p, \"%.*s\", info.status.len, info.status.data);\n    CuAssertStrEquals(tc, LIVE_CHANNEL_STATUS_DISABLED, content);\n    content = apr_psprintf(p, \"%.*s\", info.target.type.len, info.target.type.data);\n    CuAssertStrEquals(tc, \"HLS\", content);\n    content = apr_psprintf(p, \"%.*s\", info.target.play_list_name.len, info.target.play_list_name.data);\n    CuAssertStrEquals(tc, \"myplay.m3u8\", content);\n    CuAssertIntEquals(tc, 100, info.target.frag_duration);\n    CuAssertIntEquals(tc, 99, info.target.frag_count);\n\n    // delete\n    s = oss_delete_live_channel(options, &bucket, &channel_name, NULL);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_create_live_channel ok\\n\");\n}\n\nvoid test_get_live_channel_stat(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t publish_url_list;\n    aos_list_t play_url_list;\n    oss_live_channel_configuration_t *config = NULL;\n    oss_live_channel_stat_t live_stat;\n    char *live_channel_name = \"test_live_channel_stat\";\n    char *live_channel_desc = \"my test live channel\";\n    aos_string_t bucket;\n    aos_string_t channel_name;\n    char *content = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&channel_name, live_channel_name);\n\n    config = oss_create_live_channel_configuration_content(options->pool);\n    aos_str_set(&config->name, live_channel_name);\n    aos_str_set(&config->description, live_channel_desc);\n\n    // create\n    aos_list_init(&publish_url_list);\n    aos_list_init(&play_url_list);\n    s = oss_create_live_channel(options, &bucket, config, &publish_url_list,\n        &play_url_list, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    // get stat\n    s = oss_get_live_channel_stat(options, &bucket, &channel_name, &live_stat, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n    content = apr_psprintf(p, \"%.*s\", live_stat.pushflow_status.len, live_stat.pushflow_status.data);\n    CuAssertStrEquals(tc, \"Idle\", content);\n\n    s = oss_delete_live_channel(options, &bucket, &channel_name, NULL);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_get_live_channel_stat ok\\n\");\n}\n\nvoid test_put_live_channel_status(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    char *live_channel_name = \"test_live_channel_status\";\n    aos_string_t bucket;\n    aos_string_t channel_name;\n    aos_string_t channel_stutus;\n    oss_live_channel_configuration_t info;\n    char *content = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&channel_name, live_channel_name);\n\n    // create\n    s = create_test_live_channel(options, TEST_BUCKET_NAME, live_channel_name);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    // put status\n    aos_str_set(&channel_stutus, LIVE_CHANNEL_STATUS_DISABLED);\n    s= oss_put_live_channel_status(options, &bucket, &channel_name, &channel_stutus, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    // check by get info\n    s = oss_get_live_channel_info(options, &bucket, &channel_name, &info, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n    content = apr_psprintf(p, \"%.*s\", info.name.len, info.name.data);\n    CuAssertStrEquals(tc, live_channel_name, content);\n    content = apr_psprintf(p, \"%.*s\", info.status.len, info.status.data);\n    CuAssertStrEquals(tc, LIVE_CHANNEL_STATUS_DISABLED, content);\n\n    // put status\n    aos_str_set(&channel_stutus, LIVE_CHANNEL_STATUS_ENABLED);\n    s= oss_put_live_channel_status(options, &bucket, &channel_name, &channel_stutus, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    // check by get info\n    s = oss_get_live_channel_info(options, &bucket, &channel_name, &info, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n    content = apr_psprintf(p, \"%.*s\", info.name.len, info.name.data);\n    CuAssertStrEquals(tc, live_channel_name, content);\n    content = apr_psprintf(p, \"%.*s\", info.status.len, info.status.data);\n    CuAssertStrEquals(tc, LIVE_CHANNEL_STATUS_ENABLED, content);\n\n    // delete\n    s = oss_delete_live_channel(options, &bucket, &channel_name, NULL);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_put_live_channel_status ok\\n\");\n}\n\nvoid test_delete_live_channel(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t publish_url_list;\n    aos_list_t play_url_list;\n    oss_live_channel_configuration_t *config = NULL;\n    oss_live_channel_stat_t live_stat;\n    char *live_channel_name = \"test_live_channel_del\";\n    char *live_channel_desc = \"my test live channel\";\n    aos_string_t bucket;\n    aos_string_t channel_name;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&channel_name, live_channel_name);\n\n    config = oss_create_live_channel_configuration_content(options->pool);\n    aos_str_set(&config->name, live_channel_name);\n    aos_str_set(&config->description, live_channel_desc);\n\n    // create\n    aos_list_init(&publish_url_list);\n    aos_list_init(&play_url_list);\n    s = oss_create_live_channel(options, &bucket, config, &publish_url_list,\n        &play_url_list, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    // get stat\n    s = oss_get_live_channel_stat(options, &bucket, &channel_name, &live_stat, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    // delete\n    s = oss_delete_live_channel(options, &bucket, &channel_name, NULL);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    // get stat\n    s = oss_get_live_channel_stat(options, &bucket, &channel_name, &live_stat, NULL);\n    CuAssertIntEquals(tc, 404, s->code);\n    CuAssertStrEquals(tc, \"NoSuchLiveChannel\", s->error_code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_delete_live_channel ok\\n\");\n}\n\nvoid test_list_live_channel(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_string_t bucket;\n    oss_list_live_channel_params_t *params = NULL;\n    oss_live_channel_content_t *live_chan;\n    char *content = NULL;\n    oss_live_channel_publish_url_t *publish_url;\n    oss_live_channel_play_url_t *play_url;\n    int channel_count = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n\n    // create\n    s = create_test_live_channel(options, TEST_BUCKET_NAME, \"test_live_channel_list1\");\n    CuAssertIntEquals(tc, 200, s->code);\n    s = create_test_live_channel(options, TEST_BUCKET_NAME, \"test_live_channel_list2\");\n    CuAssertIntEquals(tc, 200, s->code);\n    s = create_test_live_channel(options, TEST_BUCKET_NAME, \"test_live_channel_list3\");\n    CuAssertIntEquals(tc, 200, s->code);\n    s = create_test_live_channel(options, TEST_BUCKET_NAME, \"test_live_channel_list4\");\n    CuAssertIntEquals(tc, 200, s->code);\n    s = create_test_live_channel(options, TEST_BUCKET_NAME, \"test_live_channel_list5\");\n    CuAssertIntEquals(tc, 200, s->code);\n\n    // list\n    params = oss_create_list_live_channel_params(options->pool);\n    aos_str_set(&params->prefix, \"test_live_channel_list\");\n    s = oss_list_live_channel(options, &bucket, params, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    channel_count = 0;\n    aos_list_for_each_entry(oss_live_channel_content_t, live_chan, &params->live_channel_list, node) {\n        channel_count++;\n        content = apr_psprintf(p, \"%.*s\", live_chan->name.len, live_chan->name.data);\n        CuAssertStrEquals(tc, apr_psprintf(p, \"test_live_channel_list%d\", channel_count), content);\n        content = apr_psprintf(p, \"%.*s\", live_chan->description.len, live_chan->description.data);\n        CuAssertStrEquals(tc, \"live channel description\", content);\n        content = apr_psprintf(p, \"%.*s\", live_chan->status.len, live_chan->status.data);\n        CuAssertStrEquals(tc, LIVE_CHANNEL_STATUS_ENABLED, content);\n        content = apr_psprintf(p, \"%.*s\", live_chan->last_modified.len, live_chan->last_modified.data);\n        CuAssertStrnEquals(tc, \"202\", strlen(\"202\"), content);\n        aos_list_for_each_entry(oss_live_channel_publish_url_t, publish_url, &live_chan->publish_url_list, node) {\n            content = apr_psprintf(p, \"%.*s\", publish_url->publish_url.len, publish_url->publish_url.data);\n            CuAssertStrnEquals(tc, AOS_RTMP_PREFIX, strlen(AOS_RTMP_PREFIX), content);\n        }\n        aos_list_for_each_entry(oss_live_channel_play_url_t, play_url, &live_chan->play_url_list, node) {\n            content = apr_psprintf(p, \"%.*s\", play_url->play_url.len, play_url->play_url.data);\n            CuAssertStrnEquals(tc, AOS_HTTP_PREFIX, strlen(AOS_HTTP_PREFIX), content);\n        }\n    }\n    CuAssertIntEquals(tc, 5, channel_count);\n\n    // list by prefix\n    params = oss_create_list_live_channel_params(options->pool);\n    aos_str_set(&params->prefix, \"test_live_channel_list2\");\n    s = oss_list_live_channel(options, &bucket, params, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    channel_count = 0;\n    aos_list_for_each_entry(oss_live_channel_content_t, live_chan, &params->live_channel_list, node) {\n        channel_count++;\n        content = apr_psprintf(p, \"%.*s\", live_chan->name.len, live_chan->name.data);\n        CuAssertStrEquals(tc, \"test_live_channel_list2\", content);\n        content = apr_psprintf(p, \"%.*s\", live_chan->description.len, live_chan->description.data);\n        CuAssertStrEquals(tc, \"live channel description\", content);\n        content = apr_psprintf(p, \"%.*s\", live_chan->status.len, live_chan->status.data);\n        CuAssertStrEquals(tc, LIVE_CHANNEL_STATUS_ENABLED, content);\n        content = apr_psprintf(p, \"%.*s\", live_chan->last_modified.len, live_chan->last_modified.data);\n        CuAssertStrnEquals(tc, \"202\", strlen(\"202\"), content);\n        aos_list_for_each_entry(oss_live_channel_publish_url_t, publish_url, &live_chan->publish_url_list, node) {\n            content = apr_psprintf(p, \"%.*s\", publish_url->publish_url.len, publish_url->publish_url.data);\n            CuAssertStrnEquals(tc, AOS_RTMP_PREFIX, strlen(AOS_RTMP_PREFIX), content);\n        }\n        aos_list_for_each_entry(oss_live_channel_play_url_t, play_url, &live_chan->play_url_list, node) {\n            content = apr_psprintf(p, \"%.*s\", play_url->play_url.len, play_url->play_url.data);\n            CuAssertStrnEquals(tc, AOS_HTTP_PREFIX, strlen(AOS_HTTP_PREFIX), content);\n        }\n    }\n    CuAssertIntEquals(tc, 1, channel_count);\n\n    // list by mark\n    params = oss_create_list_live_channel_params(options->pool);\n    aos_str_set(&params->prefix, \"test_live_channel_list\");\n    aos_str_set(&params->marker, \"test_live_channel_list2\");\n    s = oss_list_live_channel(options, &bucket, params, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    channel_count = 0;\n    aos_list_for_each_entry(oss_live_channel_content_t, live_chan, &params->live_channel_list, node) {\n       channel_count++;\n       content = apr_psprintf(p, \"%.*s\", live_chan->name.len, live_chan->name.data);\n       CuAssertStrEquals(tc, apr_psprintf(p, \"test_live_channel_list%d\", channel_count + 2), content);\n       content = apr_psprintf(p, \"%.*s\", live_chan->description.len, live_chan->description.data);\n       CuAssertStrEquals(tc, \"live channel description\", content);\n       content = apr_psprintf(p, \"%.*s\", live_chan->status.len, live_chan->status.data);\n       CuAssertStrEquals(tc, LIVE_CHANNEL_STATUS_ENABLED, content);\n       content = apr_psprintf(p, \"%.*s\", live_chan->last_modified.len, live_chan->last_modified.data);\n       CuAssertStrnEquals(tc, \"202\", strlen(\"202\"), content);\n       aos_list_for_each_entry(oss_live_channel_publish_url_t, publish_url, &live_chan->publish_url_list, node) {\n           content = apr_psprintf(p, \"%.*s\", publish_url->publish_url.len,\n               publish_url->publish_url.data);\n           CuAssertStrnEquals(tc, AOS_RTMP_PREFIX, strlen(AOS_RTMP_PREFIX), content);\n       }\n       aos_list_for_each_entry(oss_live_channel_play_url_t, play_url, &live_chan->play_url_list, node) {\n           content = apr_psprintf(p, \"%.*s\", play_url->play_url.len, play_url->play_url.data);\n           CuAssertStrnEquals(tc, AOS_HTTP_PREFIX, strlen(AOS_HTTP_PREFIX), content);\n       }\n    }\n    CuAssertIntEquals(tc, 3, channel_count);\n\n    // list by max keys\n    params = oss_create_list_live_channel_params(options->pool);\n    aos_str_set(&params->prefix, \"test_live_channel_list\");\n    params->max_keys = 3;\n    s = oss_list_live_channel(options, &bucket, params, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    channel_count = 0;\n    aos_list_for_each_entry(oss_live_channel_content_t, live_chan, &params->live_channel_list, node) {\n        channel_count++;\n        content = apr_psprintf(p, \"%.*s\", live_chan->name.len, live_chan->name.data);\n        CuAssertStrEquals(tc, apr_psprintf(p, \"test_live_channel_list%d\", channel_count), content);\n        content = apr_psprintf(p, \"%.*s\", live_chan->description.len, live_chan->description.data);\n        CuAssertStrEquals(tc, \"live channel description\", content);\n        content = apr_psprintf(p, \"%.*s\", live_chan->status.len, live_chan->status.data);\n        CuAssertStrEquals(tc, LIVE_CHANNEL_STATUS_ENABLED, content);\n        content = apr_psprintf(p, \"%.*s\", live_chan->last_modified.len, live_chan->last_modified.data);\n        CuAssertStrnEquals(tc, \"202\", strlen(\"202\"), content);\n        aos_list_for_each_entry(oss_live_channel_publish_url_t, publish_url, &live_chan->publish_url_list, node) {\n            content = apr_psprintf(p, \"%.*s\", publish_url->publish_url.len, publish_url->publish_url.data);\n            CuAssertStrnEquals(tc, AOS_RTMP_PREFIX, strlen(AOS_RTMP_PREFIX), content);\n        }\n        aos_list_for_each_entry(oss_live_channel_play_url_t, play_url, &live_chan->play_url_list, node) {\n            content = apr_psprintf(p, \"%.*s\", play_url->play_url.len, play_url->play_url.data);\n            CuAssertStrnEquals(tc, AOS_HTTP_PREFIX, strlen(AOS_HTTP_PREFIX), content);\n        }\n    }\n    CuAssertIntEquals(tc, 3, channel_count);\n\n    s = delete_test_live_channel(options, TEST_BUCKET_NAME, \"test_live_channel_list1\");\n    CuAssertIntEquals(tc, 204, s->code);\n    s = delete_test_live_channel(options, TEST_BUCKET_NAME, \"test_live_channel_list2\");\n    CuAssertIntEquals(tc, 204, s->code);\n    s = delete_test_live_channel(options, TEST_BUCKET_NAME, \"test_live_channel_list3\");\n    CuAssertIntEquals(tc, 204, s->code);\n    s = delete_test_live_channel(options, TEST_BUCKET_NAME, \"test_live_channel_list4\");\n    CuAssertIntEquals(tc, 204, s->code);\n    s = delete_test_live_channel(options, TEST_BUCKET_NAME, \"test_live_channel_list5\");\n    CuAssertIntEquals(tc, 204, s->code);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_list_live_channel(options, &bucket, params, NULL);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_list_live_channel ok\\n\");\n}\n\nvoid test_get_live_channel_history(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t live_record_list;\n    oss_live_record_content_t *live_record;\n    char *live_channel_name = \"test_live_channel_hist\";\n    aos_string_t bucket;\n    aos_string_t channel_name;\n    aos_string_t content;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&channel_name, live_channel_name);\n\n    // create\n    s = create_test_live_channel(options, TEST_BUCKET_NAME, live_channel_name);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    // get history\n    aos_list_init(&live_record_list);\n    s = oss_get_live_channel_history(options, &bucket, &channel_name, &live_record_list, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_list_for_each_entry(oss_live_record_content_t, live_record, &live_record_list, node) {\n        aos_str_set(&content, \".000Z\");\n        CuAssertIntEquals(tc, 1, aos_ends_with(&live_record->start_time, &content));\n        CuAssertIntEquals(tc, 1, aos_ends_with(&live_record->end_time, &content));\n        CuAssertTrue(tc, live_record->remote_addr.len >= (int)strlen(\"0.0.0.0:0\"));\n    }\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_get_live_channel_history(options, &bucket, &channel_name, &live_record_list, NULL);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    // delete\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_delete_live_channel(options, &bucket, &channel_name, NULL);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_get_live_channel_history ok\\n\");\n}\n\n/**\n * Note: the case need put rtmp stream, use command:\n *  ffmpeg \\-re \\-i allstar.flv \\-c copy \\-f flv \"rtmp://oss-live-channel.demo-oss-cn-shenzhen.aliyuncs.com/live/test_live_channel_vod?playlistName=play.m3u8\"\n */\nvoid test_gen_vod_play_list(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    char *live_channel_name = \"test_live_channel_vod\";\n    aos_string_t bucket;\n    aos_string_t channel_name;\n    aos_string_t play_list_name;\n    int64_t start_time = 0;\n    int64_t end_time = 0;\n    oss_acl_e oss_acl;\n    aos_table_t *resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&channel_name, live_channel_name);\n\n    oss_acl = OSS_ACL_PUBLIC_READ_WRITE;\n    s = oss_put_bucket_acl(options, &bucket, oss_acl, &resp_headers);\n\n    // create\n    s = create_test_live_channel(options, TEST_BUCKET_NAME, live_channel_name);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    // post vod\n    aos_str_set(&play_list_name, \"play.m3u8\");\n    start_time = apr_time_now() / 1000000 - 3600;\n    end_time = apr_time_now() / 1000000 + 3600;\n\n    s = oss_gen_vod_play_list(options, &bucket, &channel_name, &play_list_name,\n        start_time, end_time, NULL);\n    CuAssertIntEquals(tc, 400, s->code);\n\n    // delete\n    s = oss_delete_live_channel(options, &bucket, &channel_name, NULL);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_post_vod_play_list ok\\n\");\n}\n\nvoid test_gen_rtmp_signed_url(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    char *live_channel_name = \"test_live_channel_url\";\n    aos_string_t bucket;\n    aos_string_t channel_name;\n    aos_string_t play_list_name;\n    oss_acl_e oss_acl;\n    aos_table_t *resp_headers = NULL;\n    char *rtmp_url = NULL;\n    int64_t expires = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&channel_name, live_channel_name);\n\n    oss_acl = OSS_ACL_PRIVATE;\n    s = oss_put_bucket_acl(options, &bucket, oss_acl, &resp_headers);\n\n    // create\n    s = create_test_live_channel(options, TEST_BUCKET_NAME, live_channel_name);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    // gen url\n    aos_str_set(&play_list_name, \"play.m3u8\");\n    expires = apr_time_now() / 1000000 + 60 * 30;\n    rtmp_url = oss_gen_rtmp_signed_url(options, &bucket, &channel_name,\n        &play_list_name, expires);\n\n    // manual check passed\n    CuAssertStrnEquals(tc, AOS_RTMP_PREFIX, strlen(AOS_RTMP_PREFIX), rtmp_url);\n\n    // delete\n    s = oss_delete_live_channel(options, &bucket, &channel_name, NULL);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_gen_rtmp_signed_url ok\\n\");\n}\n\nvoid test_live_channel_misc_functions(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_live_record_content_t *content = NULL;\n    aos_pool_create(&p, NULL);\n\n    content = oss_create_live_record_content(p);\n    CuAssertTrue(tc, content != NULL);\n\n    aos_pool_destroy(p);\n    printf(\"test_live_channel_misc_functions ok\\n\");\n}\n\nvoid test_live_invalid_parameter(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    oss_request_options_t *options = NULL;\r\n    int is_cname = 0;\r\n    int i;\r\n    char *invalid_name_list[] =\r\n    { \"a\", \"1\", \"!\", \"aa\", \"12\", \"a1\",\r\n        \"a!\", \"1!\", \"aAa\", \"1A1\", \"a!a\", \"FengChao@123\", \"-a123\", \"a_123\", \"a123-\",\r\n        \"1234567890123456789012345678901234567890123456789012345678901234\", \"\"\r\n    };\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n\r\n    for (i = 0; i < sizeof(invalid_name_list) / sizeof(invalid_name_list[0]); i++) {\r\n        aos_string_t bucket;\r\n        aos_status_t *s = NULL;\r\n        aos_table_t *resp_headers = NULL;\r\n        aos_str_set(&bucket, invalid_name_list[i]);\r\n\r\n        s = oss_create_live_channel(options, &bucket, NULL, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_live_channel_status(options, &bucket, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_live_channel_info(options, &bucket, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_live_channel_stat(options, &bucket, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\n        s = oss_delete_live_channel(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\n        s = oss_list_live_channel(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\n        s = oss_get_live_channel_history(options, &bucket, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\n        s = oss_gen_vod_play_list(options, &bucket, NULL, NULL, 0, 10, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n    }\r\n    aos_pool_destroy(p);\r\n\r\n    printf(\"test_live_invalid_parameter ok\\n\");\r\n}\n\nCuSuite *test_oss_live()\n{\n    CuSuite* suite = CuSuiteNew();\n\n    SUITE_ADD_TEST(suite, test_live_setup);\n    SUITE_ADD_TEST(suite, test_create_live_channel_default);\n    SUITE_ADD_TEST(suite, test_create_live_channel);\n    SUITE_ADD_TEST(suite, test_put_live_channel_status);\n    SUITE_ADD_TEST(suite, test_get_live_channel_stat);\n    SUITE_ADD_TEST(suite, test_delete_live_channel);\n    SUITE_ADD_TEST(suite, test_list_live_channel);\n    SUITE_ADD_TEST(suite, test_get_live_channel_history);\n    SUITE_ADD_TEST(suite, test_gen_vod_play_list);\n    SUITE_ADD_TEST(suite, test_gen_rtmp_signed_url);\n    SUITE_ADD_TEST(suite, test_live_channel_misc_functions);\n    SUITE_ADD_TEST(suite, test_live_invalid_parameter);\n    SUITE_ADD_TEST(suite, test_live_cleanup);\n\n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_multipart.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"aos_transport.h\"\n#include \"aos_http_io.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n#include \"oss_multipart.c\"\n\nvoid test_multipart_setup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n\n    TEST_BUCKET_NAME = get_test_bucket_name(aos_global_pool, \"multipart\");\n\n    //create test bucket\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n}\n\nvoid test_multipart_cleanup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    char *object_name = \"oss_test_multipart_upload\";\n    char *object_name1 = \"oss_test_multipart_upload_from_file\";\n    char *object_name2 = \"oss_test_upload_part_copy_dest_object\";\n    char *object_name3 = \"oss_test_upload_part_copy_source_object\";\n    char *object_name4 = \"oss_test_list_upload_part_with_empty\";\n    char *object_name5 = \"test_oss_get_sorted_uploaded_part\";\n    char *object_name6 = \"test_oss_get_sorted_uploaded_part_with_empty\";\n    aos_table_t *resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    //delete test object\n    delete_test_object(options, TEST_BUCKET_NAME, object_name);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name1);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name2);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name3);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name4);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name5);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name6);\n\n    //delete test bucket\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_delete_bucket(options, &bucket, &resp_headers);\n    apr_sleep(apr_time_from_sec(3));\n\n    aos_pool_destroy(p);\n}\n\nvoid test_init_abort_multipart_upload(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_abort_multipart_upload\";\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_string_t upload_id;\n    aos_status_t *s = NULL;\n\n    //test init multipart\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, object_name, &upload_id);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertTrue(tc, upload_id.len > 0);\n    CuAssertPtrNotNull(tc, upload_id.data);\n\n    //abort multipart\n    s = abort_test_multipart_upload(options, TEST_BUCKET_NAME, object_name, &upload_id);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_init_abort_multipart_upload ok\\n\");\n}\n\nvoid test_list_multipart_upload(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name1 = \"oss_test_abort_multipart_upload1\";\n    char *object_name2 = \"oss_test_abort_multipart_upload2\";\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_string_t upload_id1;\n    aos_string_t upload_id2;\n    aos_status_t *s = NULL;\n    aos_table_t *resp_headers;\n    oss_list_multipart_upload_params_t *params = NULL;\n    char *expect_next_key_marker = \"oss_test_abort_multipart_upload1\";\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, object_name1, &upload_id1);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, object_name2, &upload_id2);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    params = oss_create_list_multipart_upload_params(p);\n    params->max_ret = 1;\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_list_multipart_upload(options, &bucket, params, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 1, params->truncated);\n    CuAssertStrEquals(tc, expect_next_key_marker, params->next_key_marker.data);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_list_init(&params->upload_list);\n    aos_str_set(&params->key_marker, params->next_key_marker.data);\n    aos_str_set(&params->upload_id_marker, params->next_upload_id_marker.data);\n\n    s = oss_list_multipart_upload(options, &bucket, params, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    //CuAssertIntEquals(tc, 0, params->truncated);\n\n    s = abort_test_multipart_upload(options, TEST_BUCKET_NAME, object_name1, &upload_id1);\n    CuAssertIntEquals(tc, 204, s->code);\n    s = abort_test_multipart_upload(options, TEST_BUCKET_NAME, object_name2, &upload_id2);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_list_multipart_upload(options, &bucket, params, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_list_multipart_upload ok\\n\");    \n}\n\nvoid test_multipart_upload(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_multipart_upload\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    aos_table_t *headers = NULL;\n    aos_table_t *upload_part_resp_headers = NULL;\n    oss_list_upload_part_params_t *params = NULL;\n    aos_table_t *list_part_resp_headers = NULL;\n    aos_string_t upload_id;\n    aos_list_t complete_part_list;\n    oss_list_part_content_t *part_content1 = NULL;\n    oss_list_part_content_t *part_content2 = NULL;\n    oss_complete_part_content_t *complete_content1 = NULL;\n    oss_complete_part_content_t *complete_content2 = NULL;\n    aos_table_t *complete_resp_headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n    int part_num = 1;\n    int part_num1 = 2;\n    char *expect_part_num_marker = \"1\";\n    char *content_type_for_complete = \"application/octet-stream\";\n    char *actual_content_type = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    headers = aos_table_make(options->pool, 2);\n\n    //init mulitipart\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, object_name, &upload_id);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //upload part\n    aos_list_init(&buffer);\n    make_random_body(p, 200, &buffer);\n\n    s = oss_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num, &buffer, &upload_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, upload_part_resp_headers);\n\n    aos_list_init(&buffer);\n    make_random_body(p, 200, &buffer);\n    s = oss_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num1, &buffer, &upload_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, upload_part_resp_headers);\n\n    //list part\n    params = oss_create_list_upload_part_params(p);\n    params->max_ret = 1;\n    aos_list_init(&complete_part_list);\n\n    s = oss_list_upload_part(options, &bucket, &object, &upload_id, \n                             params, &list_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 1, params->truncated);\n    CuAssertStrEquals(tc, expect_part_num_marker, \n                      params->next_part_number_marker.data);\n    CuAssertPtrNotNull(tc, list_part_resp_headers);\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content1, &params->part_list, node) {\n        complete_content1 = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content1->part_number, part_content1->part_number.data);\n        aos_str_set(&complete_content1->etag, part_content1->etag.data);\n        aos_list_add_tail(&complete_content1->node, &complete_part_list);\n    }\n\n    aos_list_init(&params->part_list);\n    aos_str_set(&params->part_number_marker, params->next_part_number_marker.data);\n    s = oss_list_upload_part(options, &bucket, &object, &upload_id, params, &list_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 0, params->truncated);\n    CuAssertPtrNotNull(tc, list_part_resp_headers);\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content2, &params->part_list, node) {\n        complete_content2 = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content2->part_number, part_content2->part_number.data);\n        aos_str_set(&complete_content2->etag, part_content2->etag.data);\n        aos_list_add_tail(&complete_content2->node, &complete_part_list);\n    }\n\n    //complete multipart\n    apr_table_add(headers, OSS_CONTENT_TYPE, content_type_for_complete);\n    s = oss_complete_multipart_upload(options, &bucket, &object, &upload_id,\n            &complete_part_list, headers, &complete_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, complete_resp_headers);\n    \n    //check content type\n    apr_table_clear(headers);\n    s = oss_head_object(options, &bucket, &object, headers, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n   \n    actual_content_type = (char*)(apr_table_get(head_resp_headers, OSS_CONTENT_TYPE));\n    CuAssertStrEquals(tc, content_type_for_complete, actual_content_type);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_multipart_upload ok\\n\");\n}\n\nvoid test_multipart_upload_from_file(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_multipart_upload_from_file\";\n    char *file_path = \"test_upload_part_copy.file\";\n    FILE* fd = NULL;\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    oss_upload_file_t *upload_file = NULL;\n    aos_table_t *upload_part_resp_headers = NULL;\n    oss_list_upload_part_params_t *params = NULL;\n    aos_table_t *list_part_resp_headers = NULL;\n    aos_string_t upload_id;\n    aos_list_t complete_part_list;\n    oss_list_part_content_t *part_content1 = NULL;\n    oss_complete_part_content_t *complete_content1 = NULL;\n    aos_table_t *complete_resp_headers = NULL;\n    aos_string_t data;\n    int part_num = 1;\n    int part_num1 = 2;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    // create multipart upload local file    \n    make_rand_string(p, 10 * 1024 * 1024, &data);\n    fd = fopen(file_path, \"w\");\n    CuAssertTrue(tc, fd != NULL);\n    fwrite(data.data, sizeof(data.data[0]), data.len, fd);\n    fclose(fd);\n\n    //init mulitipart\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, object_name, &upload_id);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //upload part from file\n    upload_file = oss_create_upload_file(p);\n    aos_str_set(&upload_file->filename, file_path);\n    upload_file->file_pos = 0;\n    upload_file->file_last = 200 * 1024; //200k\n    \n    s = oss_upload_part_from_file(options, &bucket, &object, &upload_id,\n        part_num, upload_file, &upload_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, upload_part_resp_headers);\n    \n    upload_file->file_pos = 200 *1024;//remain content start pos\n    upload_file->file_last = get_file_size(file_path);\n    \n    s = oss_upload_part_from_file(options, &bucket, &object, &upload_id,\n        part_num1, upload_file, &upload_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, upload_part_resp_headers);\n    \n    //list part\n    params = oss_create_list_upload_part_params(p);\n    aos_str_set(&params->part_number_marker, \"\");\n    params->max_ret = 10;\n    params->truncated = 0;\n    aos_list_init(&complete_part_list);\n    \n    s = oss_list_upload_part(options, &bucket, &object, &upload_id, params, &list_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 0, params->truncated);\n    CuAssertPtrNotNull(tc, list_part_resp_headers);\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content1, &params->part_list, node) {\n        complete_content1 = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content1->part_number, part_content1->part_number.data);\n        aos_str_set(&complete_content1->etag, part_content1->etag.data);\n        aos_list_add_tail(&complete_content1->node, &complete_part_list);\n    }\n\n    //complete multipart\n    s = oss_complete_multipart_upload(options, &bucket, &object, &upload_id,\n            &complete_part_list, NULL, &complete_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, complete_resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_upload_part_from_file(options, &bucket, &object, &upload_id,\n        part_num1, upload_file, &upload_part_resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    remove(file_path);\n    aos_pool_destroy(p);\n\n    printf(\"test_multipart_upload_from_file ok\\n\");\n}\n\nvoid test_upload_part_copy(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_string_t upload_id;\n    oss_list_upload_part_params_t *list_upload_part_params = NULL;\n    oss_upload_part_copy_params_t *upload_part_copy_params1 = NULL;\n    oss_upload_part_copy_params_t *upload_part_copy_params2 = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *query_params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_table_t *list_part_resp_headers = NULL;\n    aos_list_t complete_part_list;\n    oss_list_part_content_t *part_content = NULL;\n    oss_complete_part_content_t *complete_content = NULL;\n    aos_table_t *complete_resp_headers = NULL;\n    aos_status_t *s = NULL;\n    int part1 = 1;\n    int part2 = 2;\n    char *local_filename = \"test_upload_part_copy.file\";\n    char *download_filename = \"test_upload_part_copy.file.download\";\n    char *source_object_name = \"oss_test_upload_part_copy_source_object\";\n    char *dest_object_name = \"oss_test_upload_part_copy_dest_object\";\n    FILE *fd = NULL;\n    aos_string_t download_file;\n    aos_string_t dest_bucket;\n    aos_string_t dest_object;\n    int64_t range_start1 = 0;\n    int64_t range_end1 = 6000000;\n    int64_t range_start2 = 6000001;\n    int64_t range_end2;\n    aos_string_t data;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n\n    // create multipart upload local file    \n    make_rand_string(p, 10 * 1024 * 1024, &data);\n    fd = fopen(local_filename, \"w\");\n    CuAssertTrue(tc, fd != NULL);\n    fwrite(data.data, sizeof(data.data[0]), data.len, fd);\n    fclose(fd);    \n\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    s = create_test_object_from_file(options, TEST_BUCKET_NAME, source_object_name, \n        local_filename, headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n\n    //init mulitipart\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, dest_object_name, &upload_id);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //upload part copy 1\n    upload_part_copy_params1 = oss_create_upload_part_copy_params(p);\n    aos_str_set(&upload_part_copy_params1->source_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&upload_part_copy_params1->source_object, source_object_name);\n    aos_str_set(&upload_part_copy_params1->dest_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&upload_part_copy_params1->dest_object, dest_object_name);\n    aos_str_set(&upload_part_copy_params1->upload_id, upload_id.data);\n    upload_part_copy_params1->part_num = part1;\n    upload_part_copy_params1->range_start = range_start1;\n    upload_part_copy_params1->range_end = range_end1;\n\n    headers = aos_table_make(p, 0);\n    s = oss_upload_part_copy(options, upload_part_copy_params1, headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //upload part copy 2\n    resp_headers = NULL;\n    range_end2 = get_file_size(local_filename) - 1;\n    upload_part_copy_params2 = oss_create_upload_part_copy_params(p);\n    aos_str_set(&upload_part_copy_params2->source_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&upload_part_copy_params2->source_object, source_object_name);\n    aos_str_set(&upload_part_copy_params2->dest_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&upload_part_copy_params2->dest_object, dest_object_name);\n    aos_str_set(&upload_part_copy_params2->upload_id, upload_id.data);\n    upload_part_copy_params2->part_num = part2;\n    upload_part_copy_params2->range_start = range_start2;\n    upload_part_copy_params2->range_end = range_end2;\n\n    headers = aos_table_make(p, 0);\n    s = oss_upload_part_copy(options, upload_part_copy_params2, headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //list part\n    list_upload_part_params = oss_create_list_upload_part_params(p);\n    list_upload_part_params->max_ret = 10;\n    aos_list_init(&complete_part_list);\n        \n    aos_str_set(&dest_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&dest_object, dest_object_name);\n    s = oss_list_upload_part(options, &dest_bucket, &dest_object, &upload_id, \n                             list_upload_part_params, &list_part_resp_headers);\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content, &list_upload_part_params->part_list, node) {\n        complete_content = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content->part_number, part_content->part_number.data);\n        aos_str_set(&complete_content->etag, part_content->etag.data);\n        aos_list_add_tail(&complete_content->node, &complete_part_list);\n    }\n     \n    //complete multipart\n    headers = aos_table_make(p, 0);\n    s = oss_complete_multipart_upload(options, &dest_bucket, &dest_object, \n            &upload_id, &complete_part_list, headers, &complete_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, complete_resp_headers);\n\n    //check upload copy part content equal to local file\n    headers = aos_table_make(p, 0);\n    aos_str_set(&download_file, download_filename);\n    s = oss_get_object_to_file(options, &dest_bucket, &dest_object, headers, \n                               query_params, &download_file, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, get_file_size(local_filename), get_file_size(download_filename));    \n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    resp_headers = NULL;\n    range_end2 = get_file_size(local_filename) - 1;\n    upload_part_copy_params2 = oss_create_upload_part_copy_params(p);\n    aos_str_set(&upload_part_copy_params2->source_bucket, \"c-sdk-no-exist\");\n    aos_str_set(&upload_part_copy_params2->source_object, source_object_name);\n    aos_str_set(&upload_part_copy_params2->dest_bucket, \"c-sdk-no-exist\");\n    aos_str_set(&upload_part_copy_params2->dest_object, dest_object_name);\n    aos_str_set(&upload_part_copy_params2->upload_id, upload_id.data);\n    upload_part_copy_params2->part_num = part2;\n    upload_part_copy_params2->range_start = range_start2;\n    upload_part_copy_params2->range_end = range_end2;\n    headers = aos_table_make(p, 0);\n    s = oss_upload_part_copy(options, upload_part_copy_params2, headers, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    remove(download_filename);\n    remove(local_filename);\n    aos_pool_destroy(p);\n\n    printf(\"test_upload_part_copy ok\\n\");\n}\n\nvoid test_upload_part_copy_with_special_char(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_string_t upload_id;\n    oss_list_upload_part_params_t *list_upload_part_params = NULL;\n    oss_upload_part_copy_params_t *upload_part_copy_params1 = NULL;\n    oss_upload_part_copy_params_t *upload_part_copy_params2 = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *query_params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_table_t *list_part_resp_headers = NULL;\n    aos_list_t complete_part_list;\n    oss_list_part_content_t *part_content = NULL;\n    oss_complete_part_content_t *complete_content = NULL;\n    aos_table_t *complete_resp_headers = NULL;\n    aos_status_t *s = NULL;\n    int part1 = 1;\n    int part2 = 2;\n    char *local_filename = \"test_upload_part_copy.file\";\n    char *download_filename = \"test_upload_part_copy.file.download\";\n    char *source_object_name = \"oss_test_upload_part_copy_source_object_special_char+1\";\n    char *dest_object_name = \"oss_test_upload_part_copy_dest_object_special_char\";\n    FILE *fd = NULL;\n    aos_string_t download_file;\n    aos_string_t dest_bucket;\n    aos_string_t dest_object;\n    int64_t range_start1 = 0;\n    int64_t range_end1 = 6000000;\n    int64_t range_start2 = 6000001;\n    int64_t range_end2;\n    aos_string_t data;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n\n    // create multipart upload local file    \n    make_rand_string(p, 10 * 1024 * 1024, &data);\n    fd = fopen(local_filename, \"w\");\n    CuAssertTrue(tc, fd != NULL);\n    fwrite(data.data, sizeof(data.data[0]), data.len, fd);\n    fclose(fd);\n\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    s = create_test_object_from_file(options, TEST_BUCKET_NAME, source_object_name,\n        local_filename, headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n\n    //init mulitipart\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, dest_object_name, &upload_id);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //upload part copy 1\n    upload_part_copy_params1 = oss_create_upload_part_copy_params(p);\n    aos_str_set(&upload_part_copy_params1->source_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&upload_part_copy_params1->source_object, source_object_name);\n    aos_str_set(&upload_part_copy_params1->dest_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&upload_part_copy_params1->dest_object, dest_object_name);\n    aos_str_set(&upload_part_copy_params1->upload_id, upload_id.data);\n    upload_part_copy_params1->part_num = part1;\n    upload_part_copy_params1->range_start = range_start1;\n    upload_part_copy_params1->range_end = range_end1;\n\n    headers = aos_table_make(p, 0);\n    s = oss_upload_part_copy(options, upload_part_copy_params1, headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //upload part copy 2\n    resp_headers = NULL;\n    range_end2 = get_file_size(local_filename) - 1;\n    upload_part_copy_params2 = oss_create_upload_part_copy_params(p);\n    aos_str_set(&upload_part_copy_params2->source_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&upload_part_copy_params2->source_object, source_object_name);\n    aos_str_set(&upload_part_copy_params2->dest_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&upload_part_copy_params2->dest_object, dest_object_name);\n    aos_str_set(&upload_part_copy_params2->upload_id, upload_id.data);\n    upload_part_copy_params2->part_num = part2;\n    upload_part_copy_params2->range_start = range_start2;\n    upload_part_copy_params2->range_end = range_end2;\n\n    headers = aos_table_make(p, 0);\n    s = oss_upload_part_copy(options, upload_part_copy_params2, headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //list part\n    list_upload_part_params = oss_create_list_upload_part_params(p);\n    list_upload_part_params->max_ret = 10;\n    aos_list_init(&complete_part_list);\n\n    aos_str_set(&dest_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&dest_object, dest_object_name);\n    s = oss_list_upload_part(options, &dest_bucket, &dest_object, &upload_id,\n        list_upload_part_params, &list_part_resp_headers);\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content, &list_upload_part_params->part_list, node) {\n        complete_content = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content->part_number, part_content->part_number.data);\n        aos_str_set(&complete_content->etag, part_content->etag.data);\n        aos_list_add_tail(&complete_content->node, &complete_part_list);\n    }\n\n    //complete multipart\n    headers = aos_table_make(p, 0);\n    s = oss_complete_multipart_upload(options, &dest_bucket, &dest_object,\n        &upload_id, &complete_part_list, headers, &complete_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, complete_resp_headers);\n\n    //check upload copy part content equal to local file\n    headers = aos_table_make(p, 0);\n    aos_str_set(&download_file, download_filename);\n    s = oss_get_object_to_file(options, &dest_bucket, &dest_object, headers,\n        query_params, &download_file, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, get_file_size(local_filename), get_file_size(download_filename));\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    remove(download_filename);\n    remove(local_filename);\n    aos_pool_destroy(p);\n\n    printf(\"test_upload_part_copy ok\\n\");\n}\n\nvoid test_upload_file_failed_without_uploadid(CuTest *tc) \n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_multipart_upload_from_file\";\n    aos_string_t object; \n    int is_cname = 0; \n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    int part_size = 100*1024;\n    aos_string_t upload_id;\n    aos_string_t filepath;\n    \n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    aos_str_set(&object, object_name);\n    aos_str_null(&upload_id);\n    aos_str_set(&filepath, __FILE__);\n    s = oss_upload_file(options, &bucket, &object, &upload_id, &filepath, \n                        part_size, NULL);\n    CuAssertIntEquals(tc, 404, s->code);\r\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&filepath, \"\");\n    s = oss_upload_file(options, &bucket, &object, &upload_id, &filepath,\n        part_size, NULL);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_upload_file_failed_without_uploadid ok\\n\");\n}\n\nvoid test_upload_file(CuTest *tc) \n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_multipart_upload_from_file\";\n    aos_string_t object; \n    int is_cname = 0; \n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    int part_size = 100 * 1024;\n    aos_string_t upload_id;\n    aos_string_t filepath;\n    \n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_null(&upload_id);\n    aos_str_set(&filepath, __FILE__);\n    s = oss_upload_file(options, &bucket, &object, &upload_id, &filepath, \n                        part_size, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_upload_file ok\\n\");\n}\n\n\nvoid test_upload_file_from_recover(CuTest *tc) \n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_multipart_upload_from_file\";\n    aos_string_t object; \n    int is_cname = 0; \n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    int part_size = 100*1024;\n    aos_string_t upload_id;\n    aos_string_t filepath;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    //init mulitipart\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, \n                                   object_name, &upload_id);\n    CuAssertIntEquals(tc, 200, s->code);\n    \n    aos_str_set(&filepath, __FILE__);\n    s = oss_upload_file(options, &bucket, &object, &upload_id, &filepath, \n                        part_size, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_upload_file_from_recover ok\\n\");\n}\n\nvoid test_upload_file_from_recover_failed(CuTest *tc) \n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_multipart_upload_from_file\";\n    aos_string_t object; \n    int is_cname = 0; \n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    int part_size = 100*1024;\n    aos_string_t upload_id;\n    aos_string_t filepath;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    //init mulitipart\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, \n                                   object_name, &upload_id);\n    CuAssertIntEquals(tc, 200, s->code);\n    \n    aos_str_set(&filepath, __FILE__);\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_upload_file(options, &bucket, &object, &upload_id, &filepath, \n                        part_size, NULL);\n    CuAssertIntEquals(tc, 404, s->code);\r\n\n    //abort multipart\n    s = abort_test_multipart_upload(options, TEST_BUCKET_NAME,\n                                    object_name, &upload_id);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_upload_file_from_recover_failed ok\\n\");\n}\n\nvoid test_list_upload_part_with_empty(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_list_upload_part_with_empty\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_table_t *headers = NULL;\n    oss_list_upload_part_params_t *params = NULL;\n    aos_table_t *list_part_resp_headers = NULL;\n    aos_string_t upload_id;\n    aos_list_t complete_part_list;\n    aos_table_t *complete_resp_headers = NULL;\n    char *content_type_for_complete = \"video/MP2T\";\n    oss_list_part_content_t *part_content1 = NULL;\n    oss_complete_part_content_t *complete_content1 = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    headers = aos_table_make(options->pool, 2);\n\n    //init mulitipart\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, object_name, &upload_id);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //list part\n    params = oss_create_list_upload_part_params(p);\n    params->max_ret = 1;\n    aos_list_init(&complete_part_list);\n\n    s = oss_list_upload_part(options, &bucket, &object, &upload_id, \n                             params, &list_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 0, params->truncated);\n    CuAssertStrEquals(tc, NULL, params->next_part_number_marker.data);\n    CuAssertPtrNotNull(tc, list_part_resp_headers);\n\n    // test for #OSS-1161\n    aos_list_for_each_entry(oss_list_part_content_t, part_content1, &params->part_list, node) {\n        complete_content1 = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content1->part_number, part_content1->part_number.data);\n        aos_str_set(&complete_content1->etag, part_content1->etag.data);\n        aos_list_add_tail(&complete_content1->node, &complete_part_list);\n    }\n\n    //complete multipart\n    apr_table_add(headers, OSS_CONTENT_TYPE, content_type_for_complete);\n    s = oss_complete_multipart_upload(options, &bucket, &object, &upload_id,\n            &complete_part_list, headers, &complete_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, complete_resp_headers);\n\n    delete_test_object(options, TEST_BUCKET_NAME, object_name);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_list_upload_part_with_empty ok\\n\");\n}\n\nvoid test_oss_get_sorted_uploaded_part(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"test_oss_get_sorted_uploaded_part\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    aos_table_t *headers = NULL;\n    aos_table_t *upload_part_resp_headers = NULL;\n    aos_string_t upload_id;\n    aos_list_t complete_part_list;\n    aos_table_t *complete_resp_headers = NULL;\n    int part_num = 1;\n    int part_num1 = 2;\n    int part_count = 0;\n    char *content_type_for_complete = \"video/MP2T\";\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    //init mulitipart\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, \n                                   object_name, &upload_id);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //upload part\n    aos_list_init(&buffer);\n    make_random_body(p, 200, &buffer);\n\n    s = oss_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num, &buffer, &upload_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, upload_part_resp_headers);\n\n    aos_list_init(&buffer);\n    make_random_body(p, 200, &buffer);\n    s = oss_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num1, &buffer, &upload_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, upload_part_resp_headers);\n\n    //get sorted uploaded part\n    aos_list_init(&complete_part_list);\n\n    s = oss_get_sorted_uploaded_part(options, &bucket, &object, \n            &upload_id, &complete_part_list, &part_count);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 2, part_count);\n\n    //complete multipart\n    headers = aos_table_make(options->pool, 1);\n    apr_table_add(headers, OSS_CONTENT_TYPE, content_type_for_complete);\n    s = oss_complete_multipart_upload(options, &bucket, &object, &upload_id,\n            &complete_part_list, headers, &complete_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, complete_resp_headers);\n\n    delete_test_object(options, TEST_BUCKET_NAME, object_name);\n    aos_pool_destroy(p);\n\n    printf(\"test_oss_get_sorted_uploaded_part ok\\n\");\n}\n\nvoid test_oss_get_sorted_uploaded_part_with_empty(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"test_oss_get_sorted_uploaded_part_with_empty\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_string_t upload_id;\n    aos_list_t complete_part_list;\n    int part_count = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    //init mulitipart\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, \n                                   object_name, &upload_id);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //get sorted uploaded part\n    aos_list_init(&complete_part_list);\n\n    s = oss_get_sorted_uploaded_part(options, &bucket, &object, &upload_id,\n            &complete_part_list, &part_count);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 0, part_count);\n\n    //abort multipart\n    s = abort_test_multipart_upload(options, TEST_BUCKET_NAME,\n                                    object_name, &upload_id);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    delete_test_object(options, TEST_BUCKET_NAME, object_name);\n    aos_pool_destroy(p);\n\n    printf(\"test_oss_get_sorted_uploaded_part_with_empty ok\\n\");\n}\n\nvoid test_multipart_invalid_parameter(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    oss_request_options_t *options = NULL;\r\n    int is_cname = 0;\r\n    int i;\r\n    char *invalid_name_list[] =\r\n    { \"a\", \"1\", \"!\", \"aa\", \"12\", \"a1\",\r\n        \"a!\", \"1!\", \"aAa\", \"1A1\", \"a!a\", \"FengChao@123\", \"-a123\", \"a_123\", \"a123-\",\r\n        \"1234567890123456789012345678901234567890123456789012345678901234\", \"\"\r\n    };\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n\r\n    for (i = 0; i < sizeof(invalid_name_list) / sizeof(invalid_name_list[0]); i++) {\r\n        aos_string_t bucket;\r\n        aos_status_t *s = NULL;\r\n        aos_table_t *resp_headers = NULL;\r\n        aos_table_t *headers = NULL;\r\n        aos_list_t part_list;\r\n        oss_upload_part_copy_params_t *copy_params = NULL;\r\n        aos_str_set(&bucket, invalid_name_list[i]);\r\n        headers = aos_table_make(p, 1);\r\n        aos_list_init(&part_list);\r\n\r\n        s = oss_init_multipart_upload(options, &bucket, NULL, NULL, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_abort_multipart_upload(options, &bucket, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_list_upload_part(options, &bucket, NULL, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_list_multipart_upload(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_complete_multipart_upload(options, &bucket, NULL, NULL, NULL, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_upload_part_from_buffer(options, &bucket, NULL, NULL, 1, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_upload_part_from_file(options, &bucket, NULL, NULL, 1, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        copy_params = oss_create_upload_part_copy_params(p);\r\n        aos_str_set(&copy_params->dest_bucket, invalid_name_list[i]);\r\n        s = oss_upload_part_copy(options, copy_params, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_sorted_uploaded_part(options, &bucket, NULL, NULL, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_upload_file(options, &bucket, NULL, NULL, NULL, 1000LL, headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n    }\r\n    aos_pool_destroy(p);\r\n\r\n    printf(\"test_multipart_invalid_parameter ok\\n\");\r\n}\r\n\nCuSuite *test_oss_multipart()\n{\n    CuSuite* suite = CuSuiteNew();\n\n    SUITE_ADD_TEST(suite, test_multipart_setup);\n    SUITE_ADD_TEST(suite, test_init_abort_multipart_upload);\n    SUITE_ADD_TEST(suite, test_list_multipart_upload);\n    SUITE_ADD_TEST(suite, test_multipart_upload);\n    SUITE_ADD_TEST(suite, test_multipart_upload_from_file);\n    SUITE_ADD_TEST(suite, test_upload_file);\n    SUITE_ADD_TEST(suite, test_upload_file_failed_without_uploadid);\n    SUITE_ADD_TEST(suite, test_upload_file_from_recover);\n    SUITE_ADD_TEST(suite, test_upload_file_from_recover_failed);\n    SUITE_ADD_TEST(suite, test_upload_part_copy);\n    SUITE_ADD_TEST(suite, test_upload_part_copy_with_special_char);\n    SUITE_ADD_TEST(suite, test_list_upload_part_with_empty);\n    SUITE_ADD_TEST(suite, test_oss_get_sorted_uploaded_part);\n    SUITE_ADD_TEST(suite, test_oss_get_sorted_uploaded_part_with_empty);\n    SUITE_ADD_TEST(suite, test_multipart_invalid_parameter);\n    SUITE_ADD_TEST(suite, test_multipart_cleanup);\n\n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_object.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n\nstatic char *TEST_BUCKET_NAME_2;\n\nvoid test_object_setup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n\n    TEST_BUCKET_NAME   = get_test_bucket_name(aos_global_pool, \"object\");\n    TEST_BUCKET_NAME_2 = get_test_bucket_name(aos_global_pool, \"object2\");\n    \n    /* create test bucket */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    s = create_test_bucket(options, TEST_BUCKET_NAME_2, oss_acl);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n}\n\nvoid test_object_cleanup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    char *object_name1 = \"oss_test_put_object.ts\";\n    char *object_name2 = \"oss_test_put_object_from_file.jpg\";\n    char *object_name3 = \"oss_test_object_by_url\";\n    char *object_name4 = \"oss_test_append_object\";\n    char *object_name5 = \"oss_test_append_object_from_file\";\n    char *object_name6 = \"oss_test_copy_object\";\n    char *object_name7 = \"video_1.ts\";\n    char *object_name8 = \"video_2.ts\";\n    char *object_name9 = \"oss_test_put_object_from_file2.txt\";\n    char *object_name10 = \"put_object_from_buffer_with_default_content_type\";\n\n    aos_table_t *resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    /* delete test object */\n    delete_test_object(options, TEST_BUCKET_NAME, object_name1);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name2);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name3);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name4);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name5);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name6);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name7);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name8);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name9);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name10);\n\n    /* delete test bucket */\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_delete_bucket(options, &bucket, &resp_headers);\n    apr_sleep(apr_time_from_sec(3));\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME_2);\n    oss_delete_bucket(options, &bucket, &resp_headers);\n    apr_sleep(apr_time_from_sec(3));\n\n    aos_pool_destroy(p);\n}\n\nvoid test_put_object_from_buffer(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_put_object.ts\";\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers = NULL;\n    aos_table_t *head_headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n    char *content_type = NULL;\n    oss_request_options_t *options = NULL;\n\n    /* test put object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-meta-author\", \"oss\");\n    s = create_test_object(options, TEST_BUCKET_NAME, object_name, str, headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n\n    aos_pool_destroy(p);\n\n    /* head object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, \n                        head_headers, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    \n    content_type = (char*)(apr_table_get(head_resp_headers, OSS_CONTENT_TYPE));\n    CuAssertStrEquals(tc, \"video/MP2T\", content_type);\n\n    printf(\"test_put_object_from_buffer ok\\n\");\n}\n\nvoid test_put_object_from_buffer_with_default_content_type(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"put_object_from_buffer_with_default_content_type\";\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers = NULL;\n    aos_table_t *head_headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n    char *content_type = NULL;\n    oss_request_options_t *options = NULL;\n\n    /* test put object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-meta-author\", \"oss\");\n    s = create_test_object(options, TEST_BUCKET_NAME, object_name, str, headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n\n    aos_pool_destroy(p);\n\n    /* head object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, \n                        head_headers, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    \n    content_type = (char*)(apr_table_get(head_resp_headers, OSS_CONTENT_TYPE));\n    CuAssertStrEquals(tc, \"application/octet-stream\", content_type);\n\n    printf(\"test_put_object_from_buffer_with_default_content_type ok\\n\");\n}\n\nvoid test_put_object_from_buffer_with_specified(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"./xxx/./ddd/\";\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers = NULL;\n    aos_table_t *head_headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n\n    /* test put object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-meta-author\", \"oss\");\n    s = create_test_object(options, TEST_BUCKET_NAME, object_name, str, headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n\n    aos_pool_destroy(p);\n\n    /* head object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, \n        head_headers, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n\n\tdelete_test_object(options, TEST_BUCKET_NAME, object_name);\n\n    printf(\"test_put_object_from_buffer_with_specified ok\\n\");\n}\n\nvoid test_put_object_from_file(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"video_1.ts\";\n    char *filename = __FILE__;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *head_headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n    char *content_type = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 5);\n    s = create_test_object_from_file(options, TEST_BUCKET_NAME, \n            object_name, filename, headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n\n    aos_pool_destroy(p);\n\n    /* head object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, \n                        head_headers, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    \n    content_type = (char*)(apr_table_get(head_resp_headers, OSS_CONTENT_TYPE));\n    CuAssertStrEquals(tc, \"application/octet-stream\", content_type);\n\n    aos_pool_destroy(p);\n\n    //NG Test\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 5);\n\n    s = create_test_object_from_file(options, \"c-sdk-no-exist\",\n        object_name, filename, headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    s = create_test_object_from_file(options, TEST_BUCKET_NAME,\n        object_name, \"\", headers);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_put_object_from_file ok\\n\");\n}\n\nvoid test_put_object_with_large_length_header(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"video_2.ts\";\n    char *filename = __FILE__;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    int i = 0;\n    int header_length = 0;\n    aos_table_t *headers = NULL;\n    char *user_meta = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    header_length = 1024 * 5;\n    user_meta = (char*)calloc(header_length, 1);\n    for (; i < header_length - 1; i++) {\n        user_meta[i] = 'a';\n    }\n    user_meta[header_length - 1] = '\\0';\n    headers = aos_table_make(p, 2);\n    apr_table_set(headers, \"x-oss-meta-user-meta\", user_meta);\n    s = create_test_object_from_file(options, TEST_BUCKET_NAME, \n            object_name, filename, headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n\n    free(user_meta);\n    aos_pool_destroy(p);\n\n    printf(\"test_put_object_with_large_length_header_back_bound ok\\n\");\n}\n\nvoid test_put_object_from_file_with_content_type(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_put_object_from_file2.txt\";\n    char *filename = __FILE__;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *head_headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n    char *content_type = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(options->pool, 1);\n    apr_table_set(headers, OSS_CONTENT_TYPE, \"image/jpeg\");\n\n    s = create_test_object_from_file(options, TEST_BUCKET_NAME, \n            object_name, filename, headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n\n    aos_pool_destroy(p);\n\n    /* head object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, \n                        head_headers, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    \n    content_type = (char*)(apr_table_get(head_resp_headers, OSS_CONTENT_TYPE));\n    CuAssertStrEquals(tc, \"image/jpeg\", content_type);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_put_object_from_file ok\\n\");\n}\n\nvoid test_put_symlink_for_obj(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss.jpg\";\n    char *link_object_name = \"link-to-oss.jpg\";\n    char *filename = __FILE__;\n    aos_string_t bucket;\n    aos_string_t sym_object;\n    aos_string_t target_object;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(options->pool, 1);\n    apr_table_set(headers, OSS_CONTENT_TYPE, \"image/jpeg\");\n    s = create_test_object_from_file(options, TEST_BUCKET_NAME, \n            object_name, filename, headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n    aos_pool_destroy(p);\n\n    /* link object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&sym_object, link_object_name);\n    aos_str_set(&target_object, object_name);\n    init_test_request_options(options, is_cname);\n    s = oss_put_symlink(options, &bucket, &sym_object, \n                        &target_object, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    aos_pool_destroy(p);\n    \n    printf(\"test_put_object_link ok\\n\");\n}\n\nvoid test_get_symlink_for_obj(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *link_object_name = \"link-to-oss.jpg\";\n    char *target_link_name = NULL;\n    aos_string_t bucket;\n    aos_string_t link_object;\n    aos_string_t object;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *head_resp_headers = NULL;\n\n    /*get target link object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&link_object, link_object_name);\n    init_test_request_options(options, is_cname);\n    s = oss_get_symlink(options, &bucket, &link_object, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    \n    target_link_name = (char*)(apr_table_get(head_resp_headers, OSS_CANNONICALIZED_HEADER_SYMLINK));\n    CuAssertStrEquals(tc, \"oss.jpg\", target_link_name);\n    TEST_CASE_LOG(\"link_obj_name %s\\n\", target_link_name);\n\n    aos_pool_destroy(p);\n\n    aos_pool_create(&p, NULL);\n    target_link_name = NULL;\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&link_object, \"testasfadf\");\n    init_test_request_options(options, is_cname);\n    s = oss_get_symlink(options, &bucket, &link_object, &head_resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n\n    /* delete object */\n    aos_str_set(&object, \"oss.jpg\");\n    s = oss_delete_object(options, &bucket, &object, &head_resp_headers);\n    CuAssertIntEquals(tc, 204, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n\n    /* delete link object */\n    aos_str_set(&object, \"link-to-oss.jpg\");\n    s = oss_delete_object(options, &bucket, &object, &head_resp_headers);\n    CuAssertIntEquals(tc, 204, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_restore_obj(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n    char *object_name1 = \"oss_test_object1\";\n    char *str = \"test c oss sdk\";\n    aos_table_t *headers1 = NULL;\n    aos_list_t buffer;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_bucket_info_t bucket_info;\n    char IA_BUCKET_NAME[128] = {0};\n    apr_snprintf(IA_BUCKET_NAME, 127, \"%s-ia\", TEST_BUCKET_NAME);\n\n    //setup: create archive bucket\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, IA_BUCKET_NAME);\n\n    s = create_test_bucket_with_storage_class(options, bucket.data, \n                                            oss_acl, OSS_STORAGE_CLASS_ARCHIVE);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n\n    //get bucket info\n    s = oss_get_bucket_info(options, &bucket, &bucket_info, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertStrEquals(tc, bucket_info.storage_class.data, \"Archive\");\n\n    //create test object\n    headers1 = aos_table_make(p, 0);\n    s = create_test_object(options, bucket.data, object_name1, str, headers1);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n\n    aos_str_set(&object, object_name1);\n    aos_list_init(&buffer);\n    headers1 = NULL;\n    /* test get object to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers1,\n            params, &buffer, &resp_headers);\n    /* expect fail because it's archive bucket */\n    TEST_CASE_LOG(\"errcode[%d] %s %s\\n\", s->code, s->error_msg, s->error_code);\n    CuAssertIntEquals(tc, -978, s->code);\n\n    TEST_CASE_LOG(\"restore object begin.\\n\");\n    headers1 = aos_table_make(p, 0);\n    s = oss_restore_object(options, &bucket, &object, headers1, &resp_headers);\n    CuAssertIntEquals(tc, 202, s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n\n    do {\n        headers1 = aos_table_make(p, 0);\n        s = oss_restore_object(options, &bucket, &object, headers1, &resp_headers);\n        if (s->code != 409) {\n            break;\n        } else {\n            apr_sleep(5000);\n        }\n    } while (1);\n    TEST_CASE_LOG(\"\\nrestore object done.\\n\");\n\n    CuAssertIntEquals(tc, 200,  s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n\n    // restore the object \n    aos_list_init(&buffer);\n    headers1 = NULL;\n    /* test get object to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers1,\n            params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, 200,  s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n\n    // restore the object again to verify the data no need thaw \n    aos_list_init(&buffer);\n    headers1 = NULL;\n    /* test get object to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers1,\n            params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, 200,  s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n\n    //cleanup: delete archive bucket \n    delete_test_object(options, bucket.data, object_name1);\n    s = oss_delete_bucket(options, &bucket, &resp_headers);\n    TEST_CASE_LOG(\"errcode[%d] %s %s\\n\", s->code, s->error_msg, s->error_code);\n    CuAssertIntEquals(tc, 204, s->code);\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_restore_object_with_tier(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n    char *object_name1 = \"oss_test_object1\";\n    char *str = \"test c oss sdk\";\n    aos_table_t *headers1 = NULL;\n    aos_list_t buffer;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_bucket_info_t bucket_info;\n    oss_list_object_params_t *lo_params = NULL;\n    oss_list_object_content_t *content = NULL;\n\n    char IA_BUCKET_NAME[128] = { 0 };\n    apr_snprintf(IA_BUCKET_NAME, 127, \"%s-code-archive\", TEST_BUCKET_NAME);\n\n    //setup: create archive bucket\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, IA_BUCKET_NAME);\n    //aos_str_set(&options->config->endpoint, \"http://oss-ap-southeast-2.aliyuncs.com\");\n    \n\n    s = create_test_bucket_with_storage_class(options, bucket.data,\n        oss_acl, OSS_STORAGE_CLASS_COLD_ARCHIVE);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n\n    //get bucket info\n    s = oss_get_bucket_info(options, &bucket, &bucket_info, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertStrEquals(tc, bucket_info.storage_class.data, \"ColdArchive\");\n\n    //create test object\n    headers1 = aos_table_make(p, 0);\n    s = create_test_object(options, bucket.data, object_name1, str, headers1);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n\n    //list object\n    lo_params = oss_create_list_object_params(p);\n    s = oss_list_object(options, &bucket, lo_params, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 0, lo_params->truncated);\n\n    aos_list_for_each_entry(oss_list_object_content_t, content, &lo_params->object_list, node) {\n        CuAssertStrEquals(tc, \"ColdArchive\", content->storage_class.data);\n        CuAssertStrEquals(tc, \"Normal\", content->type.data);\n    }\n\n    aos_str_set(&object, object_name1);\n    aos_list_init(&buffer);\n    headers1 = NULL;\n    /* test get object to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers1,\n        params, &buffer, &resp_headers);\n    /* expect fail because it's archive bucket */\n    TEST_CASE_LOG(\"errcode[%d] %s %s\\n\", s->code, s->error_msg, s->error_code);\n    CuAssertIntEquals(tc, -978, s->code);\n\n    TEST_CASE_LOG(\"restore object begin.\\n\");\n    headers1 = aos_table_make(p, 0);\n    s = oss_restore_object_with_tier(options, &bucket, &object, OSS_TIER_STANDARD, 2, headers1, &resp_headers);\n    CuAssertIntEquals(tc, 202, s->code);\n    CuAssertStrEquals(tc, NULL, s->error_code);\n\n    headers1 = aos_table_make(p, 0);\n    s = oss_restore_object_with_tier(options, &bucket, &object, OSS_TIER_STANDARD, 2, headers1, &resp_headers);\n    CuAssertIntEquals(tc, 409, s->code);\n    CuAssertStrEquals(tc, \"RestoreAlreadyInProgress\", s->error_code);\n\n    //cleanup: delete code-archive bucket \n    delete_test_object(options, bucket.data, object_name1);\n    s = oss_delete_bucket(options, &bucket, &resp_headers);\n    TEST_CASE_LOG(\"errcode[%d] %s %s\\n\", s->code, s->error_msg, s->error_code);\n    CuAssertIntEquals(tc, 204, s->code);\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_get_object_to_buffer(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_put_object.ts\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    aos_buf_t *content = NULL;\n    char *expect_content = \"test oss c sdk\";\n    char *buf = NULL;\n    int64_t len = 0;\n    int64_t size = 0;\n    int64_t pos = 0;\n    char *content_type = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&buffer);\n\n    /* test get object to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers, \n                                 params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    /* get buffer len */\n    len = aos_buf_list_len(&buffer);\n\n    buf = aos_pcalloc(p, (apr_size_t)(len + 1));\n    buf[len] = '\\0';\n\n    /* copy buffer content to memory */\n    aos_list_for_each_entry(aos_buf_t, content, &buffer, node) {\n        size = aos_buf_size(content);\n        memcpy(buf + pos, content->pos, (size_t)size);\n        pos += size;\n    }\n\n    CuAssertStrEquals(tc, expect_content, buf);\n    content_type = (char*)(apr_table_get(resp_headers, OSS_CONTENT_TYPE));\n    CuAssertStrEquals(tc, \"video/MP2T\", content_type);\n    aos_pool_destroy(p);\n\n    printf(\"test_get_object_to_buffer ok\\n\");\n}\n\nvoid test_get_object_to_buffer_with_range(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_put_object.ts\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    aos_buf_t *content = NULL;\n    char *expect_content = \"oss c sdk\";\n    char *buf = NULL;\n    int64_t len = 0;\n    int64_t size = 0;\n    int64_t pos = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"Range\", \" bytes=5-13\");\n    aos_list_init(&buffer);\n\n    /* test get object to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers, \n                                 params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, 206, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    /* get buffer len */\n    len = aos_buf_list_len(&buffer);\n\n    buf = aos_pcalloc(p, (apr_size_t)(len + 1));\n    buf[len] = '\\0';\n\n    /* copy buffer content to memory */\n    aos_list_for_each_entry(aos_buf_t, content, &buffer, node) {\n        size = aos_buf_size(content);\n        memcpy(buf + pos, content->pos, (size_t)size);\n        pos += size;\n    }\n\n    CuAssertStrEquals(tc, expect_content, buf);\n    aos_pool_destroy(p);\n\n    printf(\"test_get_object_to_buffer_with_range ok\\n\");\n}\n\nvoid test_get_object_to_file(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_put_object_from_file2.txt\";\n    aos_string_t object;\n    char *filename = \"oss_test_get_object_to_file\";\n    char *source_filename = __FILE__;\n    aos_string_t file;\n    oss_request_options_t *options = NULL; \n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    char *content_type = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&file, filename);\n\n    /* test get object to file */\n    s = oss_get_object_to_file(options, &bucket, &object, headers, \n                               params, &file, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, get_file_size(source_filename), get_file_size(filename));\n    content_type = (char*)(apr_table_get(resp_headers, OSS_CONTENT_TYPE));\n    CuAssertStrEquals(tc, \"image/jpeg\", content_type);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_get_object_to_file(options, &bucket, &object, headers,\n        params, &file, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&file, \"g:/invalid-path\");\n    s = oss_get_object_to_file(options, &bucket, &object, headers,\n        params, &file, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s->code);\n\n    remove(filename);\n    aos_pool_destroy(p);\n\n    printf(\"test_get_object_to_file ok\\n\");\n}\n\nvoid test_head_object_with_not_exist(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    char *object_name = \"not_exist.object\";\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    headers = aos_table_make(p, 0);\n\n    /* test head object */\n    s = oss_head_object(options, &bucket, &object, headers, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n    CuAssertStrEquals(tc, \"UnknownError\", s->error_code);\n    CuAssertTrue(tc, NULL == s->error_msg);\n    CuAssertTrue(tc, 0 != strlen(s->req_id));\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_head_object ok\\n\");\n}\n\nvoid test_head_object(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    char *object_name = \"oss_test_put_object.ts\";\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    char *user_meta = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    headers = aos_table_make(p, 0);\n\n    /* test head object */\n    s = oss_head_object(options, &bucket, &object, headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    \n    user_meta = (char*)(apr_table_get(resp_headers, \"x-oss-meta-author\"));\n    CuAssertStrEquals(tc, \"oss\", user_meta);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_head_object ok\\n\");\n}\n\nvoid test_get_object_meta_not_exist(CuTest *tc){\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    char *object_name = \"not_exist.object\";\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    s = oss_get_object_meta(options, &bucket, &object, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n    CuAssertStrEquals(tc, \"UnknownError\", s->error_code);\n    CuAssertTrue(tc, NULL == s->error_msg);\n    CuAssertTrue(tc, 0 != strlen(s->req_id));\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_head_object ok\\n\");\n}\n\nvoid test_get_object_meta(CuTest *tc){\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    char *object_name = \"oss_test_put_object.ts\";\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    \n    s = oss_get_object_meta(options, &bucket, &object, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_get_object_meta ok\\n\");\n}\n\nvoid test_get_object_acl_not_exist(CuTest *tc){\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    char *object_name = \"not_exist.object\";\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_string_t oss_acl_str;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    \n    s = oss_get_object_acl(options, &bucket, &object, &oss_acl_str, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n    CuAssertStrEquals(tc, \"NoSuchKey\", s->error_code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    \n    aos_pool_destroy(p);\n\n    printf(\"test_get_object_acl_not_exist ok\\n\");\n}\n\nvoid test_get_object_acl_object_empty(CuTest *tc){\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    char *object_name = \"\";\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_string_t oss_acl_str;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    \n    s = oss_get_object_acl(options, &bucket, &object, &oss_acl_str, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\n    CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\n    \n    aos_pool_destroy(p);\n\n    printf(\"test_get_object_acl_object_empty ok\\n\");\n}\n\nvoid test_get_object_acl_object_null(CuTest *tc){\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_string_t oss_acl_str;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    \n    s = oss_get_object_acl(options, &bucket, NULL, &oss_acl_str, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\n    CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_get_object_acl_object_null ok\\n\");\n}\n\nvoid test_get_object_acl(CuTest *tc){\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    char *object_name = \"oss_test_put_object.ts\";\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_string_t oss_acl_str;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    \n    s = oss_get_object_acl(options, &bucket, &object, &oss_acl_str, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    \n    aos_pool_destroy(p);\n\n    printf(\"test_get_object_acl ok\\n\");\n}\n\nvoid test_put_object_acl_invalid_acl(CuTest *tc){\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    char *object_name = \"oss_test_put_object.ts\";\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_acl_e oss_acl_invalid = (oss_acl_e)(OSS_ACL_DEFAULT + 1);\n    \n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    s = oss_put_object_acl(options, &bucket, &object, oss_acl_invalid, &resp_headers);\n    CuAssertIntEquals(tc, 400, s->code);\n    CuAssertStrEquals(tc, \"MissingArgument\", s->error_code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    \n    aos_pool_destroy(p);\n    \n    printf(\"test_put_object_acl_invalid_acl ok\\n\");\n}\n\nvoid test_put_object_acl_object_empty(CuTest *tc){\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    char *object_name = \"\";\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_acl_e oss_acl = OSS_ACL_DEFAULT;\n    \n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    s = oss_put_object_acl(options, &bucket, &object, oss_acl, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\n    CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\n    \n    aos_pool_destroy(p);\n    \n    printf(\"test_put_object_acl_object_empty ok\\n\");\n}\n\nvoid test_put_object_acl_object_null(CuTest *tc){\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_acl_e oss_acl = OSS_ACL_DEFAULT;\n    \n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n\n    s = oss_put_object_acl(options, &bucket, NULL, oss_acl, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\n    CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\n    \n    aos_pool_destroy(p);\n    \n    printf(\"test_put_object_acl_object_null ok\\n\");\n}\n\nvoid test_put_object_acl(CuTest *tc){\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    char *object_name = \"oss_test_put_object.ts\";\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n    \n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    s = oss_put_object_acl(options, &bucket, &object, oss_acl, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    \n    aos_pool_destroy(p);\n    \n    printf(\"test_put_object_acl ok\\n\");\n}\n\nvoid test_delete_object(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_put_object\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n \n    /* test delete object */\n    s = oss_delete_object(options, &bucket, &object, &resp_headers);\n    CuAssertIntEquals(tc, 204, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_delete_object ok\\n\");\n}\n\nvoid test_copy_object(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t source_bucket;\n    char *source_object_name = \"oss_test_put_object.ts\";\n    aos_string_t source_object;\n    aos_string_t dest_bucket;\n    char *dest_object_name = \"oss_test_copy_object\";\n    aos_string_t dest_object;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_table_t *head_headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&source_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&source_object, source_object_name);\n    aos_str_set(&dest_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&dest_object, dest_object_name);\n    headers = aos_table_make(p, 5);\n\n    /* test copy object */\n    s = oss_copy_object(options, &source_bucket, &source_object, \n                        &dest_bucket, &dest_object, headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n    apr_sleep(apr_time_from_sec(1));\n\n    /* head object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &dest_bucket, &dest_object,\n                        head_headers, &head_resp_headers);\n\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_copy_object ok\\n\");\n}\n\nvoid test_copy_object_with_source_url_encode(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t source_bucket;\n    char *source_object_name = \"y9n/g/%E9%98%B4%E9%98%B3%E5%B8%88-%E9%A3%9F%E6%A2%A6%E8%B2%98.ts\";\n    char *filename = __FILE__;\n    aos_string_t source_object;\n    aos_string_t dest_bucket;\n    char *dest_object_name = \"oss_test_copy_object\";\n    aos_string_t dest_object;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_table_t *head_headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&source_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&source_object, source_object_name);\n    aos_str_set(&dest_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&dest_object, dest_object_name);\n\n    /* put object */\n    s = create_test_object_from_file(options, TEST_BUCKET_NAME, \n        source_object_name, filename, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    /* test copy object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    s = oss_copy_object(options, &source_bucket, &source_object, \n        &dest_bucket, &dest_object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n    apr_sleep(apr_time_from_sec(1));\n\n    /* head object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &dest_bucket, &dest_object,\n        head_headers, &head_resp_headers);\n\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n\n    /* delete object */\n    s = oss_delete_object(options, &source_bucket, &source_object, &resp_headers);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    s = oss_delete_object(options, &dest_bucket, &dest_object, &resp_headers);\n    CuAssertIntEquals(tc, 204, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_copy_object_with_source_url_encode ok\\n\");\n}\n\nvoid test_copy_object_negative(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t source_bucket;\n    char *source_object_name = NULL;\n    aos_string_t source_object;\n    aos_string_t dest_bucket;\n    char *dest_object_name = \"oss_test_copy_object\";\n    aos_string_t dest_object;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n\n    char buffer[AOS_MAX_QUERY_ARG_LEN+1];\n    memset(buffer, 'A', AOS_MAX_QUERY_ARG_LEN);\n    buffer[AOS_MAX_QUERY_ARG_LEN] = '\\0';\n    source_object_name = buffer;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&source_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&source_object, source_object_name);\n    aos_str_set(&dest_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&dest_object, dest_object_name);\n\n    /* test copy object */\n    s = oss_copy_object(options, &source_bucket, &source_object, \n        &dest_bucket, &dest_object, NULL, NULL);\n    CuAssertIntEquals(tc, 400, s->code);\n    CuAssertStrEquals(tc, \"InvalidObjectName\", s->error_code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_copy_object_negative ok\\n\");\n}\n\nvoid test_object_by_url(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_http_request_t *req = NULL;\n    aos_list_t buffer;\n    aos_status_t *s = NULL;\n    aos_string_t url;\n    apr_time_t now;\n    int two_minute = 120;\n    int is_cname = 0;\n    char *object_name = \"oss_test_object_by_url/123\";\n    aos_string_t bucket;\n    aos_string_t object;\n    char *str = \"test oss c sdk for object url api\";\n    char *filename = __FILE__;\n    char *filename_download = \"oss_test_object_by_url\";\n    aos_string_t file;\n    int64_t effective_time;\n    char *url_str = NULL;\n    aos_buf_t *content = NULL;\n    char special_query[AOS_MAX_QUERY_ARG_LEN + 1];\n\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    req = aos_http_request_create(p);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&file, filename);\n    aos_list_init(&buffer);\n\n    now = apr_time_now();\n    effective_time = now / 1000000 + two_minute;\n\n    /* test effective url for put_object_from_buffer */\n    req = aos_http_request_create(p);\n    headers = aos_table_make(p, 0);\n    req->method = HTTP_PUT;\n    url_str = gen_test_signed_url(options, TEST_BUCKET_NAME, \n                                  object_name, effective_time, req);\n    aos_str_set(&url, url_str);\n    aos_list_init(&buffer);\n    content = aos_buf_pack(p, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n    s = oss_put_object_from_buffer_by_url(options, &url, \n            &buffer, headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    CuAssertPtrNotNull(tc, strstr(url_str, \"oss_test_object_by_url%2F123\"));\n    CuAssertPtrEquals(tc, strstr(url_str, \"oss_test_object_by_url/123\"), NULL);\n    CuAssertIntEquals(tc, req->normalize_url, 0);\n\n    /* test effective url for put_object_from_file */\n    resp_headers = NULL;\n    s = oss_put_object_from_file_by_url(options, &url, &file, \n            headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    /* test effective url for get_object_to_buffer */\n    req = aos_http_request_create(p);\n    headers = aos_table_make(p, 0);\n    req->method = HTTP_GET;\n    req->normalize_url = 1;\n    url_str = gen_test_signed_url(options, TEST_BUCKET_NAME, \n                                  object_name, effective_time, req);\n    aos_str_set(&url, url_str);\n    s = oss_get_object_to_buffer_by_url(options, &url, headers, params,\n            &buffer, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, strstr(url_str, \"oss_test_object_by_url/123\"));\n    CuAssertPtrEquals(tc, strstr(url_str, \"oss_test_object_by_url%2F123\"), NULL);\n\n    /* test effective url for get_object_to_file */\n    resp_headers = NULL;\n    aos_str_set(&file, filename_download);\n    s = oss_get_object_to_file_by_url(options, &url, headers, \n            headers, &file, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, get_file_size(filename), get_file_size(filename_download));\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    /* test effective url for head_object */\n    req = aos_http_request_create(p);\n    headers = aos_table_make(p, 0);\n    resp_headers = NULL;\n    req->method = HTTP_HEAD;\n    url_str = gen_test_signed_url(options, TEST_BUCKET_NAME, \n                                  object_name, effective_time, req);\n    aos_str_set(&url, url_str);\n    s = oss_head_object_by_url(options, &url, headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    /* test invalid-bucketname url for put_object_from_file */\n    req = aos_http_request_create(p);\n    headers = aos_table_make(p, 0);\n    req->method = HTTP_PUT;\n    url_str = gen_test_signed_url(options, \"InvalidBucketName\",\n        object_name, effective_time, req);\n    resp_headers = NULL;\n    s = oss_put_object_from_file_by_url(options, &url, &file,\n        headers, &resp_headers);\n    CuAssertIntEquals(tc, 403, s->code);\n\n    /* test invalid filepath url for put_object_from_file */\n    req = aos_http_request_create(p);\n    headers = aos_table_make(p, 0);\n    req->method = HTTP_PUT;\n    url_str = gen_test_signed_url(options, TEST_BUCKET_NAME,\n        object_name, effective_time, req);\n    resp_headers = NULL;\n    aos_str_set(&file, \"g:/invalid-path\");\n    s = oss_put_object_from_file_by_url(options, &url, &file,\n        headers, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s->code);\n\n\n    /* test invalid-bucketname url for get_object_from_file */\n    req = aos_http_request_create(p);\n    headers = aos_table_make(p, 0);\n    req->method = HTTP_GET;\n    url_str = gen_test_signed_url(options, \"InvalidBucketName\",\n        object_name, effective_time, req);\n    resp_headers = NULL;\n    aos_str_set(&file, filename_download);\n    s = oss_get_object_to_file_by_url(options, &url, headers,\n        headers, &file, &resp_headers);\n    CuAssertIntEquals(tc, 403, s->code);\n\n    /* test invalid filepath url for get_object_from_file */\n    req = aos_http_request_create(p);\n    headers = aos_table_make(p, 0);\n    req->method = HTTP_GET;\n    url_str = gen_test_signed_url(options, TEST_BUCKET_NAME,\n        object_name, effective_time, req);\n    resp_headers = NULL;\n    aos_str_set(&file, \"g:/invalid-path\");\n    s = oss_get_object_to_file_by_url(options, &url, headers,\n        headers, &file, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s->code);\n\n    /* test long query url fail*/\n    req = aos_http_request_create(p);\n    headers = aos_table_make(p, 0);\n    memset(special_query, 0x30, AOS_MAX_QUERY_ARG_LEN);\n    special_query[AOS_MAX_QUERY_ARG_LEN] = '\\0';\n    req->method = HTTP_GET;\n    apr_table_set(req->query_params, \"x-oss-process\", special_query);\n    url_str = gen_test_signed_url(options, TEST_BUCKET_NAME,\n        object_name, effective_time, req);\n    CuAssertTrue(tc, url_str == NULL);\n\n    remove(filename_download);\n    aos_pool_destroy(p);\n\n    printf(\"test_object_by_url ok\\n\");\n}\n\nvoid test_append_object_from_buffer(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_append_object\";\n    aos_string_t bucket;\n    aos_string_t object;\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    int64_t position = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *headers1 = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_list_t buffer;\n    aos_buf_t *content = NULL;\n    char *next_append_position = NULL;\n\n    /* test append object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    s = oss_head_object(options, &bucket, &object, headers, &resp_headers);\n    if (s->code == 200) {\n        next_append_position = (char*)(apr_table_get(resp_headers, \n                        \"x-oss-next-append-position\"));\n        position = atoi(next_append_position);\n    }\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    /* append object */\n    resp_headers = NULL;\n    headers1 = aos_table_make(p, 0);\n    aos_list_init(&buffer);\n    content = aos_buf_pack(p, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    s = oss_append_object_from_buffer(options, &bucket, &object, \n            position, &buffer, headers1, &resp_headers);\n\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_append_object_from_buffer ok\\n\");\n}\n\nvoid test_append_object_from_file(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_append_object_from_file\";\n    aos_string_t bucket;\n    aos_string_t object;\n    char *filename = __FILE__;\n    aos_string_t append_file;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    int64_t position = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n\n    /* test append object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&append_file, filename);\n\n    s = oss_append_object_from_file(options, &bucket, &object, position, \n                                    &append_file, headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_append_object_from_file(options, &bucket, &object, position,\n        &append_file, headers, &resp_headers);\n    CuAssertIntEquals(tc, 400, s->code);\n    printf(\"msg:%s\\n\", s->error_msg);\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&append_file, \"\");\n    s = oss_append_object_from_file(options, &bucket, &object, position,\n        &append_file, headers, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_append_object_from_file ok\\n\");\n}\n\nvoid test_do_append_object_from_file(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_do_append_object_from_file\";\n    aos_string_t bucket;\n    aos_string_t object;\n    char *filename = __FILE__;\n    aos_string_t append_file;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    int64_t position = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_list_t resp_body;\n\n    /* test append object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&append_file, filename);\n\n    s = oss_do_append_object_from_file(options, &bucket, &object, position,\n        0, &append_file, headers, NULL, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //negative case\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    s = oss_do_append_object_from_file(options, &bucket, &object, position,\n        0, &append_file, headers, NULL, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 400, s->code);\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&append_file, \"\");\n    s = oss_do_append_object_from_file(options, &bucket, &object, position,\n        0, &append_file, headers, NULL, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_do_append_object_from_file ok\\n\");\n}\n\nvoid test_get_not_exist_object_to_file(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_put_object_from_file_not_exist_.txt\";\n    aos_string_t object;\n    char *filename = \"oss_test_get_object_to_file_not_exist\";\n    aos_string_t file;\n    oss_request_options_t *options = NULL; \n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&file, filename);\n\n    /* test get object to file */\n    s = oss_get_object_to_file(options, &bucket, &object, headers, \n        params, &file, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n    CuAssertIntEquals(tc, -1, get_file_size(filename));\n\n    aos_pool_destroy(p);\n\n    printf(\"test_get_not_exist_object_to_file ok\\n\");\n}\n\nvoid test_put_object_from_buffer_with_invalid_endpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_put_object_invalid_endpoint.ts\";\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    oss_request_options_t *options = NULL;\n\n    /* test put object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&options->config->endpoint, \"192.168.1.1\");\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-meta-author\", \"oss\");\n    s = create_test_object(options, TEST_BUCKET_NAME, object_name, str, headers);\n    CuAssertIntEquals(tc, AOSE_CONNECTION_FAILED, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_put_object_from_buffer_with_invalid_endpoint ok\\n\");\n}\n\nvoid test_object_invalid_parameter(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    oss_request_options_t *options = NULL;\r\n    int is_cname = 0;\r\n    int i;\r\n    char *invalid_name_list[] =\r\n    { \"a\", \"1\", \"!\", \"aa\", \"12\", \"a1\",\r\n        \"a!\", \"1!\", \"aAa\", \"1A1\", \"a!a\", \"FengChao@123\", \"-a123\", \"a_123\", \"a123-\",\r\n        \"1234567890123456789012345678901234567890123456789012345678901234\", \"\",\r\n        NULL,\r\n    };\r\n\r\n    char* invalid_object_name_list[] =\r\n    {\r\n        \"\", NULL,\r\n    };\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n\r\n    for (i = 0; i < sizeof(invalid_name_list) / sizeof(invalid_name_list[0]); i++) {\r\n        aos_string_t bucket;\r\n        aos_status_t *s = NULL;\r\n        aos_table_t *resp_headers = NULL;\r\n        aos_table_t *headers = NULL;\r\n        aos_table_t *params = NULL;\r\n        char* url = NULL;\r\n\r\n        if (invalid_name_list[i] == NULL) {\r\n            aos_str_null(&bucket);\r\n        }\r\n        else {\r\n            aos_str_set(&bucket, invalid_name_list[i]);\r\n        }\r\n\r\n        headers = aos_table_make(p, 1);\r\n\r\n        s = oss_put_object_from_buffer(options, &bucket, NULL, NULL, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_object_from_file(options, &bucket, NULL, NULL, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_object_to_buffer(options, &bucket, NULL, headers, params, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_restore_object(options, &bucket, NULL, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_object_to_file(options, &bucket, NULL, headers, params, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_head_object(options, &bucket, NULL, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_object_meta(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_object_acl(options, &bucket, NULL, OSS_ACL_DEFAULT, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_object_acl(options, &bucket, NULL, OSS_ACL_DEFAULT, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_symlink(options, &bucket, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_symlink(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_delete_object(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_copy_object(options, NULL, NULL, &bucket, NULL, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_append_object_from_buffer(options, &bucket, NULL, 1024LL, NULL, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_do_append_object_from_buffer(options, &bucket, NULL, 1024LL, 0, NULL, NULL, NULL, NULL, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_append_object_from_file(options, &bucket, NULL, 1024LL, NULL, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_do_append_object_from_file(options, &bucket, NULL, 1024LL, 0, NULL, NULL, NULL, NULL, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_do_select_object_to_buffer(options, &bucket, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_do_select_object_to_file(options, &bucket, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_create_select_object_meta(options, &bucket, NULL, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_object_tagging(options, &bucket, NULL, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_object_tagging(options, &bucket, NULL, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_delete_object_tagging(options, &bucket, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        url = oss_gen_signed_url(options, &bucket, NULL, 3600, NULL);\r\n        CuAssertPtrEquals(tc, NULL, url);\r\n    }\r\n\r\n\r\n    for (i = 0; i < sizeof(invalid_object_name_list) / sizeof(invalid_object_name_list[0]); i++) {\r\n        aos_string_t bucket;\r\n        aos_string_t object;\r\n        aos_status_t* s = NULL;\r\n        aos_table_t* resp_headers = NULL;\r\n        aos_table_t* headers = NULL;\r\n        aos_table_t* params = NULL;\r\n        char* url = NULL;\r\n        aos_str_set(&bucket, \"bucket\");\r\n        if (invalid_object_name_list[i] != NULL) {\r\n            aos_str_set(&object, invalid_object_name_list[i]);\r\n        }\r\n        else {\r\n            aos_str_null(&object);\r\n        }\r\n        headers = aos_table_make(p, 1);\r\n\r\n        s = oss_put_object_from_buffer(options, &bucket, &object, NULL, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_object_from_file(options, &bucket, &object, NULL, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_object_to_buffer(options, &bucket, &object, headers, params, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_restore_object(options, &bucket, &object, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_object_to_file(options, &bucket, &object, headers, params, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_head_object(options, &bucket, &object, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_object_meta(options, &bucket, &object, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_object_acl(options, &bucket, &object, OSS_ACL_DEFAULT, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_object_acl(options, &bucket, &object, OSS_ACL_DEFAULT, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_symlink(options, &bucket, &object, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_symlink(options, &bucket, &object, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_delete_object(options, &bucket, &object, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_copy_object(options, NULL, NULL, &bucket, &object, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_append_object_from_buffer(options, &bucket, &object, 1024LL, NULL, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_do_append_object_from_buffer(options, &bucket, &object, 1024LL, 0, NULL, NULL, NULL, NULL, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_append_object_from_file(options, &bucket, &object, 1024LL, NULL, headers, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_do_append_object_from_file(options, &bucket, &object, 1024LL, 0, NULL, NULL, NULL, NULL, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_do_select_object_to_buffer(options, &bucket, &object, NULL, NULL, NULL, NULL, NULL, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_do_select_object_to_file(options, &bucket, &object, NULL, NULL, NULL, NULL, NULL, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_create_select_object_meta(options, &bucket, &object, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_put_object_tagging(options, &bucket, &object, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_object_tagging(options, &bucket, &object, NULL, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_delete_object_tagging(options, &bucket, &object, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_OBJECT_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        url = oss_gen_signed_url(options, &bucket, &object, 3600, NULL);\r\n        CuAssertPtrEquals(tc, NULL, url);\r\n    }\r\n\r\n\r\n    aos_pool_destroy(p);\r\n\r\n    printf(\"test_object_invalid_parameter ok\\n\");\r\n}\r\n\nvoid test_get_object_to_buffer_with_maxbuffersize(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"video_1.ts\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    options->ctl->options = aos_http_request_options_create(options->pool);\n    options->ctl->options->max_memory_size = 4;\n    options->ctl->options->enable_crc = AOS_FALSE;\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&buffer);\n\n    /* test get object to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers, \n                                 params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_OVER_MEMORY, s->code);\n\n\n    options->ctl->options->enable_crc = AOS_TRUE;\n    /* test get object to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers, \n                                 params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_CRC_INCONSISTENT_ERROR, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_get_object_to_buffer_with_maxbuffersize ok\\n\");\n\n}\n\nvoid test_get_object_to_buffer_use_invalid_sts(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"video_1.ts\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&options->config->sts_token, \"invalid-sts\");\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&buffer);\n\n    /* test get object to buffer */\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers, \n                                 params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, 403, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_get_object_to_buffer_use_invalid_sts ok\\n\");\n\n}\n\nvoid test_object_with_invalid_endpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"video_1.ts\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    char endpoint_buf[256];\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&buffer);\n\n    aos_str_set(&options->config->endpoint, \"www.test.com\\\\www.aliyuncs.com\");\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers,\n        params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\n    CuAssertStrEquals(tc, AOS_CLIENT_ERROR_CODE, s->error_code);\n    CuAssertStrEquals(tc, \"The endpoint is invalid.\", s->error_msg);\n\n    aos_str_set(&options->config->endpoint, \"test:pw@www.test.com*www.aliyuncs.com:80\");\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers,\n        params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\n    CuAssertStrEquals(tc, AOS_CLIENT_ERROR_CODE, s->error_code);\n    CuAssertStrEquals(tc, \"The endpoint is invalid.\", s->error_msg);\n\n    aos_str_set(&options->config->endpoint, \"www.test.com*www.aliyuncs.com\");\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers,\n        params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\n    CuAssertStrEquals(tc, AOS_CLIENT_ERROR_CODE, s->error_code);\n    CuAssertStrEquals(tc, \"The endpoint is invalid.\", s->error_msg);\n\n    sprintf(endpoint_buf, \"%s:80/test?x=1#segment\", TEST_OSS_ENDPOINT);\n    aos_str_set(&options->config->endpoint, endpoint_buf);\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers,\n        params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_str_set(&options->config->endpoint, \"#www.test.com*www.aliyuncs.com\");\n    s = oss_get_object_to_buffer(options, &bucket, &object, headers,\n        params, &buffer, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_NAME_LOOKUP_ERROR, s->code);\n    CuAssertStrEquals(tc, AOS_HTTP_IO_ERROR_CODE, s->error_code);\n    CuAssertStrEquals(tc, \"Couldn't resolve host name\", s->error_msg);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_object_with_invalid_endpoint ok\\n\");\n\n}\n\nvoid test_object_verify_strict(CuTest* tc)\r\n{\r\n    aos_pool_t* p = NULL;\r\n    oss_request_options_t* options = NULL;\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, 0);\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char* url;\r\n    aos_http_request_t* request;\r\n    // create request\r\n\r\n    request = aos_http_request_create(p);\r\n    request->method = HTTP_PUT;\n\n    aos_str_set(&bucket, \"bucket\");\n    aos_str_set(&object, \"?123\");\n    url = oss_gen_signed_url(options, &bucket, &object, 3600, request);\r\n    if (options->config->signature_version == 4) {\n        CuAssertPtrNotNull(tc, strstr(url, \"%3F123\"));\n        CuAssertPtrNotNull(tc, strstr(url, \"x-oss-signature-version=OSS4-HMAC-SHA256\"));\n    } else {\n        CuAssertTrue(tc, options->config->signature_version <= 1);\n        CuAssertPtrEquals(tc, NULL, url);\r\n    }\n\r\n    aos_str_set(&object, \"?\");\n    url = oss_gen_signed_url(options, &bucket, &object, 3600, request);\r\n    if (options->config->signature_version == 4) {\n        CuAssertPtrNotNull(tc, strstr(url, \"%3F\"));\n        CuAssertPtrNotNull(tc, strstr(url, \"x-oss-signature-version=OSS4-HMAC-SHA256\"));\n    } else {\n        CuAssertTrue(tc, options->config->signature_version <= 1);\n        CuAssertPtrEquals(tc, NULL, url);\r\n    }\n\r\n    aos_str_set(&object, \"123?123\");\n    url = oss_gen_signed_url(options, &bucket, &object, 3600, request);\r\n    CuAssertPtrNotNull(tc, url);\r\n\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, 0);\r\n    options->ctl->options->verify_object_strict = AOS_FALSE;\r\n    aos_str_set(&object, \"?123\");\n    url = oss_gen_signed_url(options, &bucket, &object, 3600, request);\r\n    CuAssertPtrNotNull(tc, url);\r\n\r\n    aos_str_set(&object, \"?\");\n    url = oss_gen_signed_url(options, &bucket, &object, 3600, request);\r\n    CuAssertPtrNotNull(tc, url);\r\n\r\n    aos_pool_destroy(p);\r\n\r\n    printf(\"test_object_verify_strict ok\\n\");\r\n}\n\n\nCuSuite *test_oss_object()\n{\n    CuSuite* suite = CuSuiteNew();   \n\n    SUITE_ADD_TEST(suite, test_object_setup);\n    SUITE_ADD_TEST(suite, test_put_object_from_buffer);\n    SUITE_ADD_TEST(suite, test_put_object_from_file);\n    SUITE_ADD_TEST(suite, test_put_object_from_buffer_with_specified);\n    SUITE_ADD_TEST(suite, test_get_object_to_buffer);\n    SUITE_ADD_TEST(suite, test_get_object_to_buffer_with_range);\n    SUITE_ADD_TEST(suite, test_put_object_from_file_with_content_type);\n    SUITE_ADD_TEST(suite, test_put_symlink_for_obj);\n    SUITE_ADD_TEST(suite, test_get_symlink_for_obj);\n    SUITE_ADD_TEST(suite, test_restore_obj);\n    SUITE_ADD_TEST(suite, test_restore_object_with_tier);\n    SUITE_ADD_TEST(suite, test_put_object_from_buffer_with_default_content_type);\n    SUITE_ADD_TEST(suite, test_put_object_with_large_length_header);\n    SUITE_ADD_TEST(suite, test_get_object_to_file);\n    SUITE_ADD_TEST(suite, test_head_object);\n    SUITE_ADD_TEST(suite, test_head_object_with_not_exist);\n    SUITE_ADD_TEST(suite, test_get_object_meta_not_exist);\n    SUITE_ADD_TEST(suite, test_get_object_meta);\n    SUITE_ADD_TEST(suite, test_get_object_acl_not_exist);\n    SUITE_ADD_TEST(suite, test_get_object_acl_object_empty);\n    SUITE_ADD_TEST(suite, test_get_object_acl_object_null);\n    SUITE_ADD_TEST(suite, test_get_object_acl);\n    SUITE_ADD_TEST(suite, test_put_object_acl_invalid_acl);\n    SUITE_ADD_TEST(suite, test_put_object_acl_object_empty);\n    SUITE_ADD_TEST(suite, test_put_object_acl_object_null);\n    SUITE_ADD_TEST(suite, test_put_object_acl);\n    SUITE_ADD_TEST(suite, test_copy_object);\n    SUITE_ADD_TEST(suite, test_copy_object_with_source_url_encode);\n    SUITE_ADD_TEST(suite, test_copy_object_negative);\n    SUITE_ADD_TEST(suite, test_object_by_url);\n    SUITE_ADD_TEST(suite, test_delete_object);\n    SUITE_ADD_TEST(suite, test_append_object_from_buffer);\n    SUITE_ADD_TEST(suite, test_append_object_from_file);\n    SUITE_ADD_TEST(suite, test_do_append_object_from_file);\n    SUITE_ADD_TEST(suite, test_get_not_exist_object_to_file);\n    SUITE_ADD_TEST(suite, test_put_object_from_buffer_with_invalid_endpoint);\n    SUITE_ADD_TEST(suite, test_object_invalid_parameter);\n    SUITE_ADD_TEST(suite, test_get_object_to_buffer_with_maxbuffersize);\n    SUITE_ADD_TEST(suite, test_get_object_to_buffer_use_invalid_sts);\n    SUITE_ADD_TEST(suite, test_object_with_invalid_endpoint);\n    SUITE_ADD_TEST(suite, test_object_verify_strict);\n    SUITE_ADD_TEST(suite, test_object_cleanup); \n    \n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_object_tagging.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n\nstatic char test_file[1024];\n\nvoid test_object_tagging_setup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n\n    TEST_BUCKET_NAME   = get_test_bucket_name(aos_global_pool, \"tagging\");\n    \n    /* create test bucket */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    sprintf(test_file, \"%sBingWallpaper-2017-01-19.jpg\", get_test_file_path());\n\n}\n\nvoid test_object_tagging_cleanup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    char *object_name1 = \"test_object_tagging_basic\";\n    char *object_name2 = \"test_object_tagging_tag_argument\";\n    char *object_name3 = \"test_object_tagging_put_object\";\n    char *object_name4 = \"test_object_tagging_append_object\";\n    char *object_name5 = \"test_object_tagging_copy_object_source\";\n    char *object_name6 = \"test_object_tagging_copy_object_dest\";\n    char *object_name7 = \"test_object_tagging_oss_object\";\n    char *object_name8 = \"test_object_tagging_link_to_oss_object\";\n    char *object_name9 = \"test_object_tagging_multipart_upload\";\n    char *object_name10 = \"test_object_tagging_resumable_upload\";\n    \n\n    aos_table_t *resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    /* delete test object */\n    delete_test_object(options, TEST_BUCKET_NAME, object_name1);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name2);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name3);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name4);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name5);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name6);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name7);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name8);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name9);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name10);\n\n    /* delete test bucket */\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_delete_bucket(options, &bucket, &resp_headers);\n    apr_sleep(apr_time_from_sec(3));\n\n    aos_pool_destroy(p);\n}\n\nvoid test_object_tagging_basic(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_object_tagging_basic\";\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_list_t tag_list;\n    oss_tag_content_t *tag_content;\n    int index;\n\n    /* test put object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-meta-author\", \"oss\");\n    s = create_test_object(options, TEST_BUCKET_NAME, object_name, str, headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n\n    aos_pool_destroy(p);\n\n    /* get object tagging*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    aos_list_init(&tag_list);\n    s = oss_get_object_tagging(options, &bucket, &object, \n        &tag_list, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    index = 0;\n    aos_list_for_each_entry(oss_tag_content_t, tag_content, &tag_list, node) {\n        index++;\n    }\n    CuAssertIntEquals(tc, 0, index);\n    aos_pool_destroy(p);\n\n\n    /*set object tagging*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n\n    aos_list_init(&tag_list);\n    tag_content = oss_create_tag_content(p);\n    aos_str_set(&tag_content->key, \"key1\");\n    aos_str_set(&tag_content->value, \"value1\");\n    aos_list_add_tail(&tag_content->node, &tag_list);\n    tag_content = oss_create_tag_content(p);\n    aos_str_set(&tag_content->key, \"key2\");\n    aos_str_set(&tag_content->value, \"value2\");\n    aos_list_add_tail(&tag_content->node, &tag_list);\n\n    s = oss_put_object_tagging(options, &bucket, &object,\n        &tag_list, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n\n    aos_pool_destroy(p);\n\n\n    /*get object tagging again*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    aos_list_init(&tag_list);\n    s = oss_get_object_tagging(options, &bucket, &object,\n        &tag_list, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    index = 0;\n    aos_list_for_each_entry(oss_tag_content_t, tag_content, &tag_list, node) {\n        char *value = NULL;\n        if (index == 0) {\n            value = apr_psprintf(p, \"%.*s\", tag_content->key.len,\n                tag_content->key.data);\n            CuAssertStrEquals(tc, \"key1\", value);\n            value = apr_psprintf(p, \"%.*s\", tag_content->value.len,\n                tag_content->value.data);\n            CuAssertStrEquals(tc, \"value1\", value);\n        }\n        else if (index == 1) {\n            value = apr_psprintf(p, \"%.*s\", tag_content->key.len,\n                tag_content->key.data);\n            CuAssertStrEquals(tc, \"key2\", value);\n            value = apr_psprintf(p, \"%.*s\", tag_content->value.len,\n                tag_content->value.data);\n            CuAssertStrEquals(tc, \"value2\", value);\n        }\n        index++;\n    }\n    CuAssertIntEquals(tc, 2, index);\n    aos_pool_destroy(p);\n\n\n    /*delete object tagging*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    s = oss_delete_object_tagging(options, &bucket, &object, &head_resp_headers);\n    CuAssertIntEquals(tc, 204, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n\n    aos_pool_destroy(p);\n\n    /*get object tagging again*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    aos_list_init(&tag_list);\n    s = oss_get_object_tagging(options, &bucket, &object,\n        &tag_list, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    index = 0;\n    aos_list_for_each_entry(oss_tag_content_t, tag_content, &tag_list, node) {\n        index++;\n    }\n    CuAssertIntEquals(tc, 0, index);\n    aos_pool_destroy(p);\n\n    //negative case\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    aos_list_init(&tag_list);\n    s = oss_get_object_tagging(options, &bucket, &object,\n        &tag_list, &head_resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n    aos_pool_destroy(p);\n\n    printf(\"test_object_tagging_basic ok\\n\");\n}\n\nvoid test_object_tagging_tag_list(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_object_tagging_tag_argument\";\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_list_t tag_list;\n    oss_tag_content_t *tag_content;\n\n    /* test put object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-meta-author\", \"oss\");\n    s = create_test_object(options, TEST_BUCKET_NAME, object_name, str, headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n\n    aos_pool_destroy(p);\n\n    /*set object tagging with empty tag list*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    aos_list_init(&tag_list);\n    s = oss_put_object_tagging(options, &bucket, &object,\n        &tag_list, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n\n    aos_pool_destroy(p);\n\n\n    /*set object tagging with empty tag.key */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n\n    aos_list_init(&tag_list);\n    tag_content = oss_create_tag_content(p);\n    aos_str_set(&tag_content->key, \"key1\");\n    aos_list_add_tail(&tag_content->node, &tag_list);\n\n    s = oss_put_object_tagging(options, &bucket, &object,\n        &tag_list, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n\n    aos_pool_destroy(p);\n\n\n    /*set object tagging with empty tag.value */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n\n    aos_list_init(&tag_list);\n    tag_content = oss_create_tag_content(p);\n    aos_str_set(&tag_content->value, \"value1\");\n    aos_list_add_tail(&tag_content->node, &tag_list);\n\n    s = oss_put_object_tagging(options, &bucket, &object,\n        &tag_list, &head_resp_headers);\n    CuAssertIntEquals(tc, 400, s->code);\n    CuAssertIntEquals(tc, 400, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_object_tagging_tag_list ok\\n\");\n}\n\nvoid test_object_tagging_put_object(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_object_tagging_put_object\";\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_list_t tag_list;\n    oss_tag_content_t *tag_content;\n    int index;\n    aos_list_t buffer;\n    aos_buf_t *content;\n\n    /* test put object with tagging */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-tagging\", \"key1=value1&key2=value2\");\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    s = oss_put_object_from_buffer(options, &bucket, &object,\n        &buffer, headers, &head_resp_headers);\n\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n\n    aos_pool_destroy(p);\n\n    /*get object tagging again*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    aos_list_init(&tag_list);\n    s = oss_get_object_tagging(options, &bucket, &object,\n        &tag_list, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    index = 0;\n    aos_list_for_each_entry(oss_tag_content_t, tag_content, &tag_list, node) {\n        char *value = NULL;\n        if (index == 0) {\n            value = apr_psprintf(p, \"%.*s\", tag_content->key.len,\n                tag_content->key.data);\n            CuAssertStrEquals(tc, \"key1\", value);\n            value = apr_psprintf(p, \"%.*s\", tag_content->value.len,\n                tag_content->value.data);\n            CuAssertStrEquals(tc, \"value1\", value);\n        }\n        else if (index == 1) {\n            value = apr_psprintf(p, \"%.*s\", tag_content->key.len,\n                tag_content->key.data);\n            CuAssertStrEquals(tc, \"key2\", value);\n            value = apr_psprintf(p, \"%.*s\", tag_content->value.len,\n                tag_content->value.data);\n            CuAssertStrEquals(tc, \"value2\", value);\n        }\n        index++;\n    }\n    CuAssertIntEquals(tc, 2, index);\n    aos_pool_destroy(p);\n\n    printf(\"test_object_tagging_put_object ok\\n\");\n}\n\nvoid test_object_tagging_append_object(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_object_tagging_append_object\";\n    char *str = \"test oss c sdk\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    aos_list_t tag_list;\n    oss_tag_content_t *tag_content;\n    int index;\n    aos_list_t buffer;\n    aos_buf_t *content;\n\n    /* test put object with tagging */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-tagging\", \"key1=value1&key2=value2\");\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    s = oss_append_object_from_buffer(options, &bucket, &object, 0,\n        &buffer, headers, &head_resp_headers);\n\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n\n    aos_pool_destroy(p);\n\n    /*get object tagging*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    aos_list_init(&tag_list);\n    s = oss_get_object_tagging(options, &bucket, &object,\n        &tag_list, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    index = 0;\n    aos_list_for_each_entry(oss_tag_content_t, tag_content, &tag_list, node) {\n        char *value = NULL;\n        if (index == 0) {\n            value = apr_psprintf(p, \"%.*s\", tag_content->key.len,\n                tag_content->key.data);\n            CuAssertStrEquals(tc, \"key1\", value);\n            value = apr_psprintf(p, \"%.*s\", tag_content->value.len,\n                tag_content->value.data);\n            CuAssertStrEquals(tc, \"value1\", value);\n        }\n        else if (index == 1) {\n            value = apr_psprintf(p, \"%.*s\", tag_content->key.len,\n                tag_content->key.data);\n            CuAssertStrEquals(tc, \"key2\", value);\n            value = apr_psprintf(p, \"%.*s\", tag_content->value.len,\n                tag_content->value.data);\n            CuAssertStrEquals(tc, \"value2\", value);\n        }\n        index++;\n    }\n    CuAssertIntEquals(tc, 2, index);\n    aos_pool_destroy(p);\n\n    printf(\"test_object_tagging_append_object ok\\n\");\n}\n\nvoid test_object_tagging_put_symlink(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_object_tagging_oss_object\";\n    char *link_object_name = \"test_object_tagging_link_to_oss_object\";\n    aos_string_t bucket;\n    aos_string_t sym_object;\n    aos_string_t target_object;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n    aos_list_t tag_list;\n    oss_tag_content_t *tag_content;\n    int index;\n\n    /*put object*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-tagging\", \"key3=value3\");\n    s = create_test_object(options, TEST_BUCKET_NAME, object_name, \"hello world\", headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n    aos_pool_destroy(p);\n\n    /* link object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-tagging\", \"key1=value1\");\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&sym_object, link_object_name);\n    aos_str_set(&target_object, object_name);\n    init_test_request_options(options, is_cname);\n    s = oss_do_put_symlink(options, &bucket, &sym_object,\n        &target_object, headers, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    aos_pool_destroy(p);\n\n    /*get object tagging*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_list_init(&tag_list);\n    s = oss_get_object_tagging(options, &bucket, &sym_object,\n        &tag_list, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    index = 0;\n    aos_list_for_each_entry(oss_tag_content_t, tag_content, &tag_list, node) {\n        char *value = NULL;\n        if (index == 0) {\n            value = apr_psprintf(p, \"%.*s\", tag_content->key.len,\n                tag_content->key.data);\n            CuAssertStrEquals(tc, \"key1\", value);\n            value = apr_psprintf(p, \"%.*s\", tag_content->value.len,\n                tag_content->value.data);\n            CuAssertStrEquals(tc, \"value1\", value);\n        }\n        index++;\n    }\n    CuAssertIntEquals(tc, 1, index);\n    aos_pool_destroy(p);\n\n    printf(\"test_object_tagging_put_symlink ok\\n\");\n}\n\nvoid test_object_tagging_copy_object(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t source_bucket;\n    char *source_object_name = \"test_object_tagging_copy_object_source\";\n    aos_string_t source_object;\n    aos_string_t dest_bucket;\n    char *dest_object_name = \"test_object_tagging_copy_object_dest\";\n    aos_string_t dest_object;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t tag_list;\n    oss_tag_content_t *tag_content;\n    int index;\n\n    /*put object*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-tagging\", \"key3=value3\");\n    s = create_test_object(options, TEST_BUCKET_NAME, source_object_name, \"hello world\", headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n\n    aos_pool_destroy(p);\n\n\n    /* test copy object with directive copy*/\n    aos_pool_create(&p, NULL);\n    headers = aos_table_make(p, 1);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&source_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&source_object, source_object_name);\n    aos_str_set(&dest_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&dest_object, dest_object_name);\n    apr_table_set(headers, \"x-oss-tagging-directive\", \"Copy\");\n\n    s = oss_copy_object(options, &source_bucket, &source_object,\n        &dest_bucket, &dest_object, headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n    apr_sleep(apr_time_from_sec(1));\n\n    /*get object tagging*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_list_init(&tag_list);\n    s = oss_get_object_tagging(options, &dest_bucket, &dest_object,\n        &tag_list, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    index = 0;\n    aos_list_for_each_entry(oss_tag_content_t, tag_content, &tag_list, node) {\n        char *value = NULL;\n        if (index == 0) {\n            value = apr_psprintf(p, \"%.*s\", tag_content->key.len,\n                tag_content->key.data);\n            CuAssertStrEquals(tc, \"key3\", value);\n            value = apr_psprintf(p, \"%.*s\", tag_content->value.len,\n                tag_content->value.data);\n            CuAssertStrEquals(tc, \"value3\", value);\n        }\n        index++;\n    }\n    CuAssertIntEquals(tc, 1, index);\n    aos_pool_destroy(p);\n\n    /* test copy object with directive replace*/\n    aos_pool_create(&p, NULL);\n    headers = aos_table_make(p, 1);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&source_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&source_object, source_object_name);\n    aos_str_set(&dest_bucket, TEST_BUCKET_NAME);\n    aos_str_set(&dest_object, dest_object_name);\n    apr_table_set(headers, \"x-oss-tagging-directive\", \"Replace\");\n    apr_table_set(headers, \"x-oss-tagging\", \"key1=value1&key2=value2\");\n\n    s = oss_copy_object(options, &source_bucket, &source_object,\n        &dest_bucket, &dest_object, headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_pool_destroy(p);\n    apr_sleep(apr_time_from_sec(1));\n\n    /*get object tagging*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_list_init(&tag_list);\n    s = oss_get_object_tagging(options, &dest_bucket, &dest_object,\n        &tag_list, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    index = 0;\n    aos_list_for_each_entry(oss_tag_content_t, tag_content, &tag_list, node) {\n        char *value = NULL;\n        if (index == 0) {\n            value = apr_psprintf(p, \"%.*s\", tag_content->key.len,\n                tag_content->key.data);\n            CuAssertStrEquals(tc, \"key1\", value);\n            value = apr_psprintf(p, \"%.*s\", tag_content->value.len,\n                tag_content->value.data);\n            CuAssertStrEquals(tc, \"value1\", value);\n        }\n        index++;\n    }\n    CuAssertIntEquals(tc, 2, index);\n    aos_pool_destroy(p);\n\n    printf(\"test_object_tagging_copy_object ok\\n\");\n}\n\nvoid test_object_tagging_multipart_upload(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"test_object_tagging_multipart_upload\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    aos_table_t *headers = NULL;\n    aos_table_t *upload_part_resp_headers = NULL;\n    oss_list_upload_part_params_t *params = NULL;\n    aos_table_t *list_part_resp_headers = NULL;\n    aos_string_t upload_id;\n    aos_list_t complete_part_list;\n    oss_list_part_content_t *part_content1 = NULL;\n    oss_list_part_content_t *part_content2 = NULL;\n    oss_complete_part_content_t *complete_content1 = NULL;\n    oss_complete_part_content_t *complete_content2 = NULL;\n    aos_table_t *complete_resp_headers = NULL;\n    aos_table_t *head_resp_headers = NULL;\n    int part_num = 1;\n    int part_num1 = 2;\n    char *expect_part_num_marker = \"1\";\n    char *content_type_for_complete = \"application/octet-stream\";\n    aos_list_t tag_list;\n    oss_tag_content_t *tag_content;\n    int index;\n    aos_table_t *resp_headers;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    headers = aos_table_make(options->pool, 2);\n\n    //init mulitipart\n    apr_table_add(headers, \"x-oss-tagging\", \"key1=value1&key2=value2\");\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    s = oss_init_multipart_upload(options, &bucket, &object,\n        &upload_id, headers, &resp_headers);\n\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //upload part\n    aos_list_init(&buffer);\n    make_random_body(p, 200, &buffer);\n\n    s = oss_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num, &buffer, &upload_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, upload_part_resp_headers);\n\n    aos_list_init(&buffer);\n    make_random_body(p, 200, &buffer);\n    s = oss_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num1, &buffer, &upload_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, upload_part_resp_headers);\n\n    //list part\n    params = oss_create_list_upload_part_params(p);\n    params->max_ret = 1;\n    aos_list_init(&complete_part_list);\n\n    s = oss_list_upload_part(options, &bucket, &object, &upload_id,\n        params, &list_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 1, params->truncated);\n    CuAssertStrEquals(tc, expect_part_num_marker,\n        params->next_part_number_marker.data);\n    CuAssertPtrNotNull(tc, list_part_resp_headers);\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content1, &params->part_list, node) {\n        complete_content1 = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content1->part_number, part_content1->part_number.data);\n        aos_str_set(&complete_content1->etag, part_content1->etag.data);\n        aos_list_add_tail(&complete_content1->node, &complete_part_list);\n    }\n\n    aos_list_init(&params->part_list);\n    aos_str_set(&params->part_number_marker, params->next_part_number_marker.data);\n    s = oss_list_upload_part(options, &bucket, &object, &upload_id, params, &list_part_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertIntEquals(tc, 0, params->truncated);\n    CuAssertPtrNotNull(tc, list_part_resp_headers);\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content2, &params->part_list, node) {\n        complete_content2 = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content2->part_number, part_content2->part_number.data);\n        aos_str_set(&complete_content2->etag, part_content2->etag.data);\n        aos_list_add_tail(&complete_content2->node, &complete_part_list);\n    }\n\n    //complete multipart\n    apr_table_clear(headers);\n    apr_table_add(headers, OSS_CONTENT_TYPE, content_type_for_complete);\n    s = oss_complete_multipart_upload(options, &bucket, &object, &upload_id,\n        &complete_part_list, headers, &complete_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, complete_resp_headers);\n\n    aos_pool_destroy(p);\n\n\n    /*get object tagging*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    aos_list_init(&tag_list);\n    s = oss_get_object_tagging(options, &bucket, &object,\n        &tag_list, &head_resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, head_resp_headers);\n    index = 0;\n    aos_list_for_each_entry(oss_tag_content_t, tag_content, &tag_list, node) {\n        char *value = NULL;\n        if (index == 0) {\n            value = apr_psprintf(p, \"%.*s\", tag_content->key.len,\n                tag_content->key.data);\n            CuAssertStrEquals(tc, \"key1\", value);\n            value = apr_psprintf(p, \"%.*s\", tag_content->value.len,\n                tag_content->value.data);\n            CuAssertStrEquals(tc, \"value1\", value);\n        }\n        else if (index == 1) {\n            value = apr_psprintf(p, \"%.*s\", tag_content->key.len,\n                tag_content->key.data);\n            CuAssertStrEquals(tc, \"key2\", value);\n            value = apr_psprintf(p, \"%.*s\", tag_content->value.len,\n                tag_content->value.data);\n            CuAssertStrEquals(tc, \"value2\", value);\n        }\n        index++;\n    }\n    CuAssertIntEquals(tc, 2, index);\n    aos_pool_destroy(p);\n\n    printf(\"test_object_tagging_multipart ok\\n\");\n}\n\nvoid test_object_tagging_resumale_upload(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_object_tagging_resumable_upload\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    aos_list_t tag_list;\n    oss_tag_content_t *tag_content;\n    int index;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    apr_table_add(headers, \"x-oss-tagging\", \"key1=value1&key2=value2\");\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // upload object\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_FALSE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL,\n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    /*get object tagging*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    init_test_request_options(options, is_cname);\n    aos_list_init(&tag_list);\n    apr_table_clear(resp_headers);\n    s = oss_get_object_tagging(options, &bucket, &object,\n        &tag_list, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    index = 0;\n    aos_list_for_each_entry(oss_tag_content_t, tag_content, &tag_list, node) {\n        char *value = NULL;\n        if (index == 0) {\n            value = apr_psprintf(p, \"%.*s\", tag_content->key.len,\n                tag_content->key.data);\n            CuAssertStrEquals(tc, \"key1\", value);\n            value = apr_psprintf(p, \"%.*s\", tag_content->value.len,\n                tag_content->value.data);\n            CuAssertStrEquals(tc, \"value1\", value);\n        }\n        else if (index == 1) {\n            value = apr_psprintf(p, \"%.*s\", tag_content->key.len,\n                tag_content->key.data);\n            CuAssertStrEquals(tc, \"key2\", value);\n            value = apr_psprintf(p, \"%.*s\", tag_content->value.len,\n                tag_content->value.data);\n            CuAssertStrEquals(tc, \"value2\", value);\n        }\n        index++;\n    }\n    CuAssertIntEquals(tc, 2, index);\n    aos_pool_destroy(p);\n\n    printf(\"test_object_tagging_resumale_upload ok\\n\");\n}\n\nvoid test_lifecycle_tag(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t lifecycle_rule_list;\n    oss_lifecycle_rule_content_t *rule_content = NULL;\n    oss_lifecycle_rule_content_t *rule_content1 = NULL;\n    oss_lifecycle_rule_content_t *rule_content2 = NULL;\n    oss_lifecycle_rule_content_t *rule_content3 = NULL;\n    oss_lifecycle_rule_content_t *rule_content4 = NULL;\n    int size = 0;\n    char *rule_id = NULL;\n    char *prefix = NULL;\n    char *status = NULL;\n    int days = INT_MAX;\n    char* date = NULL;\n    char* created_before_date = NULL;\n    oss_tag_content_t *tag_content = NULL;\n    int tag_index = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n\n    //put lifecycle\n    resp_headers = NULL;\n    aos_list_init(&lifecycle_rule_list);\n    rule_content1 = oss_create_lifecycle_rule_content(p);\n    aos_str_set(&rule_content1->id, \"1\");\n    aos_str_set(&rule_content1->prefix, \"pre1\");\n    aos_str_set(&rule_content1->status, \"Enabled\");\n    rule_content1->days = 1;\n    tag_content = oss_create_tag_content(p);\n    aos_str_set(&tag_content->key, \"pre1key1\");\n    aos_str_set(&tag_content->value, \"pre1value1\");\n    aos_list_add_tail(&tag_content->node, &rule_content1->tag_list);\n    tag_content = oss_create_tag_content(p);\n    aos_str_set(&tag_content->key, \"pre1key2\");\n    aos_str_set(&tag_content->value, \"pre1value2\");\n    aos_list_add_tail(&tag_content->node, &rule_content1->tag_list);\n\n    rule_content2 = oss_create_lifecycle_rule_content(p);\n    aos_str_set(&rule_content2->id, \"2\");\n    aos_str_set(&rule_content2->prefix, \"pre2\");\n    aos_str_set(&rule_content2->status, \"Enabled\");\n    aos_str_set(&rule_content2->date, \"2022-10-11T00:00:00.000Z\");\n\n\n    rule_content3 = oss_create_lifecycle_rule_content(p);\n    aos_str_set(&rule_content3->id, \"3\");\n    aos_str_set(&rule_content3->prefix, \"pre3\");\n    aos_str_set(&rule_content3->status, \"Enabled\");\n    aos_str_set(&rule_content3->created_before_date, \"2017-10-11T00:00:00.000Z\");\n    rule_content3->abort_multipart_upload_dt.days = 1;\n\n    rule_content4 = oss_create_lifecycle_rule_content(p);\n    aos_str_set(&rule_content4->id, \"4\");\n    aos_str_set(&rule_content4->prefix, \"pre4\");\n    aos_str_set(&rule_content4->status, \"Enabled\");\n    aos_str_set(&rule_content4->created_before_date, \"2017-10-11T00:00:00.000Z\");\n    aos_str_set(&rule_content4->abort_multipart_upload_dt.created_before_date, \"2012-10-11T00:00:00.000Z\");\n\n    aos_list_add_tail(&rule_content1->node, &lifecycle_rule_list);\n    aos_list_add_tail(&rule_content2->node, &lifecycle_rule_list);\n    aos_list_add_tail(&rule_content3->node, &lifecycle_rule_list);\n    aos_list_add_tail(&rule_content4->node, &lifecycle_rule_list);\n\n    s = oss_put_bucket_lifecycle(options, &bucket, &lifecycle_rule_list,\n        &resp_headers);\n    if (s->error_msg) {\n        TEST_CASE_LOG(\"%s %s\\n\", s->error_msg, s->error_code);\n    }\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    //get lifecycle\n    resp_headers = NULL;\n    aos_list_init(&lifecycle_rule_list);\n    s = oss_get_bucket_lifecycle(options, &bucket, &lifecycle_rule_list,\n        &resp_headers);\n    if (s->error_msg) {\n        printf(\"%s %s\", s->error_msg, s->error_code);\n    }\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n\n    aos_list_for_each_entry(oss_lifecycle_rule_content_t, rule_content, &lifecycle_rule_list, node) {\n        if (size == 0) {\n            rule_id = apr_psprintf(p, \"%.*s\", rule_content->id.len,\n                rule_content->id.data);\n            CuAssertStrEquals(tc, \"1\", rule_id);\n            prefix = apr_psprintf(p, \"%.*s\", rule_content->prefix.len,\n                rule_content->prefix.data);\n            CuAssertStrEquals(tc, \"pre1\", prefix);\n            date = apr_psprintf(p, \"%.*s\", rule_content->date.len,\n                rule_content->date.data);\n            CuAssertStrEquals(tc, \"\", date);\n            status = apr_psprintf(p, \"%.*s\", rule_content->status.len,\n                rule_content->status.data);\n            CuAssertStrEquals(tc, \"Enabled\", status);\n            days = rule_content->days;\n            CuAssertIntEquals(tc, 1, days);\n            tag_index = 0;\n            aos_list_for_each_entry(oss_tag_content_t, tag_content, &rule_content->tag_list, node) {\n                if (tag_index == 0) {\n                    CuAssertStrEquals(tc, \"pre1key1\", tag_content->key.data);\n                    CuAssertStrEquals(tc, \"pre1value1\", tag_content->value.data);\n                }\n                else if (tag_index == 1) {\n                    CuAssertStrEquals(tc, \"pre1key2\", tag_content->key.data);\n                    CuAssertStrEquals(tc, \"pre1value2\", tag_content->value.data);\n                }\n                tag_index++;\n            }\n            CuAssertIntEquals(tc, 2, tag_index);\n        }\n        else if (size == 1) {\n            rule_id = apr_psprintf(p, \"%.*s\", rule_content->id.len,\n                rule_content->id.data);\n            CuAssertStrEquals(tc, \"2\", rule_id);\n            prefix = apr_psprintf(p, \"%.*s\", rule_content->prefix.len,\n                rule_content->prefix.data);\n            CuAssertStrEquals(tc, \"pre2\", prefix);\n            date = apr_psprintf(p, \"%.*s\", rule_content->date.len,\n                rule_content->date.data);\n            CuAssertStrEquals(tc, \"2022-10-11T00:00:00.000Z\", date);\n            status = apr_psprintf(p, \"%.*s\", rule_content->status.len,\n                rule_content->status.data);\n            CuAssertStrEquals(tc, \"Enabled\", status);\n            days = rule_content->days;\n            CuAssertIntEquals(tc, INT_MAX, days);\n            CuAssertIntEquals(tc, 1, aos_list_empty(&rule_content->tag_list));\n        }\n        else if (size == 2) {\n            rule_id = apr_psprintf(p, \"%.*s\", rule_content->id.len,\n                rule_content->id.data);\n            CuAssertStrEquals(tc, \"3\", rule_id);\n\n            prefix = apr_psprintf(p, \"%.*s\", rule_content->prefix.len,\n                rule_content->prefix.data);\n            CuAssertStrEquals(tc, \"pre3\", prefix);\n\n            date = apr_psprintf(p, \"%.*s\", rule_content->date.len,\n                rule_content->date.data);\n            CuAssertStrEquals(tc, \"\", date);\n\n            created_before_date = apr_psprintf(p, \"%.*s\", rule_content->created_before_date.len,\n                rule_content->created_before_date.data);\n            CuAssertStrEquals(tc, \"2017-10-11T00:00:00.000Z\", created_before_date);\n\n            days = rule_content->abort_multipart_upload_dt.days;\n            CuAssertIntEquals(tc, 1, days);\n\n            status = apr_psprintf(p, \"%.*s\", rule_content->status.len,\n                rule_content->status.data);\n            CuAssertStrEquals(tc, \"Enabled\", status);\n            days = rule_content->days;\n            CuAssertIntEquals(tc, INT_MAX, days);\n            CuAssertIntEquals(tc, 1, aos_list_empty(&rule_content->tag_list));\n        }\n        else if (size == 3) {\n            rule_id = apr_psprintf(p, \"%.*s\", rule_content->id.len,\n                rule_content->id.data);\n            CuAssertStrEquals(tc, \"4\", rule_id);\n\n            prefix = apr_psprintf(p, \"%.*s\", rule_content->prefix.len,\n                rule_content->prefix.data);\n            CuAssertStrEquals(tc, \"pre4\", prefix);\n\n            created_before_date = apr_psprintf(p, \"%.*s\", rule_content->created_before_date.len,\n                rule_content->created_before_date.data);\n            CuAssertStrEquals(tc, \"2017-10-11T00:00:00.000Z\", created_before_date);\n\n            created_before_date = apr_psprintf(p, \"%.*s\",\n                rule_content->abort_multipart_upload_dt.created_before_date.len,\n                rule_content->abort_multipart_upload_dt.created_before_date.data);\n            CuAssertStrEquals(tc, \"2012-10-11T00:00:00.000Z\", created_before_date);\n\n            days = rule_content->abort_multipart_upload_dt.days;\n            CuAssertIntEquals(tc, INT_MAX, days);\n\n            status = apr_psprintf(p, \"%.*s\", rule_content->status.len,\n                rule_content->status.data);\n            CuAssertStrEquals(tc, \"Enabled\", status);\n            days = rule_content->days;\n            CuAssertIntEquals(tc, INT_MAX, days);\n            CuAssertIntEquals(tc, 1, aos_list_empty(&rule_content->tag_list));\n        }\n\n        ++size;\n    }\n    CuAssertIntEquals(tc, 4, size);\n\n    //delete lifecycle\n    resp_headers = NULL;\n    s = oss_delete_bucket_lifecycle(options, &bucket, &resp_headers);\n    CuAssertIntEquals(tc, 204, s->code);\n    CuAssertPtrNotNull(tc, resp_headers);\n    aos_pool_destroy(p);\n\n    printf(\"test_lifecycle ok\\n\");\n}\n\nvoid test_object_tagging_invalid_parameter(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    oss_request_options_t *options = NULL;\r\n    int is_cname = 0;\r\n    int i;\r\n    char *invalid_name_list[] =\r\n    { \"a\", \"1\", \"!\", \"aa\", \"12\", \"a1\",\r\n        \"a!\", \"1!\", \"aAa\", \"1A1\", \"a!a\", \"FengChao@123\", \"-a123\", \"a_123\", \"a123-\",\r\n        \"1234567890123456789012345678901234567890123456789012345678901234\", \"\"\r\n    };\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n\r\n    for (i = 0; i < sizeof(invalid_name_list) / sizeof(invalid_name_list[0]); i++) {\r\n        aos_string_t bucket;\r\n        aos_status_t *s = NULL;\r\n        aos_table_t *resp_headers = NULL;\r\n        aos_str_set(&bucket, invalid_name_list[i]);\r\n\r\n        s = oss_put_object_tagging(options, &bucket, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_get_object_tagging(options, &bucket, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_delete_object_tagging(options, &bucket, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n    }\r\n    aos_pool_destroy(p);\r\n\r\n    printf(\"test_object_tagging_invalid_parameter ok\\n\");\r\n}\r\n\n\nCuSuite *test_oss_object_tagging()\n{\n    CuSuite* suite = CuSuiteNew();   \n\n    SUITE_ADD_TEST(suite, test_object_tagging_setup);\n    SUITE_ADD_TEST(suite, test_object_tagging_basic);\n    SUITE_ADD_TEST(suite, test_object_tagging_tag_list);\n    SUITE_ADD_TEST(suite, test_object_tagging_put_object);\n    SUITE_ADD_TEST(suite, test_object_tagging_append_object);\n    SUITE_ADD_TEST(suite, test_object_tagging_put_symlink);\n    SUITE_ADD_TEST(suite, test_object_tagging_copy_object);\n    SUITE_ADD_TEST(suite, test_object_tagging_multipart_upload);\n    SUITE_ADD_TEST(suite, test_object_tagging_resumale_upload);\n    SUITE_ADD_TEST(suite, test_lifecycle_tag);\n    SUITE_ADD_TEST(suite, test_object_tagging_invalid_parameter);\n    SUITE_ADD_TEST(suite, test_object_tagging_cleanup);\n    \n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_progress.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n\nvoid test_progress_setup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n\n    TEST_BUCKET_NAME = get_test_bucket_name(aos_global_pool, \"progress\");\n\n    /* create test bucket */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n\n    CuAssertIntEquals(tc, 200, s->code);\n    aos_pool_destroy(p);\n}\n\nvoid test_progress_cleanup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    char *object_name1 = \"oss_test_progress_put_object.ts\";\n    char *object_name2 = \"oss_test_progress_append_object.ts\";\n    char *object_name3 = \"oss_test_progress_multipart_object.ts\";\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    /* delete test object */\n    delete_test_object(options, TEST_BUCKET_NAME, object_name1);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name2);\n    delete_test_object(options, TEST_BUCKET_NAME, object_name3);\n\n    /* delete test bucket */\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_delete_bucket(options, &bucket, NULL);\n    apr_sleep(apr_time_from_sec(3));\n\n    aos_pool_destroy(p);\n}\n\nvoid test_progress_put_and_get_from_buffer(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_progress_put_object.ts\";\n    char *str = NULL;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    size_t length = 1024 * 16 * 10;\n    aos_list_t resp_body;\n    aos_list_t buffer;\n    aos_buf_t *content;\n\n    /* init test*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n   \n    str = (char *)aos_palloc(p, length);\n    memset(str, 'A', length - 1);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, length);\n    aos_list_add_tail(&content->node, &buffer);\n\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-meta-author\", \"oss\");\n    \n    /* test put object */\n    s = oss_do_put_object_from_buffer(options, &bucket, &object, &buffer, \n        headers, params, percentage, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n    aos_pool_destroy(p);\n\n    /* test get object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    s = oss_do_get_object_to_buffer(options, &bucket, &object, NULL, NULL, \n        &buffer, percentage, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n    aos_pool_destroy(p);\n\n    printf(\"test_progress_put_object_from_buffer ok\\n\");\n}\n\nvoid test_progress_put_and_get_from_file(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_progress_put_object.ts\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    size_t length = 1024 * 16 * 10;\n    aos_list_t resp_body;\n\n    /* init test*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n   \n    make_random_file(p, object_name, length);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n    aos_list_init(&resp_body);\n\n    /* test put object */\n    s = oss_do_put_object_from_file(options, &bucket, &object, &filename, \n        NULL, NULL, percentage, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n    \n    aos_pool_destroy(p);\n\n    /* test get object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    s = oss_do_get_object_to_file(options, &bucket, &object, NULL, NULL, \n        &filename, percentage, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    apr_file_remove(object_name, p);\n    aos_pool_destroy(p);\n\n    printf(\"test_progress_put_and_get_from_file ok\\n\");\n}\n\nvoid test_progress_put_and_get_empty_body(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_progress_put_object.ts\";\n    char *str = \"\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    size_t length = 0;\n    aos_list_t resp_body;\n    aos_list_t buffer;\n    aos_buf_t *content;\n\n    /* init test*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, length);\n    aos_list_add_tail(&content->node, &buffer);\n\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-meta-author\", \"oss\");\n\n    /* test put object */\n    s = oss_do_put_object_from_buffer(options, &bucket, &object, &buffer, \n        headers, params, percentage, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n    CuAssertPtrNotNull(tc, headers);\n    aos_pool_destroy(p);\n\n    /* test get object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    s = oss_do_get_object_to_buffer(options, &bucket, &object, NULL, NULL, \n        &buffer, percentage, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n    aos_pool_destroy(p);\n\n    printf(\"test_progress_put_and_get_empty_body ok\\n\");\n}\n\nvoid test_progress_append_object(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_progress_append_object.ts\";\n    char *str = NULL;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_table_t *headers = NULL;\n    aos_table_t *params = NULL;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    size_t length = 1024 * 16 * 20;\n    uint64_t initcrc = 0;\n    aos_list_t resp_body;\n    aos_list_t buffer;\n    aos_buf_t *content;\n\n    /* init test*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n   \n    str = (char *)aos_palloc(p, length);\n    memset(str, 'A', length - 1);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, length);\n    aos_list_add_tail(&content->node, &buffer);\n\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-meta-author\", \"oss\");\n    \n    /* test append object from buffer */\n    s = oss_do_append_object_from_buffer(options, &bucket, &object, 0, initcrc, &buffer, \n        headers, params, percentage, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    /* test append object from file*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    aos_str_set(&filename, object_name);\n    make_random_file(p, object_name, length);\n    initcrc = aos_atoui64((char*)(apr_table_get(resp_headers, OSS_HASH_CRC64_ECMA)));\n\n    s = oss_do_append_object_from_file(options, &bucket, &object, length, initcrc, &filename, \n        NULL, NULL, percentage, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    apr_file_remove(object_name, p);\n    aos_pool_destroy(p);\n\n    printf(\"test_progress_append_object ok\\n\");\n}\n\nvoid test_progress_multipart_from_buffer(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_progress_multipart_object.ts\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    aos_list_t buffer;\n    oss_list_upload_part_params_t *params = NULL;\n    aos_string_t upload_id;\n    aos_list_t complete_part_list;\n    oss_list_part_content_t *part_content1 = NULL;\n    oss_complete_part_content_t *complete_content1 = NULL;\n    int part_num = 1;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    //init mulitipart\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, object_name, &upload_id);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //upload part\n    aos_list_init(&buffer);\n    make_random_body(p, 200, &buffer);\n\n    s = oss_do_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num++, &buffer, percentage, NULL, NULL, NULL, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_list_init(&buffer);\n    make_random_body(p, 200, &buffer);\n    s = oss_do_upload_part_from_buffer(options, &bucket, &object, &upload_id,\n        part_num++, &buffer, percentage, NULL, NULL, NULL, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //list part\n    params = oss_create_list_upload_part_params(p);\n    params->max_ret = 1;\n    aos_list_init(&complete_part_list);\n\n    s = oss_list_upload_part(options, &bucket, &object, &upload_id, \n                             params, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content1, &params->part_list, node) {\n        complete_content1 = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content1->part_number, part_content1->part_number.data);\n        aos_str_set(&complete_content1->etag, part_content1->etag.data);\n        aos_list_add_tail(&complete_content1->node, &complete_part_list);\n    }\n\n    //complete multipart\n    s = oss_complete_multipart_upload(options, &bucket, &object, &upload_id,\n            &complete_part_list, NULL, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_progress_multipart_from_buffer ok\\n\");\n}\n\nvoid test_progress_multipart_from_file(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    char *object_name = \"oss_test_progress_multipart_object.ts\";\n    aos_string_t object;\n    int is_cname = 0;\n    oss_request_options_t *options = NULL;\n    aos_status_t *s = NULL;\n    oss_list_upload_part_params_t *params = NULL;\n    aos_string_t upload_id;\n    aos_list_t complete_part_list;\n    oss_upload_file_t *upload_file = NULL;\n    oss_list_part_content_t *part_content1 = NULL;\n    oss_complete_part_content_t *complete_content1 = NULL;\n    size_t length = 1024 * 16 * 10;\n    int part_num = 1;    \n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    make_random_file(p, object_name, length);\n    upload_file = oss_create_upload_file(p);\n    aos_str_set(&upload_file->filename, object_name);\n\n    //init mulitipart\n    s = init_test_multipart_upload(options, TEST_BUCKET_NAME, object_name, &upload_id);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //upload part\n    upload_file->file_pos = 0;\n    upload_file->file_last = length/2;\n    s = oss_do_upload_part_from_file(options, &bucket, &object, &upload_id,\n        part_num++, upload_file, percentage, NULL, NULL, NULL, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    upload_file->file_pos = length/2;\n    upload_file->file_last = length;\n    s = oss_do_upload_part_from_file(options, &bucket, &object, &upload_id,\n        part_num++, upload_file, percentage, NULL, NULL, NULL, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    //list part\n    params = oss_create_list_upload_part_params(p);\n    params->max_ret = 1;\n    aos_list_init(&complete_part_list);\n\n    s = oss_list_upload_part(options, &bucket, &object, &upload_id, \n                             params, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_list_for_each_entry(oss_list_part_content_t, part_content1, &params->part_list, node) {\n        complete_content1 = oss_create_complete_part_content(p);\n        aos_str_set(&complete_content1->part_number, part_content1->part_number.data);\n        aos_str_set(&complete_content1->etag, part_content1->etag.data);\n        aos_list_add_tail(&complete_content1->node, &complete_part_list);\n    }\n\n    //complete multipart\n    s = oss_complete_multipart_upload(options, &bucket, &object, &upload_id,\n            &complete_part_list, NULL, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    apr_file_remove(object_name, p);\n    aos_pool_destroy(p);\n\n    printf(\"void test_progress_multipart_from_file ok\\n\");\n}\n\nCuSuite *test_oss_progress()\n{\n    CuSuite* suite = CuSuiteNew();\n\n    SUITE_ADD_TEST(suite, test_progress_setup);\n    SUITE_ADD_TEST(suite, test_progress_put_and_get_from_buffer);\n    SUITE_ADD_TEST(suite, test_progress_put_and_get_from_file);\n    SUITE_ADD_TEST(suite, test_progress_put_and_get_empty_body);\n    SUITE_ADD_TEST(suite, test_progress_append_object);\n    SUITE_ADD_TEST(suite, test_progress_multipart_from_buffer); \n    SUITE_ADD_TEST(suite, test_progress_multipart_from_file); \n    SUITE_ADD_TEST(suite, test_progress_cleanup);\n\n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_proxy.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n#include \"aos_crc64.h\"\n\nstatic char test_file[1024];\n\nvoid test_proxy_setup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n\n    TEST_BUCKET_NAME = get_test_bucket_name(aos_global_pool, \"proxy\");\n\n    /* create test bucket */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n\n    sprintf(test_file, \"%sBingWallpaper-2017-01-19.jpg\", get_test_file_path());\n\n    CuAssertIntEquals(tc, 200, s->code);\n    aos_pool_destroy(p);\n}\n\nvoid test_proxy_cleanup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    char *object_name1 = \"oss_test_proxy_put_object.txt\";\n\n    aos_table_t *resp_headers = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    /* delete test object */\n    delete_test_object(options, TEST_BUCKET_NAME, object_name1);\n\n    /* delete test bucket */\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_delete_bucket(options, &bucket, &resp_headers);\n    apr_sleep(apr_time_from_sec(3));\n\n    aos_pool_destroy(p);\n}\n\nvoid init_test_proxy_request_options(oss_request_options_t *options, int is_cname)\n{\n    options->config = oss_config_create(options->pool);\n    init_test_config(options->config, is_cname);\n    aos_str_set(&options->config->proxy_host, decrypt(\"^]DRRDR^D^Z\", options->pool));\n    aos_str_set(&options->config->proxy_user, decrypt(\"\\x1e\\xf\\x19\\x1e\\xf\\x18\", options->pool));\n    aos_str_set(&options->config->proxy_passwd, decrypt(\"\\\"\\xf\\x6\\x6\\x5[XY^_\", options->pool));\n    options->config->proxy_port = 3128;\n\n    options->ctl = aos_http_controller_create(options->pool, 0);\n    options->ctl->options = aos_http_request_options_create(options->pool);\n    oss_config_resolve(options->pool, options->config, options->ctl);\n    options->ctl->options->verify_ssl = AOS_FALSE;\n}\n\nvoid test_proxy_put_object_from_buffer(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"oss_test_proxy_put_object.txt\";\n    char *str = \"Sow nothing, reap nothing.\";\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    aos_string_t object;\n    oss_request_options_t *options = NULL;\n    aos_table_t *headers = NULL;\n    aos_list_t buffer;\n    aos_buf_t *content;\n\n    /* init test*/\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_proxy_request_options(options, is_cname);\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    headers = aos_table_make(p, 2);\n    apr_table_set(headers, \"Expect\", \"\");\n    apr_table_set(headers, \"Transfer-Encoding\", \"\");\n\n    /* test put object */\n    s = oss_put_object_from_buffer(options, &bucket, &object, &buffer, headers, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    /* test get object */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_proxy_request_options(options, is_cname);\n\n    s = oss_get_object_to_buffer(options, &bucket, &object, NULL, NULL, &buffer, NULL);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_proxy_put_object_from_buffer ok\\n\");\n}\n\nvoid test_proxy_list_object(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    int is_cname = 0;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_list_object_params_t *params = NULL;\n    oss_list_object_content_t *content = NULL;\n    int size = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_proxy_request_options(options, is_cname);\n    params = oss_create_list_object_params(p);\n    params->max_ret = 1;\n    params->truncated = 0;\n    aos_str_set(&params->prefix, \"oss_test_proxy_\");\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_list_object(options, &bucket, params, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_list_for_each_entry(oss_list_object_content_t, content, &params->object_list, node) {\n        ++size;\n    }\n    CuAssertIntEquals(tc, 1 ,size);\n\n    printf(\"test_proxy_list_object ok\\n\");\n}\n\nvoid test_proxy_resumable_upload(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_proxy_resumable_upload.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int64_t content_length = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_proxy_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // upload object\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_FALSE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL,\n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    printf(\"test_proxy_resumable_upload ok\\n\");\n}\n\nCuSuite *test_oss_proxy()\n{\n    CuSuite* suite = CuSuiteNew();\n\n    SUITE_ADD_TEST(suite, test_proxy_setup);\n    SUITE_ADD_TEST(suite, test_proxy_put_object_from_buffer);\n    SUITE_ADD_TEST(suite, test_proxy_list_object);\n    SUITE_ADD_TEST(suite, test_proxy_resumable_upload);\n    SUITE_ADD_TEST(suite, test_proxy_cleanup);\n\n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_resumable.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n#include \"aos_crc64.h\"\n\nstatic char test_file[1024];\n\nvoid test_resumable_setup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_status_t *s = NULL;\n    oss_request_options_t *options = NULL;\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\n\n    TEST_BUCKET_NAME = get_test_bucket_name(aos_global_pool, \"resumable\");\n\n    /* create test bucket */\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\n\n    CuAssertIntEquals(tc, 200, s->code);\n    aos_pool_destroy(p);\n\n    sprintf(test_file, \"%sBingWallpaper-2017-01-19.jpg\", get_test_file_path());\n\n}\n\nvoid test_resumable_cleanup(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    int is_cname = 0;\n    aos_string_t bucket;\n    oss_request_options_t *options = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_status_t *s = NULL;\n    oss_list_multipart_upload_params_t *params;\n    oss_list_multipart_upload_content_t *content;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n\n    /* delete test object */\n    delete_test_object(options, TEST_BUCKET_NAME, \"test_resumable_upload_without_checkpoint.jpg\");\n    delete_test_object(options, TEST_BUCKET_NAME, \"test_resumable_upload_partsize.jpg\");\n    delete_test_object(options, TEST_BUCKET_NAME, \"test_resumable_upload_threads.jpg\");\n    delete_test_object(options, TEST_BUCKET_NAME, \"test_resumable_upload_with_checkpoint.jpg\");\n    delete_test_object(options, TEST_BUCKET_NAME, \"test_resumable_upload_with_checkpoint_format_invalid.jpg\");\n    delete_test_object(options, TEST_BUCKET_NAME, \"test_resumable_upload_with_file_size_unavailable.jpg\");\n    delete_test_object(options, TEST_BUCKET_NAME, \"test_resumable_upload_with_uploadid_unavailable.jpg\");\n    delete_test_object(options, TEST_BUCKET_NAME, \"test_resumable_upload_with_uploadid_available.jpg\");\n    delete_test_object(options, TEST_BUCKET_NAME, \"test_resumable_upload_callback_without_checkpoint.jpg\");\n    delete_test_object(options, TEST_BUCKET_NAME, \"test_resumable_upload_progress_without_checkpoint.jpg\");\n    delete_test_object(options, TEST_BUCKET_NAME, \"test_resumable_upload_callback_with_checkpoint.jpg\");\n    delete_test_object(options, TEST_BUCKET_NAME, \"test_resumable_upload_progress_with_checkpoint.jpg\");\n    delete_test_object(options, TEST_BUCKET_NAME, \"test_resumable_upload_content_type.ts\");\n    \n    /* abort multipart uploads */\n    params = oss_create_list_multipart_upload_params(p);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    s = oss_list_multipart_upload(options, &bucket, params, &resp_headers);\n    if (aos_status_is_ok(s)) {\n        aos_list_for_each_entry(oss_list_multipart_upload_content_t, content, &params->upload_list, node) {\n            oss_abort_multipart_upload(options, &bucket, &content->key, &content->upload_id, &resp_headers);\n        }\n    }\n\n    /* delete test bucket */\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    oss_delete_bucket(options, &bucket, &resp_headers);\n    apr_sleep(apr_time_from_sec(3));\n\n    aos_pool_destroy(p);\n}\n\nstatic int aos_curl_http_transport_perform_random_failure(aos_http_transport_t *t_)\n{\n    aos_curl_http_transport_t *t = (aos_curl_http_transport_t *)(t_);\n    int ret = aos_curl_http_transport_perform(t_);\n    if (rand() % 4 == 0) {\n        t->controller->error_code = AOSE_INTERNAL_ERROR;\n        t->controller->reason = \"Internal error for test\"; \n        ret = t->controller->error_code;\n    }\n    return ret;\n}\n\nstatic int aos_curl_http_transport_perform_bad_crc64(aos_http_transport_t *t_)\n{\n    aos_curl_http_transport_t *t = (aos_curl_http_transport_t *)(t_);\n    int ret = aos_curl_http_transport_perform(t_);\n    t->resp->crc64 = rand();\n    return ret;\n}\n\n// ---------------------------- UT ----------------------------\n\nvoid test_resumable_oss_get_thread_num(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int32_t thread_num = 0;\n\n    aos_pool_create(&p, NULL);\n    \n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 1024, AOS_FALSE, NULL);\n    thread_num = oss_get_thread_num(clt_params);\n    CuAssertIntEquals(tc, 1024, thread_num);\n\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 0, AOS_FALSE, NULL);\n    thread_num = oss_get_thread_num(clt_params);\n    CuAssertIntEquals(tc, 1, thread_num);\n\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, -1, AOS_FALSE, NULL);\n    thread_num = oss_get_thread_num(clt_params);\n    CuAssertIntEquals(tc, 1, thread_num);\n\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 1025, AOS_FALSE, NULL);\n    thread_num = oss_get_thread_num(clt_params);\n    CuAssertIntEquals(tc, 1, thread_num);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_oss_get_thread_num ok\\n\");\n}\n\nvoid test_resumable_oss_get_checkpoint_path(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    aos_string_t file_path = aos_null_string;\n    aos_string_t checkpoint_path = aos_null_string;\n\n    aos_pool_create(&p, NULL);\n\n    aos_str_set(&file_path, test_file);\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 1024, AOS_FALSE, NULL);\n    oss_get_upload_checkpoint_path(clt_params, &file_path, p, &checkpoint_path);\n    CuAssertTrue(tc, checkpoint_path.data == NULL);\n    CuAssertTrue(tc, checkpoint_path.len == 0);\n    oss_get_download_checkpoint_path(clt_params, &file_path, p, &checkpoint_path);\n    CuAssertTrue(tc, checkpoint_path.data == NULL);\n    CuAssertTrue(tc, checkpoint_path.len == 0);\n\n    aos_str_set(&checkpoint_path, \"BingWallpaper-2017-01-19.jpg.checkpoint\");\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 1024, AOS_TRUE, checkpoint_path.data);\n    oss_get_upload_checkpoint_path(clt_params, &file_path, p, &checkpoint_path);\n    CuAssertStrEquals(tc, \"BingWallpaper-2017-01-19.jpg.checkpoint\", checkpoint_path.data);\n    oss_get_download_checkpoint_path(clt_params, &file_path, p, &checkpoint_path);\n    CuAssertStrEquals(tc, \"BingWallpaper-2017-01-19.jpg.checkpoint\", checkpoint_path.data);\n\n    // win path\n    aos_str_set(&file_path, \"D:\\\\work\\\\oss\\\\BingWallpaper-2017-01-19.jpg\");\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 1024, AOS_TRUE, NULL);\n    oss_get_upload_checkpoint_path(clt_params, &file_path, p, &checkpoint_path);\n    CuAssertStrEquals(tc, \"D:\\\\work\\\\oss\\\\BingWallpaper-2017-01-19.jpg.ucp\", checkpoint_path.data);\n    oss_get_download_checkpoint_path(clt_params, &file_path, p, &checkpoint_path);\n    CuAssertStrEquals(tc, \"D:\\\\work\\\\oss\\\\BingWallpaper-2017-01-19.jpg.dcp\", checkpoint_path.data);\n\n    aos_str_set(&checkpoint_path, \"\");\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 1024, AOS_TRUE, NULL);\n    oss_get_upload_checkpoint_path(clt_params, &file_path, p, &checkpoint_path);\n    CuAssertStrEquals(tc, \"D:\\\\work\\\\oss\\\\BingWallpaper-2017-01-19.jpg.ucp\", checkpoint_path.data);\n\n    aos_str_set(&checkpoint_path, \"\");\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 1024, AOS_TRUE, NULL);\n    oss_get_download_checkpoint_path(clt_params, &file_path, p, &checkpoint_path);\n    CuAssertStrEquals(tc, \"D:\\\\work\\\\oss\\\\BingWallpaper-2017-01-19.jpg.dcp\", checkpoint_path.data);\n\n    // linux path\n    aos_str_set(&file_path, \"/home/tim/work/oss/BingWallpaper-2017-01-19.jpg\");\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 1024, AOS_TRUE, NULL);\n    oss_get_upload_checkpoint_path(clt_params, &file_path, p, &checkpoint_path);\n    CuAssertStrEquals(tc, \"/home/tim/work/oss/BingWallpaper-2017-01-19.jpg.ucp\", checkpoint_path.data);\n    oss_get_download_checkpoint_path(clt_params, &file_path, p, &checkpoint_path);\n    CuAssertStrEquals(tc, \"/home/tim/work/oss/BingWallpaper-2017-01-19.jpg.dcp\", checkpoint_path.data);\n\n    aos_str_set(&checkpoint_path, \"\");\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 1024, AOS_TRUE, NULL);\n    oss_get_upload_checkpoint_path(clt_params, &file_path, p, &checkpoint_path);\n    CuAssertStrEquals(tc, \"/home/tim/work/oss/BingWallpaper-2017-01-19.jpg.ucp\", checkpoint_path.data);\n\n    aos_str_set(&checkpoint_path, \"\");\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 1024, AOS_TRUE, NULL);\n    oss_get_download_checkpoint_path(clt_params, &file_path, p, &checkpoint_path);\n    CuAssertStrEquals(tc, \"/home/tim/work/oss/BingWallpaper-2017-01-19.jpg.dcp\", checkpoint_path.data);\n\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_oss_get_checkpoint_path ok\\n\");\n}\n\nvoid test_resumable_oss_get_file_info(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t file_path = aos_null_string;\n    char *local_file = \"test_resumable_oss_get_file_info.txt\";\n    apr_finfo_t finfo;\n    int rv;\n\n    aos_pool_create(&p, NULL);\n\n    // invalid path\n    aos_str_set(&file_path, \"\");\n    rv = oss_get_file_info(&file_path, p, &finfo);\n    CuAssertTrue(tc, APR_STATUS_IS_ENOENT(rv));\n\n    // file not exist\n    aos_str_set(&file_path, \"/uvwxyz/abchij/test.udp\");\n    rv = oss_get_file_info(&file_path, p, &finfo);\n    CuAssertTrue(tc, APR_STATUS_IS_ENOENT(rv));\n\n    // empty file\n    rv = fill_test_file(p, local_file, \"\");\n    CuAssertIntEquals(tc, APR_SUCCESS, rv);\n    aos_str_set(&file_path, local_file);\n    rv = oss_get_file_info(&file_path, p, &finfo);\n    CuAssertIntEquals(tc, AOSE_OK, rv);\n    CuAssertTrue(tc, 0 == finfo.size);\n\n    // normal\n    rv = make_random_file(p, local_file, 1024);\n    CuAssertIntEquals(tc, APR_SUCCESS, rv);\n    rv = oss_get_file_info(&file_path, p, &finfo);\n    CuAssertIntEquals(tc, AOSE_OK, rv);\n    CuAssertTrue(tc, 1024 == finfo.size);\n\n    apr_file_remove(local_file, p);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_oss_get_file_info ok\\n\");\n}\n\nvoid test_resumable_oss_does_file_exist(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t file_path = aos_null_string;\n    char *local_file = \"test_resumable_oss_does_file_exist.txt\";\n    int rv;\n\n    aos_pool_create(&p, NULL);\n\n    // invalid path\n    aos_str_set(&file_path, \"\");\n    rv = oss_does_file_exist(&file_path, p);\n    CuAssertTrue(tc, !rv);\n\n    // file not exist\n    aos_str_set(&file_path, \"/uvwxyz/abchij/test.udp\");\n    rv = oss_does_file_exist(&file_path, p);\n    CuAssertTrue(tc, !rv);\n\n    // normal\n    rv = make_random_file(p, local_file, 1024);\n    CuAssertIntEquals(tc, APR_SUCCESS, rv);\n    aos_str_set(&file_path, local_file);\n    rv = oss_does_file_exist(&file_path, p);\n    CuAssertTrue(tc, rv);\n\n    apr_file_remove(local_file, p);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_oss_does_file_exist ok\\n\");\n}\n\nvoid test_resumable_oss_dump_checkpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t file_path = aos_null_string;\n    char *cp_file = \"test_resumable_oss_dump_checkpoint.ucp\";\n    oss_checkpoint_t *cp;\n    apr_finfo_t finfo;\n    aos_string_t upload_id;\n    int64_t part_size;\n    int rv;\n\n    aos_pool_create(&p, NULL);\n\n    // build checkpoint\n    finfo.size = 510598;\n    finfo.mtime = 1459922563;  \n    aos_str_set(&file_path, \"D:\\\\work\\\\oss\\\\BingWallpaper-2017-01-19.jpg\");\n    aos_str_set(&upload_id, \"0004B9894A22E5B1888A1E29F8236E2D\");\n    part_size = 1024 * 100;\n\n    cp = oss_create_checkpoint_content(p);\n    oss_build_upload_checkpoint(p, cp, &file_path, &finfo, &upload_id, part_size);\n\n    aos_str_set(&file_path, cp_file);\n    rv = oss_open_checkpoint_file(p, &file_path, cp); \n    CuAssertIntEquals(tc, APR_SUCCESS, rv);\n\n    rv = oss_dump_checkpoint(p, cp);\n    CuAssertIntEquals(tc, AOSE_OK, rv);\n    apr_file_close(cp->thefile);\n\n    // write failed\n    rv = apr_file_open(&cp->thefile, file_path.data, APR_READ, APR_UREAD | APR_GREAD, p);\n    CuAssertIntEquals(tc, APR_SUCCESS, rv);\n\n    rv = oss_dump_checkpoint(p, cp);\n    CuAssertIntEquals(tc, AOSE_FILE_TRUNC_ERROR, rv);\n    apr_file_close(cp->thefile);\n\n    apr_file_remove(cp_file, p);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_oss_dump_checkpoint ok\\n\");\n}\n\nvoid test_resumable_oss_load_checkpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t file_path = aos_null_string;\n    char *cp_file = \"test_resumable_oss_load_checkpoint.ucp\";\n    oss_checkpoint_t *cp;\n    oss_checkpoint_t *cp_l;\n    apr_finfo_t finfo;\n    aos_string_t upload_id;\n    int64_t part_size;\n    int rv;\n\n    aos_pool_create(&p, NULL);\n\n    // build checkpoint\n    finfo.size = 510598;\n    finfo.mtime = 1459922563;  \n    aos_str_set(&file_path, \"D:\\\\work\\\\oss\\\\BingWallpaper-2017-01-19.jpg\");\n    aos_str_set(&upload_id, \"0004B9894A22E5B1888A1E29F8236E2D\");\n    part_size = 1024 * 100;\n\n    cp = oss_create_checkpoint_content(p);\n    oss_build_upload_checkpoint(p, cp, &file_path, &finfo, &upload_id, part_size);\n\n    aos_str_set(&file_path, cp_file);\n    rv = oss_open_checkpoint_file(p, &file_path, cp); \n    CuAssertIntEquals(tc, APR_SUCCESS, rv);\n\n    // dump\n    rv = oss_dump_checkpoint(p, cp);\n    CuAssertIntEquals(tc, AOSE_OK, rv);\n    apr_file_close(cp->thefile);\n\n    // load\n    cp_l = oss_create_checkpoint_content(p);\n    rv = oss_load_checkpoint(p, &file_path, cp_l);\n    CuAssertIntEquals(tc, AOSE_OK, rv);\n\n    CuAssertStrEquals(tc, cp->md5.data, cp_l->md5.data);\n    CuAssertIntEquals(tc, cp->cp_type, cp_l->cp_type);\n    CuAssertStrEquals(tc, cp->upload_id.data, cp_l->upload_id.data);\n    CuAssertIntEquals(tc, cp->part_num, cp_l->part_num);\n    CuAssertTrue(tc, cp->part_size == cp_l->part_size);\n\n    // load failed\n    aos_str_set(&file_path, \"/uvwxyz/abchij/test.udp\");\n    rv = oss_load_checkpoint(p, &file_path, cp_l);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, rv);\n\n    // content invalid\n    rv = make_random_file(p, cp_file, 1024);\n    CuAssertIntEquals(tc, APR_SUCCESS, rv);\n    aos_str_set(&file_path, cp_file);\n    rv = oss_load_checkpoint(p, &file_path, cp_l);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, rv);\n\n    apr_file_remove(cp_file, p);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_oss_load_checkpoint ok\\n\");\n}\n\nvoid test_resumable_oss_is_upload_checkpoint_valid(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_string_t file_path = aos_null_string;\n    oss_checkpoint_t *cp;\n    apr_finfo_t finfo;\n    aos_string_t upload_id;\n    int64_t part_size;\n    int rv;\n\n    aos_pool_create(&p, NULL);\n\n    // build checkpoint\n    finfo.size = 510598;\n    finfo.mtime = 1459922563;  \n    aos_str_set(&file_path, \"D:\\\\work\\\\oss\\\\BingWallpaper-2017-01-19.jpg\");\n    aos_str_set(&upload_id, \"0004B9894A22E5B1888A1E29F8236E2D\");\n    part_size = 1024 * 100;\n\n    cp = oss_create_checkpoint_content(p);\n    oss_build_upload_checkpoint(p, cp, &file_path, &finfo, &upload_id, part_size);\n\n    rv = oss_is_upload_checkpoint_valid(p, cp, &finfo);\n    CuAssertTrue(tc, rv);\n\n    finfo.size = 510599;\n    rv = oss_is_upload_checkpoint_valid(p, cp, &finfo);\n    CuAssertTrue(tc, !rv);\n\n    finfo.mtime = 1459922562; \n    rv = oss_is_upload_checkpoint_valid(p, cp, &finfo);\n    CuAssertTrue(tc, !rv);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_oss_is_upload_checkpoint_valid ok\\n\");\n}\n\nvoid test_resumable_checkpoint_xml(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *xml_doc = NULL;\n    oss_checkpoint_t *cp;\n    int64_t part_size = 0;\n    int i = 0;\n    oss_checkpoint_t *cp_actual;\n    const char *xml_doc_expected = \n        \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\"\n        \"<Checkpoint><MD5></MD5><Type>1</Type>\"\n        \"<LocalFile>\"\n        \"<Path>D:\\\\work\\\\oss\\\\BingWallpaper-2017-01-19.jpg</Path><Size>510598</Size>\"\n        \"<LastModified>1459922563</LastModified><MD5>fba9dede5f27731c9771645a39863328</MD5>\"\n        \"</LocalFile>\"\n        \"<Object>\"\n        \"<Key>~/oss/BingWallpaper-2017-01-19.jpg</Key><Size>510598</Size>\"\n        \"<LastModified>Fri, 24 Feb 2012 06:07:48 GMT</LastModified><ETag>0F7230CAA4BE94CCBDC99C5500000000</ETag>\"\n        \"</Object>\"\n        \"<UploadId>0004B9894A22E5B1888A1E29F8236E2D</UploadId>\"\n        \"<CPParts>\"\n        \"<Number>5</Number><Size>102400</Size>\"\n        \"<Parts>\"\n        \"<Part><Index>0</Index><Offset>0</Offset><Size>102400</Size><Completed>1</Completed><ETag></ETag><Crc64>0</Crc64></Part>\"\n        \"<Part><Index>1</Index><Offset>102400</Offset><Size>102400</Size><Completed>1</Completed><ETag></ETag><Crc64>0</Crc64></Part>\"\n        \"<Part><Index>2</Index><Offset>204800</Offset><Size>102400</Size><Completed>1</Completed><ETag></ETag><Crc64>0</Crc64></Part>\"\n        \"<Part><Index>3</Index><Offset>307200</Offset><Size>102400</Size><Completed>1</Completed><ETag></ETag><Crc64>0</Crc64></Part>\"\n        \"<Part><Index>4</Index><Offset>409600</Offset><Size>100998</Size><Completed>1</Completed><ETag></ETag><Crc64>0</Crc64></Part>\"\n        \"</Parts>\"\n        \"</CPParts>\"\n        \"</Checkpoint>\\n\";\n    \n    aos_pool_create(&p, NULL);\n\n    cp = oss_create_checkpoint_content(p);\n    cp->cp_type = OSS_CP_UPLOAD;\n\n    aos_str_set(&cp->file_path, \"D:\\\\work\\\\oss\\\\BingWallpaper-2017-01-19.jpg\");\n    cp->file_size = 510598;\n    cp->file_last_modified = 1459922563;\n    aos_str_set(&cp->file_md5,\"fba9dede5f27731c9771645a39863328\");\n\n    aos_str_set(&cp->object_name, \"~/oss/BingWallpaper-2017-01-19.jpg\");\n    cp->object_size = 510598;\n    aos_str_set(&cp->object_last_modified, \"Fri, 24 Feb 2012 06:07:48 GMT\");\n    aos_str_set(&cp->object_etag, \"0F7230CAA4BE94CCBDC99C5500000000\");\n\n    aos_str_set(&cp->upload_id, \"0004B9894A22E5B1888A1E29F8236E2D\");\n\n    part_size = 1024 * 100;\n    oss_get_part_size(cp->file_size, &part_size);\n    cp->part_size = part_size;\n    for (i = 0; i * part_size < cp->file_size; i++) {\n        cp->parts[i].index = i;\n        cp->parts[i].offset = i * part_size;\n        cp->parts[i].size = aos_min(part_size, (cp->file_size - i * part_size));\n        cp->parts[i].completed = AOS_TRUE;\n        aos_str_set(& cp->parts[i].etag, \"\");\n    }\n    cp->part_num = i;\n\n    xml_doc = oss_build_checkpoint_xml(p ,cp);\n\n    CuAssertStrEquals(tc, xml_doc_expected, xml_doc);\n\n    cp_actual = oss_create_checkpoint_content(p);\n    oss_checkpoint_parse_from_body(p, xml_doc, cp_actual);\n\n    CuAssertIntEquals(tc, OSS_CP_UPLOAD, cp_actual->cp_type);\n    CuAssertStrEquals(tc, \"\", cp_actual->md5.data);\n\n    CuAssertStrEquals(tc, \"D:\\\\work\\\\oss\\\\BingWallpaper-2017-01-19.jpg\", cp_actual->file_path.data);\n    CuAssertTrue(tc, 510598 == cp_actual->file_size);\n    CuAssertTrue(tc, 1459922563 == cp_actual->file_last_modified);\n    CuAssertStrEquals(tc, \"fba9dede5f27731c9771645a39863328\", cp_actual->file_md5.data);\n\n    CuAssertStrEquals(tc, \"~/oss/BingWallpaper-2017-01-19.jpg\", cp_actual->object_name.data);\n    CuAssertTrue(tc, 510598 == cp_actual->file_size);\n    CuAssertStrEquals(tc, \"Fri, 24 Feb 2012 06:07:48 GMT\", cp_actual->object_last_modified.data);\n    CuAssertStrEquals(tc, \"0F7230CAA4BE94CCBDC99C5500000000\", cp_actual->object_etag.data);\n\n    CuAssertStrEquals(tc, \"0004B9894A22E5B1888A1E29F8236E2D\", cp_actual->upload_id.data);\n\n    CuAssertIntEquals(tc, 5, cp_actual->part_num);\n    CuAssertTrue(tc, 102400 == cp_actual->part_size);\n\n    CuAssertIntEquals(tc, 4, cp_actual->parts[4].index);\n    CuAssertTrue(tc, 409600 == cp_actual->parts[4].offset);\n    CuAssertTrue(tc, 100998 == cp_actual->parts[4].size);\n    CuAssertIntEquals(tc, 1, cp_actual->parts[4].completed);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_checkpoint_xml ok\\n\");\n}\n\n// ---------------------------- FT ----------------------------\n\nvoid test_resumable_upload_without_checkpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_without_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int64_t content_length = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // upload object\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_FALSE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_without_checkpoint ok\\n\");\n}\n\nvoid test_resumable_upload_partsize(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_partsize.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int64_t content_length = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // upload object with part size 10MB\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 1024 * 10, 3, AOS_FALSE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    // upload object with part size 200K\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 200, 3, AOS_FALSE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_partsize ok\\n\");\n}\n\nvoid test_resumable_upload_threads(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_threads.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int64_t content_length = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // upload object with thread 1\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 1, AOS_FALSE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    // upload object with thread 5\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 200, 5, AOS_FALSE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    // upload object with thread 10\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 10, AOS_FALSE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_threads ok\\n\");\n}\n\nvoid test_resumable_upload_with_checkpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int64_t content_length = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // upload object\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_with_checkpoint ok\\n\");\n}\n\nvoid test_resumable_upload_with_checkpoint_format_invalid(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_checkpoint_format_invalid.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int64_t content_length = 0;\n    aos_string_t checkpoint_path;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // generate checkpoint\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    oss_get_upload_checkpoint_path(clt_params, &filename, p, &checkpoint_path);\n    fill_test_file(p, checkpoint_path.data, \"HiOSS\");\n\n    // upload object\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_with_checkpoint_format_invalid ok\\n\");\n}\n\nvoid test_resumable_upload_with_checkpoint_path_invalid(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    char *cp_path = \"/uvwxyz/abchij/test.udp\";\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // upload\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, cp_path);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertStrEquals(tc, \"OpenFileFail\", s->error_code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_with_checkpoint_path_invalid ok\\n\");\n}\n\nvoid test_resumable_upload_with_file_size_unavailable(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_file_size_unavailable.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int64_t content_length = 0;\n    aos_string_t checkpoint_path;\n    char *xml_doc = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\"\n        \"<Checkpoint>\"\n        \"<MD5></MD5><Type>1</Type>\"\n        \"<LocalFile>\"\n        \"<Path>/home/baiyb/work/tmp/aliyun-oss-c-sdk-doing/BingWallpaper-2017-01-19.jpg</Path>\"\n        \"<Size>0</Size><LastModified>1484790044000000</LastModified><MD5></MD5>\"\n        \"</LocalFile>\"\n        \"<Object>\"\n        \"<Key></Key><Size>0</Size><LastModified></LastModified><ETag></ETag>\"\n        \"</Object>\"\n        \"<UploadId>750FBF7EB9104D4F8DDB74F0432A821F</UploadId>\"\n        \"<CPParts>\"\n        \"<Number>8</Number><Size>102400</Size>\"\n        \"<Parts>\"\n        \"<Part><Index>0</Index><Offset>0</Offset><Size>102400</Size><Completed>1</Completed><ETag>&quot;06336E9660D3D9610C79835D27F4D2EF&quot;</ETag></Part>\"\n        \"<Part><Index>1</Index><Offset>102400</Offset><Size>102400</Size><Completed>1</Completed><ETag>&quot;D1C009C43EAA5E64B6B794E47BA37917&quot;</ETag></Part>\"\n        \"<Part><Index>2</Index><Offset>204800</Offset><Size>102400</Size><Completed>1</Completed><ETag>&quot;073D2D906CEB0FADA1F2BA8A0BA54C1D&quot;</ETag></Part>\"\n        \"<Part><Index>3</Index><Offset>307200</Offset><Size>102400</Size><Completed>1</Completed><ETag>&quot;7BA3B455E7B30D734F2CA29548E8BC56&quot;</ETag></Part>\"\n        \"<Part><Index>4</Index><Offset>409600</Offset><Size>102400</Size><Completed>1</Completed><ETag>&quot;296F06C36E3746CD2A28824D3B4F0648&quot;</ETag></Part>\"\n        \"<Part><Index>5</Index><Offset>512000</Offset><Size>102400</Size><Completed>1</Completed><ETag>&quot;06A0A19EC60DD4F51344D900BE543C53&quot;</ETag></Part>\"\n        \"<Part><Index>6</Index><Offset>614400</Offset><Size>102400</Size><Completed>1</Completed><ETag>&quot;B7CE941E6AC00B6B3423572A87EA0B67&quot;</ETag></Part>\"\n        \"<Part><Index>7</Index><Offset>716800</Offset><Size>52886</Size><Completed>1</Completed><ETag>&quot;AE5EEAEBB54232A6F71743AA45A32DA9&quot;</ETag></Part>\"\n        \"</Parts>\"\n        \"</CPParts>\"\n        \"</Checkpoint>\";\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // generate checkpoint\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    oss_get_upload_checkpoint_path(clt_params, &filename, p, &checkpoint_path);\n    fill_test_file(p, checkpoint_path.data, xml_doc);\n\n    // upload object\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_with_file_size_unavailable ok\\n\");\n}\n\nvoid test_resumable_upload_with_uploadid_unavailable(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_uploadid_unavailable.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    apr_finfo_t finfo;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    char *cp_path = \"test.ucp\";\n    char *xml_doc = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\"\n        \"<Checkpoint><MD5></MD5><Type>1</Type><LocalFile>\"\n        \"<Path>oss_c_sdk_test/BingWallpaper-2017-01-19.jpg</Path>\"\n        \"<Size>769686</Size><LastModified>%\"\n        APR_INT64_T_FMT\n        \"</LastModified><MD5></MD5></LocalFile>\"\n        \"<Object><Key></Key><Size>0</Size><LastModified></LastModified><ETag></ETag></Object>\"\n        \"<UploadId>F5F901B64DF34BEDA60C9B2B0984B</UploadId>\"\n        \"<CPParts><Number>1</Number><Size>1048576</Size>\"\n        \"<Parts><Part><Index>0</Index><Offset>0</Offset><Size>769686</Size><Completed>0</Completed><ETag></ETag></Part>\"\n        \"</Parts></CPParts></Checkpoint>\";\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // generate checkpoint\n    oss_get_file_info(&filename, p, &finfo);\n    xml_doc = apr_psprintf(p, xml_doc, finfo.mtime);\n    fill_test_file(p, cp_path, xml_doc);\n\n    // upload object\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 1024, 1, AOS_TRUE, cp_path);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 404, s->code);\n    //CuAssertStrEquals(tc, \"NoSuchUpload\", s->error_code);\n\n    apr_file_remove(cp_path, p);\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_with_uploadid_unavailable ok\\n\");\n}\n\nvoid test_resumable_upload_with_uploadid_available(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    aos_pool_t *pool = NULL;\n    char *object_name = \"test_resumable_upload_with_uploadid_available.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int64_t content_length = 0;\n    aos_string_t checkpoint_path;\n    aos_string_t upload_id;\n    char *xml_doc = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\"\n        \"<Checkpoint>\"\n        \"<MD5></MD5><Type>1</Type>\"\n        \"<LocalFile>\"\n        \"<Path>/home/baiyb/work/tmp/aliyun-oss-c-sdk-doing/BingWallpaper-2017-01-19.jpg</Path>\"\n        \"<Size>769686</Size><LastModified>1484790044000000</LastModified><MD5></MD5>\"\n        \"</LocalFile>\"\n        \"<Object>\"\n        \"<Key></Key><Size>0</Size><LastModified></LastModified><ETag></ETag>\"\n        \"</Object>\"\n        \"<UploadId>%.*s</UploadId>\"\n        \"<CPParts>\"\n        \"<Number>8</Number><Size>102400</Size>\"\n        \"<Parts>\"\n        \"<Part><Index>0</Index><Offset>0</Offset><Size>102400</Size><Completed>0</Completed><ETag></ETag></Part>\"\n        \"<Part><Index>1</Index><Offset>102400</Offset><Size>102400</Size><Completed>0</Completed><ETag></ETag></Part>\"\n        \"<Part><Index>2</Index><Offset>204800</Offset><Size>102400</Size><Completed>0</Completed><ETag></ETag></Part>\"\n        \"<Part><Index>3</Index><Offset>307200</Offset><Size>102400</Size><Completed>0</Completed><ETag></ETag></Part>\"\n        \"<Part><Index>4</Index><Offset>409600</Offset><Size>102400</Size><Completed>0</Completed><ETag></ETag></Part>\"\n        \"<Part><Index>5</Index><Offset>512000</Offset><Size>102400</Size><Completed>0</Completed><ETag></ETag></Part>\"\n        \"<Part><Index>6</Index><Offset>614400</Offset><Size>102400</Size><Completed>0</Completed><ETag></ETag></Part>\"\n        \"<Part><Index>7</Index><Offset>716800</Offset><Size>52886</Size><Completed>0</Completed><ETag></ETag></Part>\"\n        \"</Parts>\"\n        \"</CPParts>\"\n        \"</Checkpoint>\";\n\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // generate upload id\n    aos_pool_create(&p, NULL);\n    aos_pool_create(&pool, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_init_multipart_upload(options, &bucket, &object, &upload_id, headers, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    xml_doc = apr_psprintf(pool, xml_doc, upload_id.len, upload_id.data);\n    aos_pool_destroy(p);\n\n    // generate checkpoint\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    oss_get_upload_checkpoint_path(clt_params, &filename, p, &checkpoint_path);\n    fill_test_file(p, checkpoint_path.data, xml_doc);\n\n    // upload object\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n    aos_pool_destroy(pool);\n\n    printf(\"test_resumable_upload_with_uploadid_available ok\\n\");\n}\n\nvoid test_resumable_upload_with_file_path_invalid(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_file_path_invalid.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, \"/uvwxyz/abchij/test.jpg\");\n\n    // upload\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 1024, 1, AOS_TRUE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertStrEquals(tc, \"OpenFileFail\", s->error_code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_with_file_path_invalid ok\\n\");\n}\n\nvoid test_resumable_upload_callback_without_checkpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_callback_without_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int64_t content_length = 0;\n    aos_buf_t *content;\n    char b64_buf[1024];\n    int b64_len = 64;\n    char *buf = NULL;\n    int64_t len = 0;\n    int64_t size = 0;\n    int64_t pos = 0;\n    char callback[1024];\n    char *callback_fmt =  \"{\"\n        \"\\\"callbackUrl\\\":\\\"%s\\\",\"\n        \"\\\"callbackHost\\\":\\\"oss-cn-hangzhou.aliyuncs.com\\\",\"\n        \"\\\"callbackBody\\\":\\\"bucket=${bucket}&object=${object}&size=${size}&mimeType=${mimeType}\\\",\"\n        \"\\\"callbackBodyType\\\":\\\"application/x-www-form-urlencoded\\\"\"\n        \"}\";\n    char *callback_var =  \"{\"\n        \"\\\"x:var1\\\":\\\"value1\\\",\"\n        \"\\\"x:var2\\\":\\\"value2\\\"\"\n        \"}\";\n\n    sprintf(callback, callback_fmt, TEST_CALLBACK_URL);\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    headers = aos_table_make(p, 2);\n    b64_len = aos_base64_encode((unsigned char*)callback, strlen(callback), b64_buf);\n    b64_buf[b64_len] = '\\0';\n    apr_table_set(headers, OSS_CALLBACK, apr_pstrdup(p, b64_buf));\n    b64_len = aos_base64_encode((unsigned char*)callback_var, strlen(callback_var), b64_buf);\n    b64_buf[b64_len] = '\\0';\n    apr_table_set(headers, OSS_CALLBACK_VAR, apr_pstrdup(p, b64_buf));\n\n    // upload object\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_FALSE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    /* get buffer len */\n    len = aos_buf_list_len(&resp_body);\n    buf = (char *)aos_pcalloc(p, (apr_size_t)(len + 1));\n    buf[len] = '\\0';\n\n    /* copy buffer content to memory */\n    aos_list_for_each_entry(aos_buf_t, content, &resp_body, node) {\n        size = aos_buf_size(content);\n        memcpy(buf + pos, content->pos, (size_t)size);\n        pos += size;\n    }\n    CuAssertStrEquals(tc, buf, \"{\\\"Status\\\":\\\"OK\\\"}\");\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_callback_without_checkpoint ok\\n\");\n}\n\nvoid test_resumable_upload_progress_without_checkpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_progress_without_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int64_t content_length = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // upload object\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_FALSE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, percentage, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_progress_without_checkpoint ok\\n\");\n}\n\nvoid test_resumable_upload_callback_with_checkpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_callback_with_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int64_t content_length = 0;\n    aos_buf_t *content;\n    char b64_buf[1024];\n    int b64_len = 64;\n    char *buf = NULL;\n    int64_t len = 0;\n    int64_t size = 0;\n    int64_t pos = 0;\n    char callback[1024];\n    char *callback_fmt =  \"{\"\n        \"\\\"callbackUrl\\\":\\\"%s\\\",\"\n        \"\\\"callbackHost\\\":\\\"oss-cn-hangzhou.aliyuncs.com\\\",\"\n        \"\\\"callbackBody\\\":\\\"bucket=${bucket}&object=${object}&size=${size}&mimeType=${mimeType}\\\",\"\n        \"\\\"callbackBodyType\\\":\\\"application/x-www-form-urlencoded\\\"\"\n        \"}\";\n    char *callback_var =  \"{\"\n        \"\\\"x:var1\\\":\\\"value1\\\",\"\n        \"\\\"x:var2\\\":\\\"value2\\\"\"\n        \"}\";\n    sprintf(callback, callback_fmt, TEST_CALLBACK_URL);\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    headers = aos_table_make(p, 2);\n    b64_len = aos_base64_encode((unsigned char*)callback, strlen(callback), b64_buf);\n    b64_buf[b64_len] = '\\0';\n    apr_table_set(headers, OSS_CALLBACK, apr_pstrdup(p, b64_buf));\n    b64_len = aos_base64_encode((unsigned char*)callback_var, strlen(callback_var), b64_buf);\n    b64_buf[b64_len] = '\\0';\n    apr_table_set(headers, OSS_CALLBACK_VAR, apr_pstrdup(p, b64_buf));\n\n    // upload object\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    /* get buffer len */\n    len = aos_buf_list_len(&resp_body);\n    buf = (char *)aos_pcalloc(p, (apr_size_t)(len + 1));\n    buf[len] = '\\0';\n\n    /* copy buffer content to memory */\n    aos_list_for_each_entry(aos_buf_t, content, &resp_body, node) {\n        size = aos_buf_size(content);\n        memcpy(buf + pos, content->pos, (size_t)size);\n        pos += size;\n    }\n    CuAssertStrEquals(tc, buf, \"{\\\"Status\\\":\\\"OK\\\"}\");\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_callback_with_checkpoint ok\\n\");\n}\n\nvoid test_resumable_upload_progress_with_checkpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_progress_with_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int64_t content_length = 0;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // upload object\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, percentage, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_progress_with_checkpoint ok\\n\");\n}\n\nvoid test_resumable_upload_content_type(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_content_type.ts\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int64_t content_length = 0;\n    char *content_type = NULL;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n\n    // upload object\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    s = oss_resumable_upload_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    aos_pool_destroy(p);\n\n    // head object\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\n\n    content_type = (char*)(apr_table_get(resp_headers, OSS_CONTENT_TYPE));\n    CuAssertStrEquals(tc, \"video/MP2T\", content_type);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_upload_content_type ok\\n\");\n}\n\nvoid test_resumable_download_without_checkpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_without_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    unsigned long content_length;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    // download\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_FALSE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(filename.data));\n\n    remove(filename.data);\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_without_checkpoint ok\\n\");\n}\n\nvoid test_resumable_download_with_checkpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    unsigned long content_length;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    // download\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(filename.data));\n\n    remove(filename.data);\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_with_checkpoint ok\\n\");\n}\n\n\nvoid test_resumable_download_without_checkpoint_target_invalid(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_without_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, \"a/b/c/d/e/f/g/h/i/j/k/l/m/n/~!@#$%^&*()\");\n\n    // download\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_FALSE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_without_checkpoint_target_invalid ok\\n\");\n}\n\nvoid test_resumable_download_with_checkpoint_target_invalid(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, \"a/b/c/d/e/f/g/h/i/j/k/l/m/n/~!@#$%^&*()\");\n\n    // download\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertStrEquals(tc, AOS_OPEN_FILE_ERROR_CODE, s->error_code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_with_checkpoint_target_invalid ok\\n\");\n}\n\n\nvoid test_resumable_download_partsize(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_partsize.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    unsigned long content_length;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    // download\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 1024 * 10, 3, AOS_FALSE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(filename.data));\n\n    remove(filename.data);\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_partsize ok\\n\");\n}\n\nvoid test_resumable_download_small_partsize(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_partsize.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    unsigned long content_length;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    // download\n    clt_params = oss_create_resumable_clt_params_content(p, 64, 16, AOS_FALSE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(filename.data));\n\n    remove(filename.data);\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_small_partsize ok\\n\");\n}\n\n\nvoid test_resumable_download_threads(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_threads.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    unsigned long content_length;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    // download with thread 1\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 1, AOS_FALSE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(filename.data));\n\n    remove(filename.data);\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_threads ok\\n\");\n}\n\nvoid test_resumable_download_with_checkpoint_format_invalid(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_checkpoint_format_invalid.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_string_t tmp_filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    unsigned long content_length;\n    aos_string_t checkpoint_path;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n    \n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n \n    // generate checkpoint\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    oss_get_download_checkpoint_path(clt_params, &filename, p, &checkpoint_path);\n    fill_test_file(p, checkpoint_path.data, \"HiOSS\");\n    oss_get_temporary_file_name(p, &filename, &tmp_filename);\n    make_random_file(p, tmp_filename.data, content_length);\n\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    CuAssertTrue(tc, content_length == get_file_size(filename.data));\n\n    remove(tmp_filename.data);\n    remove(filename.data);\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_with_checkpoint_format_invalid ok\\n\");\n}\n\nvoid test_resumable_download_with_checkpoint_info_invalid(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_checkpoint_format_invalid.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_string_t tmp_filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    unsigned long content_length;\n    aos_string_t checkpoint_path;\n    const char *object_last_modified = NULL;\n    const char *object_etag = NULL;\n    oss_checkpoint_t *checkpoint = NULL;\n    int rv;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n    \n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    object_last_modified = apr_table_get(resp_headers, \"Last-Modified\");\n    object_etag = apr_table_get(resp_headers, \"ETag\");\n \n    // generate checkpoint\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    oss_get_download_checkpoint_path(clt_params, &filename, p, &checkpoint_path);\n    checkpoint = oss_create_checkpoint_content(p);\n    oss_build_download_checkpoint(p, checkpoint, &filename, object.data, \n            content_length, object_last_modified, object_etag, 1024 * 99);\n    rv = oss_open_checkpoint_file(p, &checkpoint_path, checkpoint);\n    CuAssertIntEquals(tc, APR_SUCCESS, rv);\n    rv = oss_dump_checkpoint(p, checkpoint);\n    CuAssertIntEquals(tc, AOSE_OK, rv);\n    apr_file_close(checkpoint->thefile);\n\n    oss_get_temporary_file_name(p, &filename, &tmp_filename);\n    make_random_file(p, tmp_filename.data, content_length);\n\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    CuAssertTrue(tc, content_length == get_file_size(filename.data));\n\n    remove(tmp_filename.data);\n    remove(filename.data);\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_with_checkpoint_info_invalid ok\\n\");\n}\n\n\nvoid test_resumable_download_with_checkpoint_info_valid(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_checkpoint_format_invalid.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_string_t tmp_filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    unsigned long content_length;\n    const char *object_last_modified = NULL;\n    const char *object_etag = NULL;\n    aos_string_t checkpoint_path;\n    oss_checkpoint_t *checkpoint = NULL;\n    int rv;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n    \n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    object_last_modified = apr_table_get(resp_headers, \"Last-Modified\");\n    object_etag = apr_table_get(resp_headers, \"ETag\");\n \n    // generate checkpoint\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    oss_get_download_checkpoint_path(clt_params, &filename, p, &checkpoint_path);\n    checkpoint = oss_create_checkpoint_content(p);\n    oss_build_download_checkpoint(p, checkpoint, &filename, object.data, \n            content_length, object_last_modified, object_etag, 1024 * 100);\n    rv = oss_open_checkpoint_file(p, &checkpoint_path, checkpoint);\n    CuAssertIntEquals(tc, APR_SUCCESS, rv);\n    rv = oss_dump_checkpoint(p, checkpoint);\n    CuAssertIntEquals(tc, AOSE_OK, rv);\n    apr_file_close(checkpoint->thefile);\n\n\n    oss_get_temporary_file_name(p, &filename, &tmp_filename);\n    make_random_file(p, tmp_filename.data, content_length);\n\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    CuAssertTrue(tc, content_length == get_file_size(filename.data));\n\n    remove(tmp_filename.data);\n    remove(filename.data);\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_with_checkpoint_info_valid ok\\n\");\n}\n\nvoid test_resumable_download_with_checkpoint_path_invalid(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_checkpoint_format_invalid.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    char *cp_path = \"/uvwxyz/abchij/test.udp\";\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    // generate checkpoint\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, cp_path);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertStrEquals(tc, \"OpenFileFail\", s->error_code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_with_checkpoint_path_invalid ok\\n\");\n}\n\nvoid test_resumable_download_with_tmpfile_not_found(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    unsigned long content_length;\n    aos_string_t checkpoint_path;\n    const char *object_last_modified;\n    const char *object_etag;\n    oss_checkpoint_t *checkpoint = NULL;\n    int rv;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    object_last_modified = apr_table_get(resp_headers, \"Last-Modified\");\n    object_etag = apr_table_get(resp_headers, \"ETag\");\n \n    // generate checkpoint\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    oss_get_download_checkpoint_path(clt_params, &filename, p, &checkpoint_path);\n    checkpoint = oss_create_checkpoint_content(p);\n    oss_build_download_checkpoint(p, checkpoint, &filename, object.data, \n            content_length, object_last_modified, object_etag, 1024 * 100);\n    rv = oss_open_checkpoint_file(p, &checkpoint_path, checkpoint);\n    CuAssertIntEquals(tc, APR_SUCCESS, rv);\n    rv = oss_dump_checkpoint(p, checkpoint);\n    CuAssertIntEquals(tc, AOSE_OK, rv);\n    apr_file_close(checkpoint->thefile);\n\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    CuAssertTrue(tc, content_length == get_file_size(filename.data));\n\n    remove(filename.data);\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_with_tmpfile_not_found ok\\n\");\n}\n\nvoid test_resumable_download_with_tmpfile_invalid(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_string_t tmp_filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    unsigned long content_length;\n    aos_string_t checkpoint_path;\n    const char *object_last_modified;\n    const char *object_etag;\n    oss_checkpoint_t *checkpoint = NULL;\n    int rv;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n    \n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    object_last_modified = apr_table_get(resp_headers, \"Last-Modified\");\n    object_etag = apr_table_get(resp_headers, \"ETag\");\n\n    // generate checkpoint\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    oss_get_download_checkpoint_path(clt_params, &filename, p, &checkpoint_path);\n    checkpoint = oss_create_checkpoint_content(p);\n    oss_build_download_checkpoint(p, checkpoint, &filename, object.data, \n            content_length, object_last_modified, object_etag, 1024 * 100);\n    rv = oss_open_checkpoint_file(p, &checkpoint_path, checkpoint);\n    CuAssertIntEquals(tc, APR_SUCCESS, rv);\n    rv = oss_dump_checkpoint(p, checkpoint);\n    CuAssertIntEquals(tc, AOSE_OK, rv);\n    apr_file_close(checkpoint->thefile);\n\n    //length mismatch\n    oss_get_temporary_file_name(p, &filename, &tmp_filename);\n    make_random_file(p, tmp_filename.data, content_length + 1);\n\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    CuAssertTrue(tc, content_length == get_file_size(filename.data));\n\n    remove(tmp_filename.data);\n    remove(filename.data);\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_with_tmpfile_invalid ok\\n\");\n\n}\n\nvoid test_resumable_download_without_checkpoint_object_not_found(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"/a/b/c/d/e/f/g/h/i/j/k/j/m/n.fake\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    // download\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_FALSE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_without_checkpoint_object_not_found ok\\n\");\n}\n\n\nvoid test_resumable_download_with_checkpoint_object_not_found(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"/a/b/c/d/e/f/g/h/i/j/k/j/m/n.fake\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    // download\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 404, s->code);\n\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_with_checkpoint_object_not_found ok\\n\");\n}\n\n\n\nvoid test_resumable_download_progress_without_checkpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_progress_without_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    unsigned long content_length;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    // download\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_FALSE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, percentage, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(filename.data));\n\n    remove(filename.data);\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_progress_without_checkpoint ok\\n\");\n}\n\nvoid test_resumable_download_progress_with_checkpoint(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_progress_with_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    unsigned long content_length;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    // download\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n        clt_params, percentage, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\n    CuAssertIntEquals(tc, 200, s->code);\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\n    CuAssertTrue(tc, content_length == get_file_size(filename.data));\n\n    remove(filename.data);\n    aos_pool_destroy(p);\n\n    printf(\"test_resumable_download_progress_with_checkpoint ok\\n\");\n}\n\n\nvoid test_resumable_download_without_checkpoint_random_failure(CuTest *tc)\n{\n    int i;\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_without_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int failed_count = 0;\n\n    // mock\n    aos_http_transport_perform_pt old = aos_http_transport_perform;\n    aos_http_transport_perform = aos_curl_http_transport_perform_random_failure;\n\n    // download\n    for (i = 0; i < 20; i++) {\n        aos_pool_create(&p, NULL);\n\n        options = oss_request_options_create(p);\n        init_test_request_options(options, is_cname);\n        headers = aos_table_make(p, 0);\n        aos_str_set(&bucket, TEST_BUCKET_NAME);\n        aos_str_set(&object, object_name);\n        aos_str_set(&filename, object_name);\n\n        clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_FALSE, NULL);\n        s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n                clt_params, NULL, &resp_headers);\n        if (!aos_status_is_ok(s)) {\n            CuAssertStrEquals(tc, \"Internal error for test\", s->error_msg);\n            failed_count++;\n        }\n        aos_pool_destroy(p);\n    }\n    CuAssertTrue(tc, failed_count > 0);\n    // restore mock\n    aos_http_transport_perform = old;\n\n    // continue finish downloading\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    options->ctl->options->enable_crc = 1;\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_FALSE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n            clt_params, NULL, &resp_headers);\n    aos_pool_destroy(p);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    remove(filename.data);\n\n    printf(\"test_resumable_download_without_checkpoint_random_failure ok\\n\");\n}\n\nvoid test_resumable_download_with_checkpoint_random_failure(CuTest *tc)\n{\n    int i;\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n    int failed_count = 0;\n\n    // mock\n    aos_http_transport_perform_pt old = aos_http_transport_perform;\n    aos_http_transport_perform = aos_curl_http_transport_perform_random_failure;\n\n    // download\n    for (i = 0; i < 20; i++) {\n        aos_pool_create(&p, NULL);\n        \n        options = oss_request_options_create(p);\n        init_test_request_options(options, is_cname);\n        headers = aos_table_make(p, 0);\n        aos_str_set(&bucket, TEST_BUCKET_NAME);\n        aos_str_set(&object, object_name);\n        aos_str_set(&filename, object_name);\n\n        clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n        s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n                clt_params, NULL, &resp_headers);\n        if (!aos_status_is_ok(s)) {\n            CuAssertStrEquals(tc, \"Internal error for test\", s->error_msg);\n            failed_count++;\n        }\n        aos_pool_destroy(p);\n    }\n    CuAssertTrue(tc, failed_count > 0);\n    // restore mock\n    aos_http_transport_perform = old;\n\n    // continue finish downloading\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    options->ctl->options->enable_crc = 1;\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n            clt_params, NULL, &resp_headers);\n    aos_pool_destroy(p);\n    CuAssertIntEquals(tc, 200, s->code);\n\n    remove(filename.data);\n\n    printf(\"test_resumable_download_with_checkpoint_random_failure ok\\n\");\n}\n\nvoid test_resumable_download_with_checkpoint_crc64_mismatch(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_resumable_upload_with_checkpoint.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    oss_request_options_t *options = NULL;\n    oss_resumable_clt_params_t *clt_params;\n\n    // mock\n    aos_http_transport_perform_pt old = aos_http_transport_perform;\n    aos_http_transport_perform = aos_curl_http_transport_perform_bad_crc64;\n\n    // download\n    aos_pool_create(&p, NULL);\n\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    options->ctl->options->enable_crc = 1;\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\n    aos_str_set(&object, object_name);\n    aos_str_set(&filename, object_name);\n\n    clt_params = oss_create_resumable_clt_params_content(p, 1024 * 100, 3, AOS_TRUE, NULL);\n    s = oss_resumable_download_file(options, &bucket, &object, &filename, headers, NULL, \n            clt_params, NULL, &resp_headers);\n    CuAssertIntEquals(tc, AOSE_CRC_INCONSISTENT_ERROR, s->code);\n\n    aos_pool_destroy(p);\n    \n    // restore mock\n    aos_http_transport_perform = old;\n\n    remove(filename.data);\n\n    printf(\"test_resumable_download_with_checkpoint_crc64_mismatch ok\\n\");\n}\n\nstatic void test_oss_get_thread_num_negative(CuTest *tc)\n{\n    int ret;\n    ret = oss_get_thread_num(NULL);\n    CuAssertIntEquals(tc, 1, ret);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_get_upload_checkpoint_path_negative(CuTest *tc)\n{\n    aos_string_t checkpoint_path;\n    oss_get_upload_checkpoint_path(NULL, NULL, NULL, NULL);\n    oss_get_upload_checkpoint_path(NULL, NULL, NULL, &checkpoint_path);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_get_download_checkpoint_path_negative(CuTest *tc)\n{\n    aos_string_t checkpoint_path;\n    oss_get_download_checkpoint_path(NULL, NULL, NULL, NULL);\n    oss_get_download_checkpoint_path(NULL, NULL, NULL, &checkpoint_path);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_is_upload_checkpoint_valid_negative(CuTest *tc)\n{\n    oss_checkpoint_t checkpoint;\n    apr_finfo_t finfo;\n    int ret;\n  \n    finfo.mtime = 1000;\n    finfo.size = 100;\n    checkpoint.cp_type = OSS_CP_UPLOAD;\n    checkpoint.file_size = 100;\n    checkpoint.file_last_modified = 1000;\n    ret = oss_is_upload_checkpoint_valid(NULL, &checkpoint, &finfo);\n    CuAssertIntEquals(tc, 1, ret);\n\n    checkpoint.cp_type = OSS_CP_DOWNLOAD;\n    ret = oss_is_upload_checkpoint_valid(NULL, &checkpoint, &finfo);\n    CuAssertIntEquals(tc, 0, ret);\n\n    checkpoint.cp_type = OSS_CP_UPLOAD;\n    checkpoint.file_size = 101;\n    ret = oss_is_upload_checkpoint_valid(NULL, &checkpoint, &finfo);\n    CuAssertIntEquals(tc, 0, ret);\n\n    checkpoint.cp_type = OSS_CP_UPLOAD;\n    checkpoint.file_size = 100;\n    checkpoint.file_last_modified = 1001;\n    ret = oss_is_upload_checkpoint_valid(NULL, &checkpoint, &finfo);\n    CuAssertIntEquals(tc, 0, ret);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_is_download_checkpoint_valid_negative(CuTest *tc)\n{\n    oss_checkpoint_t checkpoint;\n    int64_t object_size = 100;\n    const char *object_last_modified = \"last modified\";\n    const char *object_etag = \"etag\";\n    int ret;\n\n    checkpoint.cp_type = OSS_CP_DOWNLOAD;\n    checkpoint.object_size = object_size;\n    aos_str_set(&checkpoint.object_last_modified, object_last_modified);\n    aos_str_set(&checkpoint.object_etag, object_etag);\n    ret = oss_is_download_checkpoint_valid(NULL, &checkpoint, NULL, object_size, object_last_modified, object_etag);\n    CuAssertIntEquals(tc, 1, ret);\n\n    checkpoint.cp_type = OSS_CP_UPLOAD;\n    checkpoint.object_size = object_size;\n    aos_str_set(&checkpoint.object_last_modified, object_last_modified);\n    aos_str_set(&checkpoint.object_etag, object_etag);\n    ret = oss_is_download_checkpoint_valid(NULL, &checkpoint, NULL, object_size, object_last_modified, object_etag);\n    CuAssertIntEquals(tc, 0, ret);\n\n    checkpoint.cp_type = OSS_CP_DOWNLOAD;\n    checkpoint.object_size = object_size + 1;\n    aos_str_set(&checkpoint.object_last_modified, object_last_modified);\n    aos_str_set(&checkpoint.object_etag, object_etag);\n    ret = oss_is_download_checkpoint_valid(NULL, &checkpoint, NULL, object_size, object_last_modified, object_etag);\n    CuAssertIntEquals(tc, 0, ret);\n\n    checkpoint.cp_type = OSS_CP_DOWNLOAD;\n    checkpoint.object_size = object_size;\n    aos_str_set(&checkpoint.object_last_modified, \"\");\n    aos_str_set(&checkpoint.object_etag, object_etag);\n    ret = oss_is_download_checkpoint_valid(NULL, &checkpoint, NULL, object_size, object_last_modified, object_etag);\n    CuAssertIntEquals(tc, 0, ret);\n\n    checkpoint.cp_type = OSS_CP_DOWNLOAD;\n    checkpoint.object_size = object_size;\n    aos_str_set(&checkpoint.object_last_modified, object_last_modified);\n    aos_str_set(&checkpoint.object_etag, \"\");\n    ret = oss_is_download_checkpoint_valid(NULL, &checkpoint, NULL, object_size, object_last_modified, object_etag);\n    CuAssertIntEquals(tc, 0, ret);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_dump_checkpoint_negative(CuTest *tc)\n{\n    int ret;\n    ret = oss_dump_checkpoint(NULL, NULL);\n    CuAssertIntEquals(tc, AOSE_OUT_MEMORY, ret);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_resumable_upload_file_without_cp_negative(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_oss_resumable_upload_file_without_cp_negative.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    int64_t part_size = 100 * 1024;\n    apr_finfo_t finfo;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n    finfo.size = 1000 * 1024;\n\n    // upload object\n    s = oss_resumable_upload_file_without_cp(options, &bucket, &object, &filename, headers, NULL,\n        1, part_size, &finfo, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 404, s->code);\r\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_resumable_upload_file_with_cp_negative(CuTest *tc)\n{\n    aos_pool_t *p = NULL;\n    char *object_name = \"test_oss_resumable_upload_file_without_cp_negative.jpg\";\n    aos_string_t bucket;\n    aos_string_t object;\n    aos_string_t filename;\n    aos_status_t *s = NULL;\n    int is_cname = 0;\n    aos_table_t *headers = NULL;\n    aos_table_t *resp_headers = NULL;\n    aos_list_t resp_body;\n    oss_request_options_t *options = NULL;\n    int64_t part_size = 100 * 1024;\n    apr_finfo_t finfo;\n    aos_string_t checkpoint_path;\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    init_test_request_options(options, is_cname);\n    headers = aos_table_make(p, 0);\n    aos_str_set(&bucket, \"c-sdk-no-exist\");\n    aos_str_set(&object, object_name);\n    aos_list_init(&resp_body);\n    aos_str_set(&filename, test_file);\n    finfo.size = 1000 * 1024;\n    aos_str_set(&checkpoint_path, \"\");\n\n    // upload object\n    s = oss_resumable_upload_file_with_cp(options, &bucket, &object, &filename, headers, NULL,\n        1, part_size, &checkpoint_path, &finfo, NULL, &resp_headers, &resp_body);\n    CuAssertIntEquals(tc, 404, s->code);\r\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nvoid test_resumable_invalid_parameter(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    oss_request_options_t *options = NULL;\r\n    int is_cname = 0;\r\n    int i;\r\n    char *invalid_name_list[] =\r\n    { \"a\", \"1\", \"!\", \"aa\", \"12\", \"a1\",\r\n        \"a!\", \"1!\", \"aAa\", \"1A1\", \"a!a\", \"FengChao@123\", \"-a123\", \"a_123\", \"a123-\",\r\n        \"1234567890123456789012345678901234567890123456789012345678901234\", \"\"\r\n    };\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n\r\n    for (i = 0; i < sizeof(invalid_name_list) / sizeof(invalid_name_list[0]); i++) {\r\n        aos_string_t bucket;\r\n        aos_status_t *s = NULL;\r\n        aos_table_t *resp_headers = NULL;\r\n        aos_table_t *headers = NULL;\r\n        aos_table_t *params = NULL;\r\n        aos_str_set(&bucket, invalid_name_list[i]);\r\n        headers = aos_table_make(p, 1);\r\n\r\n        s = oss_resumable_upload_file(options, &bucket, NULL, NULL, headers, params, NULL, NULL, &resp_headers, NULL);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_resumable_download_file(options, &bucket, NULL, NULL, headers, params, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n    }\r\n    aos_pool_destroy(p);\r\n\r\n    printf(\"test_multipart_invalid_parameter ok\\n\");\r\n}\r\n\n\nCuSuite *test_oss_resumable()\n{\n    CuSuite* suite = CuSuiteNew();\n\n    SUITE_ADD_TEST(suite, test_resumable_setup);\n    SUITE_ADD_TEST(suite, test_resumable_oss_get_thread_num);\n    SUITE_ADD_TEST(suite, test_resumable_oss_get_checkpoint_path);\n    SUITE_ADD_TEST(suite, test_resumable_oss_get_file_info);\n    SUITE_ADD_TEST(suite, test_resumable_oss_does_file_exist);\n    SUITE_ADD_TEST(suite, test_resumable_oss_dump_checkpoint);\n    SUITE_ADD_TEST(suite, test_resumable_oss_load_checkpoint);\n    SUITE_ADD_TEST(suite, test_resumable_oss_is_upload_checkpoint_valid);\n    SUITE_ADD_TEST(suite, test_resumable_checkpoint_xml);\n    SUITE_ADD_TEST(suite, test_resumable_upload_without_checkpoint);\n    SUITE_ADD_TEST(suite, test_resumable_upload_with_checkpoint);\n    SUITE_ADD_TEST(suite, test_resumable_upload_partsize);\n    SUITE_ADD_TEST(suite, test_resumable_upload_threads);\n    SUITE_ADD_TEST(suite, test_resumable_upload_with_checkpoint_format_invalid);\n    SUITE_ADD_TEST(suite, test_resumable_upload_with_checkpoint_path_invalid);\n    SUITE_ADD_TEST(suite, test_resumable_upload_with_file_size_unavailable);\n    SUITE_ADD_TEST(suite, test_resumable_upload_with_uploadid_unavailable);\n    SUITE_ADD_TEST(suite, test_resumable_upload_with_uploadid_available);\n    SUITE_ADD_TEST(suite, test_resumable_upload_with_file_path_invalid);\n    SUITE_ADD_TEST(suite, test_resumable_upload_callback_without_checkpoint);\n    SUITE_ADD_TEST(suite, test_resumable_upload_progress_without_checkpoint);\n    SUITE_ADD_TEST(suite, test_resumable_upload_callback_with_checkpoint);\n    SUITE_ADD_TEST(suite, test_resumable_upload_progress_with_checkpoint);\n    SUITE_ADD_TEST(suite, test_resumable_upload_content_type);\n    SUITE_ADD_TEST(suite, test_resumable_download_without_checkpoint);\n    SUITE_ADD_TEST(suite, test_resumable_download_with_checkpoint);\n    SUITE_ADD_TEST(suite, test_resumable_download_without_checkpoint_target_invalid);\n    SUITE_ADD_TEST(suite, test_resumable_download_with_checkpoint_target_invalid);\n    SUITE_ADD_TEST(suite, test_resumable_download_partsize);\n    SUITE_ADD_TEST(suite, test_resumable_download_small_partsize);\n    SUITE_ADD_TEST(suite, test_resumable_download_threads);\n    SUITE_ADD_TEST(suite, test_resumable_download_with_checkpoint_format_invalid);\n    SUITE_ADD_TEST(suite, test_resumable_download_with_checkpoint_info_invalid);\n    SUITE_ADD_TEST(suite, test_resumable_download_with_checkpoint_info_valid);\n    SUITE_ADD_TEST(suite, test_resumable_download_with_checkpoint_path_invalid);\n    SUITE_ADD_TEST(suite, test_resumable_download_with_tmpfile_invalid);\n    SUITE_ADD_TEST(suite, test_resumable_download_with_tmpfile_not_found);\n    SUITE_ADD_TEST(suite, test_resumable_download_without_checkpoint_object_not_found);\n    SUITE_ADD_TEST(suite, test_resumable_download_with_checkpoint_object_not_found);\n    SUITE_ADD_TEST(suite, test_resumable_download_progress_without_checkpoint);\n    SUITE_ADD_TEST(suite, test_resumable_download_progress_with_checkpoint);\n    SUITE_ADD_TEST(suite, test_resumable_download_without_checkpoint_random_failure);\n    SUITE_ADD_TEST(suite, test_resumable_download_with_checkpoint_random_failure);\n    SUITE_ADD_TEST(suite, test_resumable_download_with_checkpoint_crc64_mismatch);\n    SUITE_ADD_TEST(suite, test_oss_get_thread_num_negative);\n    SUITE_ADD_TEST(suite, test_oss_get_upload_checkpoint_path_negative);\n    SUITE_ADD_TEST(suite, test_oss_get_download_checkpoint_path_negative);\n    SUITE_ADD_TEST(suite, test_oss_is_upload_checkpoint_valid_negative);\n    SUITE_ADD_TEST(suite, test_oss_is_download_checkpoint_valid_negative);\n    SUITE_ADD_TEST(suite, test_oss_dump_checkpoint_negative);\n    SUITE_ADD_TEST(suite, test_oss_resumable_upload_file_without_cp_negative);\n    SUITE_ADD_TEST(suite, test_oss_resumable_upload_file_with_cp_negative);\n    SUITE_ADD_TEST(suite, test_resumable_invalid_parameter);\n    SUITE_ADD_TEST(suite, test_resumable_cleanup);\n\n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_select_object.c",
    "content": "#include \"CuTest.h\"\r\n#include \"aos_log.h\"\r\n#include \"aos_util.h\"\r\n#include \"aos_string.h\"\r\n#include \"aos_status.h\"\r\n#include \"oss_auth.h\"\r\n#include \"oss_util.h\"\r\n#include \"oss_xml.h\"\r\n#include \"oss_api.h\"\r\n#include \"oss_config.h\"\r\n#include \"oss_test_util.h\"\r\n#include \"aos_crc64.h\"\r\n\r\nstatic char test_file[1024];\r\nstatic char test_file_gz[1024];\r\n\r\nstatic void test_select_object_setup(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    aos_status_t *s = NULL;\r\n    oss_request_options_t *options = NULL;\r\n    oss_acl_e oss_acl = OSS_ACL_PRIVATE;\r\n\r\n    TEST_BUCKET_NAME = get_test_bucket_name(aos_global_pool, \"selectobject\");\r\n\r\n    /* create test bucket */\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    s = create_test_bucket(options, TEST_BUCKET_NAME, oss_acl);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n\r\n    sprintf(test_file, \"%ssample_data.csv\", get_test_file_path());\r\n    sprintf(test_file_gz, \"%ssample_data.csv.gz\", get_test_file_path());\r\n\r\n    create_test_object_from_file(options, TEST_BUCKET_NAME, \"sampleusers.csv\", test_file, NULL);\r\n\r\n    aos_pool_destroy(p);\r\n}\r\n\r\nstatic void test_select_object_cleanup(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    aos_string_t bucket;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n\r\n    delete_test_object_by_prefix(options, TEST_BUCKET_NAME, \"\");\r\n\r\n    /* delete test bucket */\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    oss_delete_bucket(options, &bucket, &resp_headers);\r\n    apr_sleep(apr_time_from_sec(3));\r\n\r\n    aos_pool_destroy(p);\r\n}\r\n\r\nvoid test_select_object_csv_data(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    char *object_name = \"oss_test_select_objec_sample_data.csv\";\r\n    aos_string_t object;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_list_t buffer;\r\n    char *select_data = NULL;\r\n    oss_select_object_meta_params_t *meta_params;\r\n    long content_length = 0;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n    char Year[128];\r\n    char StateAbbr[128];\r\n    char CityName[128];\r\n    char PopulationCount[128];\r\n    char line_buff[1024];\r\n    char *ptr = NULL;\r\n    int32_t col = 0;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    aos_list_init(&buffer);\r\n\r\n    create_test_object_from_file(options, TEST_BUCKET_NAME, object_name, test_file, NULL);\r\n\r\n    resp_headers = NULL;\r\n    meta_params = oss_create_select_object_meta_params(options->pool);\r\n    s = oss_create_select_object_meta(options, &bucket, &object, meta_params, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n\r\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n\r\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\r\n    CuAssertTrue(tc, content_length == get_file_size(test_file));\r\n\r\n    sql = \"select Year, StateAbbr, CityName, PopulationCount from ossobject where CityName != '' limit 20\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_str_set(&select_params->input_param.file_header_info, \"USE\");\r\n    select_params->output_param.enable_payload_crc = AOS_TRUE;\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    ptr = select_data;\r\n\r\n    while ((ptr[0] != '\\0') && sscanf(ptr, \"%s\\n\", line_buff)) {\r\n        memset(Year, 0, sizeof(Year));\r\n        memset(StateAbbr, 0, sizeof(Year));\r\n        memset(CityName, 0, sizeof(Year));\r\n        memset(PopulationCount, 0, sizeof(Year));\r\n        sscanf(line_buff, \"%[^,],%[^,],%[^,],%[^,]\", Year, StateAbbr, CityName, PopulationCount);\r\n        ptr += strlen(line_buff) + 1;\r\n        CuAssertTrue(tc, strlen(CityName) > 0);\r\n        col++;\r\n    }\r\n    CuAssertTrue(tc, col == 20);\r\n    aos_pool_destroy(p);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_with_output_header(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_with_output_header.csv\";\r\n    char *object_data = \"name,job\\nabc,def\\n\";\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select name from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_str_set(&select_params->input_param.file_header_info, \"USE\");\r\n    select_params->output_param.output_header = AOS_TRUE;\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    CuAssertStrEquals(tc, \"name\\nabc\\n\", select_data);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_without_output_header(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_without_output_header.csv\";\r\n    char *object_data = \"name,job\\nabc,def\\n\";\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select name from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_str_set(&select_params->input_param.file_header_info, \"USE\");\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    CuAssertStrEquals(tc, \"abc\\n\", select_data);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_with_keep_columns(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_with_keep_columns.csv\";\r\n    char *object_data = \"abc,def,ghi,jkl\\n\";\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select _1, _4 from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    select_params->output_param.keep_all_columns = AOS_TRUE;\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    CuAssertStrEquals(tc, \"abc,,,jkl\\n\", select_data);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_without_keep_columns(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_without_keep_columns.csv\";\r\n    char *object_data = \"abc,def,ghi,jkl\\n\";\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select _1, _4 from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    select_params->output_param.keep_all_columns = AOS_FALSE;\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    CuAssertStrEquals(tc, \"abc,jkl\\n\", select_data);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_with_output_raw(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_with_output_raw.csv\";\r\n    char *object_data = \"abc,def\\n\";\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select _1 from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    select_params->output_param.output_rawdata = AOS_TRUE;\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 206, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    CuAssertStrEquals(tc, \"abc\\n\", select_data);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_without_output_raw(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_without_output_raw.csv\";\r\n    char *object_data = \"abc,def\\n\";\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select _1 from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    select_params->output_param.output_rawdata = AOS_FALSE;\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    CuAssertStrEquals(tc, \"abc\\n\", select_data);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_with_skip_partial_data_true(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_with_skip_partial_data.csv\";\r\n    char *object_data = \"abc,def\\nefg\\nhij,klm\\n\";\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select _1, _2 from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    select_params->option_param.skip_partial_data_record = AOS_TRUE;\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 400, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_with_skip_partial_data_false(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_without_skip_partial_data.csv\";\r\n    char *object_data = \"abc,def\\nefg\\nhij,klm\\n123,456\\n\";\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select _1, _2 from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    select_params->option_param.skip_partial_data_record = AOS_FALSE;\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    CuAssertStrEquals(tc, \"abc,def\\nefg,\\nhij,klm\\n123,456\\n\", select_data);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_with_crc(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_with_crc.csv\";\r\n    char *object_data = \"abc,def\\n\";\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select _1, _2 from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    select_params->output_param.enable_payload_crc = AOS_TRUE;\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_without_crc(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_without_crc.csv\";\r\n    char *object_data = \"abc,def\\n\";\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select _1, _2 from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    select_params->output_param.enable_payload_crc = AOS_FALSE;\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_with_output_delimiters(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_with_output_delimiters.csv\";\r\n    char *object_data = \"abc,def\\n\";\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select _1,_2 from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_str_set(&select_params->output_param.record_delimiter, \"\\r\\n\");\r\n    aos_str_set(&select_params->output_param.field_delimiter, \"|\");\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    CuAssertStrEquals(tc, \"abc|def\\r\\n\", select_data);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_with_line_range(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_with_line_range.csv\";\r\n    char *object_data = \"abc,def\\n123,456\\n789,efg\\nhij,klm\\n\";\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n    oss_select_object_meta_params_t *meta_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    meta_params = oss_create_select_object_meta_params(options->pool);\r\n    s = oss_create_select_object_meta(options, &bucket, &object, meta_params, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n\r\n    sql = \"select _1,_2 from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_str_set(&select_params->input_param.range, \"line-range=1-2\");\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    CuAssertStrEquals(tc, \"123,456\\n789,efg\\n\", select_data);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_with_input_comment_character(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_with_input_comment_character.csv\";\r\n    char *object_data = \"abc,def\\n`123,456\\n#ghi,jkl\\n\";\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select _1 from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_str_set(&select_params->input_param.comment_character, \"`\");\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    CuAssertStrEquals(tc, \"abc\\n#ghi\\n\", select_data);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_with_input_quote_character(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_with_input_quote_character.csv\";\r\n    char *object_data = \"'abc','def\\n123','456'\\n\";\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select _2 from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    CuAssertStrEquals(tc, \"'def\\n'456'\\n\", select_data);\r\n\r\n    //use '\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_str_set(&select_params->input_param.quote_character, \"'\");\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    CuAssertStrEquals(tc, \"'def\\n123'\\n\", select_data);\r\n\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_with_input_delimiters(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_with_input_delimiters.csv\";\r\n    char *object_data = \"abc,def|123,456|7891334\\n\\n777,888|999,222|012345\\n\\n\";\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select _2,_3 from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_str_set(&select_params->input_param.record_delimiter, \"\\n\\n\");\r\n    aos_str_set(&select_params->input_param.field_delimiter, \"|\");\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    CuAssertStrEquals(tc, \"123,456|7891334\\n\\n999,222|012345\\n\\n\", select_data);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_with_gzip_data(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    char *object_name = \"test_select_object_with_gzip_data.csv.gz\";\r\n    aos_string_t object;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_list_t buffer;\r\n    char *select_data = NULL;\r\n    int32_t select_data_len = 0;\r\n    //char *cmp_data = NULL;\r\n    //int32_t cmp_data_len = 0;\r\n    long content_length = 0;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n    int64_t select_data_crc = 0;\r\n    //int64_t cmp_data_crc = 0;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    aos_list_init(&buffer);\r\n\r\n    create_test_object_from_file(options, TEST_BUCKET_NAME, object_name, test_file_gz, NULL);\r\n\r\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n\r\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\r\n    CuAssertTrue(tc, content_length == get_file_size(test_file_gz));\r\n\r\n    sql = \"select * from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_str_set(&select_params->input_param.file_header_info, \"None\");\r\n    aos_str_set(&select_params->input_param.record_delimiter, \"\\n\");\r\n    aos_str_set(&select_params->input_param.field_delimiter, \",\");\r\n    aos_str_set(&select_params->input_param.quote_character, \"\\\"\");\r\n    aos_str_set(&select_params->input_param.compression_type, \"GZIP\");\r\n    select_params->output_param.output_rawdata = AOS_FALSE;\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    select_data_len = strlen(select_data);\r\n    select_data_crc = aos_crc64(0, select_data, (size_t)select_data_len);\r\n\r\n    //cmp_data = get_text_file_data(options->pool, test_file);\r\n    //cmp_data_len = strlen(select_data);\r\n    //cmp_data_crc = aos_crc64(0, cmp_data, (size_t)cmp_data_len);\r\n    CuAssertTrue(tc, select_data_crc == 0x42DF5EE66341E3C3);\r\n    aos_pool_destroy(p);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_with_gzip_data_to_file(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    char *object_name = \"test_select_object_with_gzip_data.csv.gz\";\r\n    aos_string_t object;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_list_t buffer;\r\n    char *select_data = NULL;\r\n    int32_t select_data_len = 0;\r\n    //char *cmp_data = NULL;\r\n    //int32_t cmp_data_len = 0;\r\n    char *tmpfile = \"test_select_object_with_gzip_data.csv.tmp\";\r\n    long content_length = 0;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n    aos_string_t filename;\r\n    int64_t select_data_crc = 0;\r\n    //int64_t cmp_data_crc = 0;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    aos_list_init(&buffer);\r\n\r\n    create_test_object_from_file(options, TEST_BUCKET_NAME, object_name, test_file_gz, NULL);\r\n\r\n    s = oss_head_object(options, &bucket, &object, NULL, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n\r\n    content_length = atol((char*)apr_table_get(resp_headers, OSS_CONTENT_LENGTH));\r\n    CuAssertTrue(tc, content_length == get_file_size(test_file_gz));\r\n\r\n    sql = \"select * from ossobject\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_str_set(&select_params->input_param.file_header_info, \"None\");\r\n    aos_str_set(&select_params->input_param.record_delimiter, \"\\n\");\r\n    aos_str_set(&select_params->input_param.field_delimiter, \",\");\r\n    aos_str_set(&select_params->input_param.quote_character, \"\\\"\");\r\n    aos_str_set(&select_params->input_param.compression_type, \"GZIP\");\r\n    aos_str_set(&filename, tmpfile);\r\n    s = oss_select_object_to_file(options, &bucket, &object, &expression, select_params, &filename, &resp_headers);\r\n    CuAssertIntEquals(tc, 206, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = get_text_file_data(options->pool, tmpfile);\r\n    select_data_len = strlen(select_data);\r\n    select_data_crc = aos_crc64(0, select_data, (size_t)select_data_len);\r\n\r\n    //cmp_data = get_text_file_data(options->pool, test_file);\r\n    //cmp_data_len = strlen(select_data);\r\n    //cmp_data_crc = aos_crc64(0, cmp_data, (size_t)cmp_data_len);\r\n    CuAssertTrue(tc, select_data_crc == 0x42DF5EE66341E3C3);\r\n\r\n    //to invalid filepath\r\n    aos_str_set(&filename, \"g:/invalid-path\");\r\n    s = oss_select_object_to_file(options, &bucket, &object, &expression, select_params, &filename, &resp_headers);\r\n    CuAssertIntEquals(tc, AOSE_OPEN_FILE_ERROR, s->code);\r\n\r\n    aos_pool_destroy(p);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_big_csv_data(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    char *object_name = \"sampleusers.csv\";\r\n    aos_string_t object;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_list_t buffer;\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n    char name[128];\r\n    char company[128];\r\n    char age[128];\r\n    char line_buff[1024];\r\n    char *ptr = NULL;\r\n    int32_t col = 0;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    aos_list_init(&buffer);\r\n\r\n    sql = \"select Year, StateAbbr,StateDesc from ossobject limit 200\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_str_set(&select_params->input_param.file_header_info, \"USE\");\r\n    select_params->output_param.enable_payload_crc = AOS_TRUE;\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = aos_buf_list_content(options->pool, &buffer);\r\n    ptr = select_data;\r\n\r\n    memset(line_buff, 0, sizeof(line_buff));\r\n    while ((ptr[0] != '\\0') && sscanf(ptr, \"%[^\\n]\\n\", line_buff)) {\r\n        memset(name, 0, sizeof(name));\r\n        memset(company, 0, sizeof(company));\r\n        memset(age, 0, sizeof(age));\r\n        sscanf(line_buff, \"%[^,],%[^,],%[^,]\", name, company, age);\r\n        ptr += strlen(line_buff) + 1;\r\n        CuAssertTrue(tc, strlen(name) > 0);\r\n        memset(line_buff, 0, sizeof(line_buff));\r\n        col++;\r\n    }\r\n    CuAssertIntEquals(tc, 200, col);\r\n    aos_pool_destroy(p);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_big_csv_data_to_file(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    aos_string_t bucket;\r\n    char *object_name = \"sampleusers.csv\";\r\n    aos_string_t object;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t filename;\r\n    char *select_data = NULL;\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n    char name[128];\r\n    char company[128];\r\n    char age[128];\r\n    char line_buff[1024];\r\n    char *ptr = NULL;\r\n    int32_t col = 0;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n\r\n    sql = \"select Year, StateAbbr,StateDesc from ossobject limit 200\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_str_set(&select_params->input_param.file_header_info, \"USE\");\r\n    select_params->output_param.enable_payload_crc = AOS_TRUE;\r\n    aos_str_set(&filename, \"result_sampleusers.csv\");\r\n    s = oss_select_object_to_file(options, &bucket, &object, &expression, select_params, &filename, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    select_data = get_text_file_data(options->pool, filename.data);\r\n    ptr = select_data;\r\n\r\n    memset(line_buff, 0, sizeof(line_buff));\r\n    while ((ptr[0] != '\\0') && sscanf(ptr, \"%[^\\n]\\n\", line_buff)) {\r\n        memset(name, 0, sizeof(name));\r\n        memset(company, 0, sizeof(company));\r\n        memset(age, 0, sizeof(age));\r\n        sscanf(line_buff, \"%[^,],%[^,],%[^,]\", name, company, age);\r\n        ptr += strlen(line_buff) + 1;\r\n        CuAssertTrue(tc, strlen(name) > 0);\r\n        memset(line_buff, 0, sizeof(line_buff));\r\n        col++;\r\n    }\r\n    CuAssertIntEquals(tc, 200, col);\r\n    aos_pool_destroy(p);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_create_meta_delimiters(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_create_meta_delimiters.csv\";\r\n    char *object_data = \"abc,def123,456|7891334\\n777,888|999,222012345\\n\\n\";\r\n    oss_select_object_meta_params_t *meta_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    meta_params = oss_create_select_object_meta_params(options->pool);\r\n    aos_str_set(&meta_params->field_delimiter, \",\");\r\n    aos_str_set(&meta_params->record_delimiter, \"\\n\");\r\n    resp_headers = NULL;\r\n    s = oss_create_select_object_meta(options, &bucket, &object, meta_params, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n    CuAssertIntEquals(tc, 1, meta_params->splits_count);\r\n    CuAssertIntEquals(tc, 3, (int32_t)meta_params->rows_count);\r\n    CuAssertIntEquals(tc, 3, meta_params->columns_count);\r\n\r\n    //create meta without overwrite\r\n    meta_params = oss_create_select_object_meta_params(options->pool);\r\n    aos_str_set(&meta_params->field_delimiter, \"|\");\r\n    aos_str_set(&meta_params->record_delimiter, \"\\n\\n\");\r\n    resp_headers = NULL;\r\n    s = oss_create_select_object_meta(options, &bucket, &object, meta_params, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n    CuAssertIntEquals(tc, 1, meta_params->splits_count);\r\n    CuAssertIntEquals(tc, 3, (int32_t)meta_params->rows_count);\r\n    CuAssertIntEquals(tc, 3, meta_params->columns_count);\r\n\r\n\r\n    //create meta with overwrite\r\n    meta_params = oss_create_select_object_meta_params(options->pool);\r\n    aos_str_set(&meta_params->field_delimiter, \"|\");\r\n    aos_str_set(&meta_params->record_delimiter, \"\\n\\n\");\r\n    meta_params->over_write_if_existing = AOS_TRUE;\r\n    resp_headers = NULL;\r\n    s = oss_create_select_object_meta(options, &bucket, &object, meta_params, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n    CuAssertIntEquals(tc, 1, meta_params->splits_count);\r\n    CuAssertIntEquals(tc, 1, (int32_t)meta_params->rows_count);\r\n    CuAssertIntEquals(tc, 3, meta_params->columns_count);\r\n\r\n    //create new oject\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n    meta_params = oss_create_select_object_meta_params(options->pool);\r\n    aos_str_set(&meta_params->field_delimiter, \"|\");\r\n    aos_str_set(&meta_params->record_delimiter, \"\\n\\n\");\r\n    meta_params->over_write_if_existing = AOS_TRUE;\r\n    resp_headers = NULL;\r\n    s = oss_create_select_object_meta(options, &bucket, &object, meta_params, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n    CuAssertIntEquals(tc, 1, meta_params->splits_count);\r\n    CuAssertIntEquals(tc, 1, (int32_t)meta_params->rows_count);\r\n    CuAssertIntEquals(tc, 3, meta_params->columns_count);\r\n\r\n    aos_pool_destroy(p);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_create_meta_quote_character(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_create_meta_quote_character.csv\";\r\n    char *object_data = \"'abc','def\\n123','456'\\n\";\r\n    oss_select_object_meta_params_t *meta_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    meta_params = oss_create_select_object_meta_params(options->pool);\r\n    aos_str_set(&meta_params->quote_character, \"'\");\r\n    resp_headers = NULL;\r\n    s = oss_create_select_object_meta(options, &bucket, &object, meta_params, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n    CuAssertIntEquals(tc, 1, meta_params->splits_count);\r\n    CuAssertIntEquals(tc, 1, (int32_t)meta_params->rows_count);\r\n    CuAssertIntEquals(tc, 3, meta_params->columns_count);\r\n\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n    meta_params = oss_create_select_object_meta_params(options->pool);\r\n    aos_str_set(&meta_params->quote_character, \"\\\"\");\r\n    resp_headers = NULL;\r\n    s = oss_create_select_object_meta(options, &bucket, &object, meta_params, &resp_headers);\r\n    CuAssertIntEquals(tc, 200, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n    CuAssertIntEquals(tc, 1, meta_params->splits_count);\r\n    CuAssertIntEquals(tc, 2, (int32_t)meta_params->rows_count);\r\n    CuAssertIntEquals(tc, 2, meta_params->columns_count);\r\n\r\n    aos_pool_destroy(p);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_invalid(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_invalid.csv\";\r\n    char *object_data = \"abc,def|123,456|7891334\\n\\n777,888|999,222|012345\\n\\n\";\r\n    char *sql = NULL;\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    sql = \"select _2,_3 from ossobject where\";\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 400, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_create_meta_invalid(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"oss_test_select_object_create_meta_invalid.csv\";\r\n    char *object_data = \"'abc','def\\n123','456'\\n\";\r\n    oss_select_object_meta_params_t *meta_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n\r\n    meta_params = oss_create_select_object_meta_params(options->pool);\r\n    aos_str_set(&meta_params->quote_character, \"adbc\");\r\n    resp_headers = NULL;\r\n    s = oss_create_select_object_meta(options, &bucket, &object, meta_params, &resp_headers);\r\n    CuAssertIntEquals(tc, 400, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n\r\n    aos_pool_destroy(p);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\nvoid test_select_object_invalid_parameter(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    oss_request_options_t *options = NULL;\r\n    int is_cname = 0;\r\n    int i;\r\n    char *invalid_name_list[] =\r\n    { \"a\", \"1\", \"!\", \"aa\", \"12\", \"a1\",\r\n        \"a!\", \"1!\", \"aAa\", \"1A1\", \"a!a\", \"FengChao@123\", \"-a123\", \"a_123\", \"a123-\",\r\n        \"1234567890123456789012345678901234567890123456789012345678901234\", \"\"\r\n    };\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n\r\n    for (i = 0; i < sizeof(invalid_name_list) / sizeof(invalid_name_list[0]); i++) {\r\n        aos_string_t bucket;\r\n        aos_status_t *s = NULL;\r\n        aos_table_t *resp_headers = NULL;\r\n        aos_str_set(&bucket, invalid_name_list[i]);\r\n\r\n        s = oss_select_object_to_buffer(options, &bucket, NULL, NULL, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_select_object_to_file(options, &bucket, NULL, NULL, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n\r\n        s = oss_create_select_object_meta(options, &bucket, NULL, NULL, &resp_headers);\r\n        CuAssertIntEquals(tc, AOSE_INVALID_ARGUMENT, s->code);\r\n        CuAssertStrEquals(tc, AOS_BUCKET_NAME_INVALID_ERROR, s->error_code);\r\n    }\r\n    aos_pool_destroy(p);\r\n\r\n    printf(\"test_select_object_invalid_parameter ok\\n\");\r\n}\r\n\r\nvoid test_select_object_with_long_sql_expression(CuTest *tc)\r\n{\r\n    aos_pool_t *p = NULL;\r\n    int is_cname = 0;\r\n    oss_request_options_t *options = NULL;\r\n    aos_table_t *resp_headers = NULL;\r\n    aos_list_t buffer;\r\n    aos_status_t *s = NULL;\r\n    aos_string_t bucket;\r\n    aos_string_t object;\r\n    char *object_name = \"test_select_object_with_long_sql_expression.csv\";\r\n    char *object_data = \"name,job\\nabc,def\\n\";\r\n    char *sql = NULL;\r\n    char sql_buff[2500];\r\n    aos_string_t expression;\r\n    oss_select_object_params_t *select_params;\r\n\r\n    aos_pool_create(&p, NULL);\r\n    options = oss_request_options_create(p);\r\n    init_test_request_options(options, is_cname);\r\n    aos_str_set(&bucket, TEST_BUCKET_NAME);\r\n    aos_str_set(&object, object_name);\r\n    create_test_object(options, TEST_BUCKET_NAME, object_name, object_data, NULL);\r\n    sprintf(sql_buff, \"%s\", \"select name from ossobject\");\r\n    memset(sql_buff + 26, 0x20, sizeof(sql_buff) - 26);\r\n    sql_buff[2500 - 1] = '\\0';\r\n    sql  = sql_buff;\r\n    aos_str_set(&expression, sql);\r\n    select_params = oss_create_select_object_params(options->pool);\r\n    aos_str_set(&select_params->input_param.file_header_info, \"USE\");\r\n    select_params->output_param.output_header = AOS_TRUE;\r\n    aos_list_init(&buffer);\r\n    s = oss_select_object_to_buffer(options, &bucket, &object, &expression, select_params, &buffer, &resp_headers);\r\n    CuAssertIntEquals(tc, 400, s->code);\r\n    CuAssertPtrNotNull(tc, resp_headers);\r\n    printf(\"%s ok\\n\", __FUNCTION__);\r\n}\r\n\r\n\r\nCuSuite *test_oss_select_object()\r\n{\r\n    CuSuite* suite = CuSuiteNew();   \r\n\r\n    SUITE_ADD_TEST(suite, test_select_object_setup);\r\n    SUITE_ADD_TEST(suite, test_select_object_csv_data);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_output_header);\r\n    SUITE_ADD_TEST(suite, test_select_object_without_output_header);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_keep_columns);\r\n    SUITE_ADD_TEST(suite, test_select_object_without_keep_columns);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_output_raw);\r\n    SUITE_ADD_TEST(suite, test_select_object_without_output_raw);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_skip_partial_data_true);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_skip_partial_data_false);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_crc);\r\n    SUITE_ADD_TEST(suite, test_select_object_without_crc);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_output_delimiters);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_line_range);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_input_comment_character);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_input_quote_character);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_input_delimiters);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_gzip_data);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_gzip_data_to_file);\r\n    SUITE_ADD_TEST(suite, test_select_object_big_csv_data);\r\n    SUITE_ADD_TEST(suite, test_select_object_big_csv_data_to_file);\r\n    SUITE_ADD_TEST(suite, test_select_object_create_meta_delimiters);\r\n    SUITE_ADD_TEST(suite, test_select_object_create_meta_quote_character);\r\n    SUITE_ADD_TEST(suite, test_select_object_invalid);\r\n    SUITE_ADD_TEST(suite, test_select_object_create_meta_invalid);\r\n    SUITE_ADD_TEST(suite, test_select_object_invalid_parameter);\r\n    SUITE_ADD_TEST(suite, test_select_object_with_long_sql_expression);\r\n    SUITE_ADD_TEST(suite, test_select_object_cleanup);\r\n    \r\n    return suite;\r\n}\r\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_sign.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n\nvoid test_sign_setup(CuTest *tc)\n{\n}\n\nvoid test_sign_cleanup(CuTest *tc)\n{\n}\n\nstatic void test_sign_v4_object_full(CuTest* tc)\n{\n    aos_pool_t* p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    oss_request_options_t* options = NULL;\n    aos_table_t* headers = NULL;\n    aos_table_t* querys = NULL;\n    aos_table_t* resp_headers = NULL;\n    aos_status_t* s = NULL;\n    aos_list_t buffer;\n    aos_buf_t* content = NULL;\n    const char* str = \"\";\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    options->config = oss_config_create(options->pool);\n    aos_str_set(&options->config->endpoint, \"oss-cn-hangzhou.aliyuncs.com\");\n    aos_str_set(&options->config->access_key_id, \"ak\");\n    aos_str_set(&options->config->access_key_secret, \"sk\");\n    aos_str_set(&options->config->region, \"cn-hangzhou\");\n    options->config->signature_version = 4;\n    options->ctl = aos_http_controller_create(options->pool, 0);\n\n    aos_str_set(&bucket, \"oss-bucket-test\");\n    aos_str_set(&object, \"test-sign-V4/-!@#$%^&*()/abcdefjhijklmnoqprstuvwxyz/123456789\");\n\n\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-head1\", \"value\");\n    apr_table_set(headers, \"abc\", \"value\");\n    apr_table_set(headers, \"ZAbc\", \"value\");\n    apr_table_set(headers, \"XYZ\", \"value\");\n\n    //force x-oss-date to the speical value for test\n    apr_table_set(headers, \"x-oss-date\", \"20221016T040719Z\");\n\n    querys = aos_table_make(p, 1);\n    apr_table_set(querys, \"param1\", \"value1\");\n    apr_table_set(querys, \"|param1\", \"value2\");\n    apr_table_set(querys, \"+param1\", \"value3\");\n    apr_table_set(querys, \"|param1\", \"value4\");\n    apr_table_set(querys, \"+param2\", \"\");\n    apr_table_set(querys, \"|param2\", \"\");\n    apr_table_set(querys, \"param2\", \"\");\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    s = oss_do_put_object_from_buffer(options, &bucket, &object,\n        &buffer, headers, querys, NULL, &resp_headers, NULL);\n\n    CuAssertIntEquals(tc, 403, s->code);\n\n    str = apr_table_get(headers, OSS_AUTHORIZATION);\n    CuAssertStrEquals(tc, \"OSS4-HMAC-SHA256 Credential=ak/20221016/cn-hangzhou/oss/aliyun_v4_request,Signature=16e58322c5aafb55edd82813b02d6521caab8194882c786bf0e77b7987a63979\", str);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n\n}\n\nstatic void test_sign_v4_object_without_query(CuTest* tc)\n{\n    aos_pool_t* p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    oss_request_options_t* options = NULL;\n    aos_table_t* headers = NULL;\n    aos_table_t* resp_headers = NULL;\n    aos_status_t* s = NULL;\n    aos_list_t buffer;\n    aos_buf_t* content = NULL;\n    const char* str = \"\";\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    options->config = oss_config_create(options->pool);\n    aos_str_set(&options->config->endpoint, \"oss-cn-hangzhou.aliyuncs.com\");\n    aos_str_set(&options->config->access_key_id, \"ak\");\n    aos_str_set(&options->config->access_key_secret, \"sk\");\n    aos_str_set(&options->config->region, \"cn-hangzhou\");\n    options->config->signature_version = 4;\n    options->ctl = aos_http_controller_create(options->pool, 0);\n\n    aos_str_set(&bucket, \"oss-bucket-test\");\n    aos_str_set(&object, \"test-sign-V4/-!@#$%^&*()/abcdefjhijklmnoqprstuvwxyz/123456789\");\n\n\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-head1\", \"value\");\n\n    //force x-oss-date to the speical value for test\n    apr_table_set(headers, \"x-oss-date\", \"20221016T091431Z\");\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    s = oss_do_put_object_from_buffer(options, &bucket, &object,\n        &buffer, headers, NULL, NULL, &resp_headers, NULL);\n\n    CuAssertIntEquals(tc, 403, s->code);\n\n    str = apr_table_get(headers, OSS_AUTHORIZATION);\n    CuAssertStrEquals(tc, \"OSS4-HMAC-SHA256 Credential=ak/20221016/cn-hangzhou/oss/aliyun_v4_request,Signature=5028172a0a3806285979896982bee6e36e915cbf428ee7100a809e1f0ff43b64\", str);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_sign_v4_object_cloudbox_id_full(CuTest* tc)\n{\n    aos_pool_t* p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    oss_request_options_t* options = NULL;\n    aos_table_t* headers = NULL;\n    aos_table_t* querys = NULL;\n    aos_table_t* resp_headers = NULL;\n    aos_status_t* s = NULL;\n    aos_list_t buffer;\n    aos_buf_t* content = NULL;\n    const char* str = \"\";\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    options->config = oss_config_create(options->pool);\n    aos_str_set(&options->config->endpoint, \"oss-cn-hangzhou.aliyuncs.com\");\n    aos_str_set(&options->config->access_key_id, \"ak\");\n    aos_str_set(&options->config->access_key_secret, \"sk\");\n    aos_str_set(&options->config->region, \"cn-hangzhou\");\n    aos_str_set(&options->config->cloudbox_id, \"cloudbox-id\");\n    options->config->signature_version = 4;\n    options->ctl = aos_http_controller_create(options->pool, 0);\n\n    aos_str_set(&bucket, \"oss-bucket-test\");\n    aos_str_set(&object, \"test-sign-V4/-!@#$%^&*()/abcdefjhijklmnoqprstuvwxyz/123456789\");\n\n\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-head1\", \"value\");\n    apr_table_set(headers, \"abc\", \"value\");\n    apr_table_set(headers, \"ZAbc\", \"value\");\n    apr_table_set(headers, \"XYZ\", \"value\");\n\n    //force x-oss-date to the speical value for test\n    apr_table_set(headers, \"x-oss-date\", \"20221016T091831Z\");\n\n    querys = aos_table_make(p, 1);\n    apr_table_set(querys, \"param1\", \"value1\");\n    apr_table_set(querys, \"|param1\", \"value2\");\n    apr_table_set(querys, \"+param1\", \"value3\");\n    apr_table_set(querys, \"|param1\", \"value4\");\n    apr_table_set(querys, \"+param2\", \"\");\n    apr_table_set(querys, \"|param2\", \"\");\n    apr_table_set(querys, \"param2\", \"\");\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    s = oss_do_put_object_from_buffer(options, &bucket, &object,\n        &buffer, headers, querys, NULL, &resp_headers, NULL);\n\n    CuAssertIntEquals(tc, 403, s->code);\n\n    str = apr_table_get(headers, OSS_AUTHORIZATION);\n    CuAssertStrEquals(tc, \"OSS4-HMAC-SHA256 Credential=ak/20221016/cloudbox-id/oss-cloudbox/aliyun_v4_request,Signature=939eae7d5012d444c8d1dd8c68811275928f780a859e41ddbe52cf10a100adb4\", str);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_sign_v4_with_gmt_datefomat(CuTest* tc)\n{\n    aos_pool_t* p = NULL;\n    aos_string_t bucket;\n    aos_string_t object;\n    oss_request_options_t* options = NULL;\n    aos_table_t* headers = NULL;\n    aos_table_t* querys = NULL;\n    aos_table_t* resp_headers = NULL;\n    aos_status_t* s = NULL;\n    aos_list_t buffer;\n    aos_buf_t* content = NULL;\n    const char* str = \"\";\n\n    aos_pool_create(&p, NULL);\n    options = oss_request_options_create(p);\n    options->config = oss_config_create(options->pool);\n    aos_str_set(&options->config->endpoint, \"oss-cn-hangzhou.aliyuncs.com\");\n    aos_str_set(&options->config->access_key_id, \"ak\");\n    aos_str_set(&options->config->access_key_secret, \"sk\");\n    aos_str_set(&options->config->region, \"cn-hangzhou\");\n    aos_str_set(&options->config->cloudbox_id, \"cloudbox-id\");\n    options->config->signature_version = 4;\n    options->ctl = aos_http_controller_create(options->pool, 0);\n\n    aos_str_set(&bucket, \"oss-bucket-test\");\n    aos_str_set(&object, \"test-sign-V4/-!@#$%^&*()/abcdefjhijklmnoqprstuvwxyz/123456789\");\n\n\n    headers = aos_table_make(p, 1);\n    apr_table_set(headers, \"x-oss-head1\", \"value\");\n    apr_table_set(headers, \"abc\", \"value\");\n    apr_table_set(headers, \"ZAbc\", \"value\");\n    apr_table_set(headers, \"XYZ\", \"value\");\n\n    //force x-oss-date to the speical value for test\n    apr_table_set(headers, \"x-oss-date\", \"Thu, 19 Mar 2015 18:00:00 GMT\");\n\n    querys = aos_table_make(p, 1);\n    apr_table_set(querys, \"param1\", \"value1\");\n    apr_table_set(querys, \"|param1\", \"value2\");\n    apr_table_set(querys, \"+param1\", \"value3\");\n    apr_table_set(querys, \"|param1\", \"value4\");\n    apr_table_set(querys, \"+param2\", \"\");\n    apr_table_set(querys, \"|param2\", \"\");\n    apr_table_set(querys, \"param2\", \"\");\n\n    aos_list_init(&buffer);\n    content = aos_buf_pack(options->pool, str, strlen(str));\n    aos_list_add_tail(&content->node, &buffer);\n\n    s = oss_do_put_object_from_buffer(options, &bucket, &object,\n        &buffer, headers, querys, NULL, &resp_headers, NULL);\n\n    CuAssertIntEquals(tc, 403, s->code);\n    str = apr_table_get(headers, OSS_AUTHORIZATION);\n    CuAssertPtrNotNull(tc, strstr(str, \"OSS4-HMAC-SHA256 Credential=ak/20150319/cloudbox-id/oss-cloudbox/aliyun_v4_request\"));\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_sign_v4_presign(CuTest* tc)\n{\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nCuSuite *test_oss_sign()\n{\n    CuSuite* suite = CuSuiteNew();\n\n    SUITE_ADD_TEST(suite, test_sign_setup);\n    SUITE_ADD_TEST(suite, test_sign_v4_object_full);\n    SUITE_ADD_TEST(suite, test_sign_v4_object_without_query);\n    SUITE_ADD_TEST(suite, test_sign_v4_object_cloudbox_id_full);\n    SUITE_ADD_TEST(suite, test_sign_v4_with_gmt_datefomat);\n    SUITE_ADD_TEST(suite, test_sign_v4_presign);\n    SUITE_ADD_TEST(suite, test_sign_cleanup);\n\n    return suite;\n}\n"
  },
  {
    "path": "oss_c_sdk_test/test_oss_xml.c",
    "content": "#include \"CuTest.h\"\n#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_string.h\"\n#include \"aos_status.h\"\n#include \"oss_auth.h\"\n#include \"oss_util.h\"\n#include \"oss_xml.h\"\n#include \"oss_api.h\"\n#include \"oss_config.h\"\n#include \"oss_test_util.h\"\n\nstatic void test_oss_xml_setup(CuTest *tc)\n{\n}\n\nstatic void test_oss_xml_cleanup(CuTest *tc)\n{\n}\n\nstatic void test_get_xmldoc_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"invalid\";\r\n    mxml_node_t *root;\r\n    int ret;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\r\n \n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n    \n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_acl_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"invalid\";\r\n    char *no_node_xml_grant =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    aos_string_t ret_str;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_acl_parse_from_body(p, &buffer, &ret_str);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_str_null(&ret_str);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml_grant, strlen(no_node_xml_grant));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_acl_parse_from_body(p, &buffer, &ret_str);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, ret_str.data == NULL);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_location_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"invalid\";\r\n    char *no_node_xml_grant =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    aos_string_t ret_str;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_location_parse_from_body(p, &buffer, &ret_str);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_str_null(&ret_str);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml_grant, strlen(no_node_xml_grant));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_location_parse_from_body(p, &buffer, &ret_str);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, ret_str.data == NULL);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_storage_capacity_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"invalid\";\r\n    char *no_node_xml_grant =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    long ret_long = 2;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_storage_capacity_parse_from_body(p, &buffer, &ret_long);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml_grant, strlen(no_node_xml_grant));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_storage_capacity_parse_from_body(p, &buffer, &ret_long);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertIntEquals(tc, 2, ret_long);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_logging_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"invalid\";\r\n    char *no_node_xml_grant =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    char *no_node_xml_enable =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<BucketLoggingStatus></BucketLoggingStatus>\";\r\n    \r\n    int ret;\n    oss_logging_config_content_t logging_content;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_logging_parse_from_body(p, &buffer, &logging_content);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    logging_content.logging_enabled = 2;\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml_grant, strlen(no_node_xml_grant));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_logging_parse_from_body(p, &buffer, &logging_content);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertIntEquals(tc, 2, logging_content.logging_enabled);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml_enable, strlen(no_node_xml_enable));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_logging_parse_from_body(p, &buffer, &logging_content);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertIntEquals(tc, 2, logging_content.logging_enabled);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_list_objects_owner_parse_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    mxml_node_t *root;\r\n    oss_list_object_content_t object_content;\n\n    aos_pool_create(&p, NULL);\n\n    aos_str_null(&object_content.owner_id);\n    aos_str_null(&object_content.owner_display_name);\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n\n    oss_list_objects_owner_parse(p, root, &object_content);\n    CuAssertTrue(tc, object_content.owner_id.data == NULL);\n    CuAssertTrue(tc, object_content.owner_display_name.data == NULL);\n\n    mxmlDelete(root);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_list_objects_content_parse_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    mxml_node_t *root;\r\n    oss_list_object_content_t object_content;\n\n    aos_pool_create(&p, NULL);\n\n    aos_str_null(&object_content.owner_id);\n    aos_str_null(&object_content.owner_display_name);\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n\n    oss_list_objects_content_parse(p, root, &object_content);\n\n    mxmlDelete(root);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_list_objects_prefix_parse_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    mxml_node_t *root;\r\n    oss_list_object_common_prefix_t common_prefix;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n\n    oss_list_objects_prefix_parse(p, root, &common_prefix);\n\n    mxmlDelete(root);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_list_objects_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *full_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<ListBucketResult>\"\r\n        \"<Name>oss-example</Name>\"\r\n        \"<Prefix>Prefix</Prefix>\"\r\n        \"<Marker>Marker</Marker>\"\r\n        \"<MaxKeys>100</MaxKeys>\"\r\n        \"<Delimiter>/</Delimiter>\"\r\n        \"<IsTruncated>false</IsTruncated>\"\r\n        \"<NextMarker>nextMarker</NextMarker>\"\r\n        \"<Contents>\"\r\n        \"   <Key>fun/movie/001.avi</Key>\"\r\n        \"   <LastModified>2012-02-24T08:43:07.000Z</LastModified>\"\r\n        \"   <ETag>&quot;5B3C1A2E053D763E1B002CC607C&quot;</ETag>\"\r\n        \"   <Type>Normal</Type>\"\r\n        \"   <Size>344606</Size>\"\r\n        \"   <StorageClass>Standard</StorageClass>\"\r\n        \"   <Owner>\"\r\n        \"       <ID>0022012****</ID>\"\r\n        \"       <DisplayName>user-example</DisplayName>\"\r\n        \"   </Owner>\"\r\n        \"</Contents>\"\r\n        \"<Contents>\"\r\n        \"   <Key>fun/movie/007.avi</Key>\"\r\n        \"   <LastModified>2012-02-24T08:43:27.000Z</LastModified>\"\r\n        \"   <ETag>&quot;5B3C1A2E053D763E1B002CC607C&quot;</ETag>\"\r\n        \"   <Type>Normal</Type>\"\r\n        \"   <Size>344606</Size>\"\r\n        \"   <StorageClass>Standard</StorageClass>\"\r\n        \"   <Owner>\"\r\n        \"       <ID>0022012****</ID>\"\r\n        \"       <DisplayName>user-example</DisplayName>\"\r\n        \"   </Owner>\"\r\n        \"</Contents>\"\r\n        \"</ListBucketResult>\";\r\n    int ret;\n    aos_list_t object_list;\n    aos_list_t common_prefix_list;\n    aos_string_t marker;\n    int truncated;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_list_objects_parse_from_body(p, &buffer, NULL, NULL, NULL, NULL);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_list_init(&object_list);\r\n    aos_list_init(&common_prefix_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, full_node_xml, strlen(full_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_list_objects_parse_from_body(p, &buffer, &object_list, &common_prefix_list, &marker, &truncated);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_list_buckets_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<ListAllMyBucketsResult><Buckets><Bucket></Bucket></Buckets></ListAllMyBucketsResult>\";\r\n    char *full_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\r\n        \"<ListAllMyBucketsResult>\"\r\n        \"  <Owner>\"\r\n        \"    <ID>512**</ID>\"\r\n        \"    <DisplayName>51264</DisplayName>\"\r\n        \"  </Owner>\"\r\n        \"  <Buckets>\"\r\n        \"    <Bucket>\"\r\n        \"      <CreationDate>2015-12-17T18:12:43.000Z</CreationDate>\"\r\n        \"      <ExtranetEndpoint></ExtranetEndpoint>\"\r\n        \"      <IntranetEndpoint></IntranetEndpoint>\"\r\n        \"      <Location>oss-cn-shanghai</Location>\"\r\n        \"      <Name>app-base-oss</Name>\"\r\n        \"      <StorageClass>Standard</StorageClass>\"\r\n        \"    </Bucket>\"\r\n        \"  </Buckets>\"\r\n        \"</ListAllMyBucketsResult>\";\r\n    int ret;\n    mxml_node_t *root;\r\n    oss_list_buckets_params_t *params = NULL;\n    aos_list_t node_list;\n\n    aos_pool_create(&p, NULL);\n\n    params = oss_create_list_buckets_params(p);\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_list_buckets_parse_from_body(p, &buffer, params);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_list_buckets_parse_from_body(p, &buffer, params);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&buffer);\r\n    aos_list_init(&node_list);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n    oss_list_buckets_content_parse(p, root, &node_list);\n    oss_list_buckets_content_parse(NULL, root, &node_list);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, full_node_xml, strlen(full_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_list_buckets_parse_from_body(p, &buffer, params);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    mxmlDelete(root);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_get_bucket_info_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    oss_bucket_info_t bucket_info;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_info_parse_from_body(p, &buffer, &bucket_info);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_info_parse_from_body(p, &buffer, &bucket_info);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_get_bucket_info_parse_from_body_pasitive(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<BucketInfo>\\n\"\r\n        \"  <Bucket>\\n\"\r\n        \"    <CreationDate>2013-07-31T10:56:21.000Z</CreationDate>\\n\"\r\n        \"    <ExtranetEndpoint>oss-cn-hangzhou.aliyuncs.com</ExtranetEndpoint>\\n\"\r\n        \"    <IntranetEndpoint>oss-cn-hangzhou-internal.aliyuncs.com</IntranetEndpoint>\\n\"\r\n        \"    <Location>oss-cn-hangzhou</Location>\\n\"\r\n        \"    <Name>oss-example</Name>\\n\"\r\n        \"    <Owner>\\n\"\r\n        \"      <DisplayName>username</DisplayName>\\n\"\r\n        \"      <ID>27183473914****</ID>\\n\"\r\n        \"    </Owner>\\n\"\r\n        \"    <AccessControlList>\\n\"\r\n        \"      <Grant>private</Grant>\\n\"\r\n        \"    </AccessControlList>\\n\"\r\n        \"    <Comment>test</Comment>\\n\"\r\n        \"  </Bucket>\\n\"\r\n        \"</BucketInfo>\\n\"\n        ;\n\n    int ret;\n    oss_bucket_info_t bucket_info;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, xml, strlen(xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_info_parse_from_body(p, &buffer, &bucket_info);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertStrEquals(tc, bucket_info.location.data, \"oss-cn-hangzhou\");\n    CuAssertStrEquals(tc, bucket_info.created_date.data, \"2013-07-31T10:56:21.000Z\");\n    CuAssertStrEquals(tc, bucket_info.acl.data, \"private\");\n    CuAssertStrEquals(tc, bucket_info.storage_class.data, NULL);\n    CuAssertIntEquals(tc, bucket_info.storage_class.len, 0);\n\n    xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<BucketInfo>\\n\"\r\n        \"  <Bucket>\\n\"\r\n        \"    <CreationDate>2013-07-31T10:56:21.000Z</CreationDate>\\n\"\r\n        \"    <ExtranetEndpoint>oss-cn-hangzhou.aliyuncs.com</ExtranetEndpoint>\\n\"\r\n        \"    <IntranetEndpoint>oss-cn-hangzhou-internal.aliyuncs.com</IntranetEndpoint>\\n\"\r\n        \"    <Location>oss-cn-hangzhou</Location>\\n\"\r\n        \"    <Name>oss-example</Name>\\n\"\r\n        \"    <Owner>\\n\"\r\n        \"      <DisplayName>username</DisplayName>\\n\"\r\n        \"      <ID>27183473914****</ID>\\n\"\r\n        \"    </Owner>\\n\"\r\n        \"    <AccessControlList>\\n\"\r\n        \"      <Grant>public-read</Grant>\\n\"\r\n        \"    </AccessControlList>\\n\"\r\n        \"    <Comment>test</Comment>\\n\"\r\n        \"    <StorageClass>Archive</StorageClass>\\n\"\r\n        \"  </Bucket>\\n\"\r\n        \"</BucketInfo>\\n\"\n        ;\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, xml, strlen(xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_info_parse_from_body(p, &buffer, &bucket_info);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertStrEquals(tc, bucket_info.location.data, \"oss-cn-hangzhou\");\n    CuAssertStrEquals(tc, bucket_info.created_date.data, \"2013-07-31T10:56:21.000Z\");\n    CuAssertStrEquals(tc, bucket_info.acl.data, \"public-read\");\n    CuAssertStrEquals(tc, bucket_info.storage_class.data, \"Archive\");\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_get_bucket_stat_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    oss_bucket_stat_t bucket_stat;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_stat_parse_from_body(p, &buffer, &bucket_stat);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_stat_parse_from_body(p, &buffer, &bucket_stat);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_get_bucket_website_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    oss_website_config_t website_config;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_website_parse_from_body(p, &buffer, &website_config);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_website_parse_from_body(p, &buffer, &website_config);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_get_bucket_referer_config_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    char *full_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<RefererConfiguration>\"\r\n        \"    <AllowEmptyReferer>false</AllowEmptyReferer>\"\r\n        \"    <RefererList>\"\r\n        \"        <Referer>http://abc.com</Referer>\"\r\n        \"        <Referer>http://www.*.com</Referer>\"\r\n        \"    </RefererList>\"\r\n        \"</RefererConfiguration>\";\r\n\r\n    int ret;\n    oss_referer_config_t referer_config;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    aos_list_init(&referer_config.referer_list);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_referer_config_parse_from_body(p, &buffer, &referer_config);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n\n    aos_list_init(&buffer);\r\n    aos_list_init(&referer_config.referer_list);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_referer_config_parse_from_body(p, &buffer, &referer_config);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&buffer);\r\n    aos_list_init(&referer_config.referer_list);\r\n    content = aos_buf_pack(p, full_node_xml, strlen(full_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_referer_config_parse_from_body(p, &buffer, &referer_config);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_cors_rule_content_parse_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    mxml_node_t *root;\r\n    aos_list_t node_list;\r\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&node_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n\n    oss_cors_rule_content_parse(p, root, &node_list);\n\n    oss_cors_rule_content_parse(NULL, root, &node_list);\n\n    mxmlDelete(root);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_get_bucket_cors_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    char *full_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<CORSConfiguration>\"\r\n        \"    <CORSRule>\"\r\n        \"      <AllowedOrigin>abc</AllowedOrigin>\"\r\n        \"      <AllowedMethod>GET</AllowedMethod>\"\r\n        \"      <AllowedHeader>*</AllowedHeader>\"\r\n        \"      <ExposeHeader>x-oss-test</ExposeHeader>\"\r\n        \"      <MaxAgeSeconds>100</MaxAgeSeconds>\"\r\n        \"    </CORSRule>\"\r\n        \"</CORSConfiguration>\";\r\n    int ret;\n    aos_list_t rule_list;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&rule_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_cors_parse_from_body(p, &buffer, &rule_list);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_list_init(&rule_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_cors_parse_from_body(p, &buffer, &rule_list);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&rule_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_cors_parse_from_body(NULL, &buffer, &rule_list);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&rule_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, full_node_xml, strlen(full_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_bucket_cors_parse_from_body(p, &buffer, &rule_list);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_list_parts_content_parse_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    mxml_node_t *root;\r\n    oss_list_part_content_t part_content;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n\n    oss_list_parts_content_parse(p, root, &part_content);\n\n    mxmlDelete(root);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_list_parts_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    int ret;\n    aos_list_t rule_list;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&rule_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_list_parts_parse_from_body(p, &buffer, NULL, NULL, NULL);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_list_multipart_uploads_content_parse_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    mxml_node_t *root;\r\n    oss_list_multipart_upload_content_t upload_content;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n\n    oss_list_multipart_uploads_content_parse(p, root, &upload_content);\n\n    mxmlDelete(root);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_list_multipart_uploads_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n\n    aos_list_t upload_list;\n    aos_string_t key_marker;\n    aos_string_t upload_id_marker;\n    int truncated;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_list_multipart_uploads_parse_from_body(p, &buffer, NULL, NULL, NULL, NULL);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_list_init(&upload_list);\r\n    aos_str_set(&key_marker, \"\");\r\n    aos_str_set(&upload_id_marker, \"\");\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_list_multipart_uploads_parse_from_body(p, &buffer, &upload_list, &key_marker, &upload_id_marker, &truncated);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_upload_id_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    aos_string_t upload_id;\n\n    aos_pool_create(&p, NULL);\n\n    aos_str_set(&upload_id, \"\");\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_upload_id_parse_from_body(p, &buffer, &upload_id);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_str_set(&upload_id, \"\");\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_upload_id_parse_from_body(p, &buffer, &upload_id);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_lifecycle_rule_content_parse_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    mxml_node_t *root;\r\n    oss_lifecycle_rule_content_t rule_content;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n\n    oss_lifecycle_rule_content_parse(p, root, &rule_content);\n\n    mxmlDelete(root);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_live_channel_info_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    char *root_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<LiveChannelConfiguration></LiveChannelConfiguration>\";\r\n    char *sub_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<LiveChannelConfiguration><Target></Target></LiveChannelConfiguration>\";\r\n\n    int ret;\n    oss_live_channel_configuration_t info;\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_live_channel_info_parse_from_body(p, &buffer, &info);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_live_channel_info_parse_from_body(p, &buffer, &info);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, root_node_xml, strlen(root_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_live_channel_info_parse_from_body(p, &buffer, &info);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, sub_node_xml, strlen(sub_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_live_channel_info_parse_from_body(p, &buffer, &info);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\n\n//oss_list_live_channel_content_parse\n//\nstatic void test_oss_live_channel_stat_video_content_parse(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n\n    char *full_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Video>\"\r\n        \"<Width>1280</Width>\"\r\n        \"<Height>536</Height>\"\r\n        \"<FrameRate>24</FrameRate>\"\r\n        \"<Bandwidth>0</Bandwidth>\"\r\n        \"<Codec>H264</Codec>\"\r\n        \"</Video>\";\r\n\n    int ret;\n    mxml_node_t *root;\r\n    oss_video_stat_t video_stat;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n    oss_live_channel_stat_video_content_parse(p, root, &video_stat);\n    mxmlDelete(root);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, full_node_xml, strlen(full_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n    oss_live_channel_stat_video_content_parse(p, root, &video_stat);\n    CuAssertIntEquals(tc, 0, video_stat.band_width);\n    CuAssertIntEquals(tc, 1280, video_stat.width);\n    CuAssertIntEquals(tc, 536, video_stat.height);\n    CuAssertIntEquals(tc, 24, video_stat.frame_rate);\n    CuAssertStrEquals(tc, \"H264\", video_stat.codec.data);\n\n    mxmlDelete(root);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n\n}\n\nstatic void test_oss_live_channel_stat_audio_content_parse(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n\n    char *full_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Audio>\"\r\n        \"<Bandwidth>0</Bandwidth>\"\r\n        \"<SampleRate>44100</SampleRate>\"\r\n        \"<Codec>ADPCM</Codec>\"\r\n        \"</Audio>\";\r\n\n    int ret;\n    mxml_node_t *root;\r\n    oss_audio_stat_t audio_stat;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n    oss_live_channel_stat_audio_content_parse(p, root, &audio_stat);\n    mxmlDelete(root);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, full_node_xml, strlen(full_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n    oss_live_channel_stat_audio_content_parse(p, root, &audio_stat);\n    CuAssertIntEquals(tc, 0, audio_stat.band_width);\n    CuAssertIntEquals(tc, 44100, audio_stat.sample_rate);\n    CuAssertStrEquals(tc, \"ADPCM\", audio_stat.codec.data);\n\n    mxmlDelete(root);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n\n}\n\nstatic void test_oss_live_channel_stat_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    char *root_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<LiveChannelStat></LiveChannelStat>\";\r\n    char *full_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<LiveChannelStat>\"\r\n        \"  <Status>Live</Status>\"\r\n        \"  <ConnectedTime>2016-08-25T06:25:15.000Z</ConnectedTime>\"\r\n        \"  <RemoteAddr>10.1.2.3:47745</RemoteAddr>\"\r\n        \"  <Video>\"\r\n        \"    <Width>1280</Width>\"\r\n        \"    <Height>536</Height>\"\r\n        \"    <FrameRate>24</FrameRate>\"\r\n        \"    <Bandwidth>0</Bandwidth>\"\r\n        \"    <Codec>H264</Codec>\"\r\n        \"  </Video>\"\r\n        \"  <Audio>\"\r\n        \"    <Bandwidth>0</Bandwidth>\"\r\n        \"    <SampleRate>44100</SampleRate>\"\r\n        \"    <Codec>ADPCM</Codec>\"\r\n        \"  </Audio>\"\r\n        \"</LiveChannelStat>\";\n\n    int ret;\n    oss_live_channel_stat_t stat;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_live_channel_stat_parse_from_body(p, &buffer, &stat);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_live_channel_stat_parse_from_body(p, &buffer, &stat);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, root_node_xml, strlen(root_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_live_channel_stat_parse_from_body(p, &buffer, &stat);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, full_node_xml, strlen(full_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_live_channel_stat_parse_from_body(p, &buffer, &stat);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    CuAssertStrEquals(tc, \"2016-08-25T06:25:15.000Z\", stat.connected_time.data);\n    CuAssertStrEquals(tc, \"10.1.2.3:47745\", stat.remote_addr.data);\n\n    CuAssertIntEquals(tc, 0, stat.video_stat.band_width);\n    CuAssertIntEquals(tc, 1280, stat.video_stat.width);\n    CuAssertIntEquals(tc, 536, stat.video_stat.height);\n    CuAssertIntEquals(tc, 24, stat.video_stat.frame_rate);\n    CuAssertStrEquals(tc, \"H264\", stat.video_stat.codec.data);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_list_live_channel_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    char *root_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<LiveChannel></LiveChannel>\";\r\n    char *full_node_xml =\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<ListLiveChannelResult>\"\r\n        \"  <Prefix></Prefix>\"\r\n        \"  <Marker></Marker>\"\r\n        \"  <MaxKeys>1</MaxKeys>\"\r\n        \"  <IsTruncated>true</IsTruncated>\"\r\n        \"  <NextMarker>channel-0</NextMarker>\"\r\n        \"  <LiveChannel>\"\r\n        \"    <Name>channel-0</Name>\"\r\n        \"    <Description></Description>\"\r\n        \"    <Status>disabled</Status>\"\r\n        \"    <LastModified>2016-07-30T01:54:21.000Z</LastModified>\"\r\n        \"    <PublishUrls>\"\r\n        \"      <Url>rtmp://test-bucket.oss-cn-hangzhou.aliyuncs.com/live/channel-0</Url>\"\r\n        \"    </PublishUrls>\"\r\n        \"    <PlayUrls>\"\r\n        \"      <Url>http://test-bucket.oss-cn-hangzhou.aliyuncs.com/channel-0/playlist.m3u8</Url>\"\r\n        \"    </PlayUrls>\"\r\n        \"  </LiveChannel>\"\n        \"</ListLiveChannelResult>\";\r\n\n    int ret;\n    aos_list_t live_channel_list;\n    aos_string_t next_marker;\n    int truncated;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&live_channel_list);\r\n    aos_str_set(&next_marker, \"\");\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_list_live_channel_parse_from_body(p, &buffer, &live_channel_list, &next_marker, &truncated);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_list_init(&live_channel_list);\r\n    aos_str_set(&next_marker, \"\");\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_list_live_channel_parse_from_body(p, &buffer, &live_channel_list, &next_marker, &truncated);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&live_channel_list);\r\n    aos_str_set(&next_marker, \"\");\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, root_node_xml, strlen(root_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_list_live_channel_parse_from_body(p, &buffer, &live_channel_list, &next_marker, &truncated);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&live_channel_list);\r\n    aos_str_set(&next_marker, \"\");\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, full_node_xml, strlen(full_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_list_live_channel_parse_from_body(p, &buffer, &live_channel_list, &next_marker, &truncated);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_live_channel_history_content_parse(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n\n    char *full_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<StartTime>2016-07-30T01:53:21.000Z</StartTime>\"\r\n        \"<EndTime>2016-07-30T01:53:31.000Z</EndTime>\"\r\n        \"<RemoteAddr>10.101.194.148:56861</RemoteAddr>\";\r\n\n    int ret;\n    mxml_node_t *root;\r\n    oss_live_record_content_t record_content;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n    oss_live_channel_history_content_parse(p, root, &record_content);\n    mxmlDelete(root);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, full_node_xml, strlen(full_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n    oss_live_channel_history_content_parse(p, root, &record_content);\n    CuAssertStrEquals(tc, \"2016-07-30T01:53:21.000Z\", record_content.start_time.data);\n    CuAssertStrEquals(tc, \"2016-07-30T01:53:31.000Z\", record_content.end_time.data);\n    CuAssertStrEquals(tc, \"10.101.194.148:56861\", record_content.remote_addr.data);\n\n    mxmlDelete(root);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n\n}\n\nstatic void test_oss_live_channel_history_parse_from_body(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    char *full_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<LiveChannelHistory>\"\r\n        \"<LiveRecord>\"\r\n        \"<StartTime>2016-07-30T01:53:21.000Z</StartTime>\"\r\n        \"<EndTime>2016-07-30T01:53:31.000Z</EndTime>\"\r\n        \"<RemoteAddr>10.101.194.148:56861</RemoteAddr>\"\r\n        \"</LiveRecord>\"\r\n        \"<LiveRecord>\"\r\n        \"<StartTime>2016-07-30T01:53:35.000Z</StartTime>\"\r\n        \"<EndTime>2016-07-30T01:53:45.000Z</EndTime>\"\r\n        \"<RemoteAddr>10.101.194.148:57126</RemoteAddr>\"\r\n        \"</LiveRecord>\"\r\n        \"<LiveRecord>\"\r\n        \"<StartTime>2016-07-30T01:53:49.000Z</StartTime>\"\r\n        \"<EndTime>2016-07-30T01:53:59.000Z</EndTime>\"\r\n        \"<RemoteAddr>10.101.194.148:57577</RemoteAddr>\"\r\n        \"</LiveRecord>\"\r\n        \"<LiveRecord>\"\r\n        \"<StartTime>2016-07-30T01:54:04.000Z</StartTime>\"\r\n        \"<EndTime>2016-07-30T01:54:14.000Z</EndTime>\"\r\n        \"<RemoteAddr>10.101.194.148:57632</RemoteAddr>\"\r\n        \"</LiveRecord>\"\r\n        \"</LiveChannelHistory>\";\n    aos_list_t live_record_list;\n    int ret;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&live_record_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_live_channel_history_parse_from_body(p, &buffer, &live_record_list);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_list_init(&live_record_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_live_channel_history_parse_from_body(p, &buffer, &live_record_list);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&live_record_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, full_node_xml, strlen(full_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_live_channel_history_parse_from_body(p, &buffer, &live_record_list);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_create_live_channel_parse_from_body(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_create_live_channel_parse_from_body(p, &buffer, NULL, NULL);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_create_live_channel_parse_from_body(p, &buffer, NULL, NULL);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_get_tagging_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    char *root_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Tagging></Tagging>\";\r\n\n    int ret;\n    aos_list_t tag_list;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&tag_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_tagging_parse_from_body(p, &buffer, &tag_list);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_list_init(&tag_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_tagging_parse_from_body(p, &buffer, &tag_list);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&tag_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, root_node_xml, strlen(root_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_get_tagging_parse_from_body(p, &buffer, &tag_list);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_get_xmlnode_value(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    mxml_node_t *root;\n    int ret;\n\n    aos_pool_create(&p, NULL);\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    get_xmlnode_value_int(p, root, \"Node\", NULL);\n    get_xmlnode_value_int64(p, root, \"Node\", NULL);\n\n    mxmlDelete(root);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n\n}\n\nstatic void test_oss_lifecycle_rules_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n\n    int ret;\n    aos_list_t lifecycle_rule_list;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&lifecycle_rule_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_lifecycle_rules_parse_from_body(p, &buffer, &lifecycle_rule_list);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_list_init(&lifecycle_rule_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_lifecycle_rules_parse_from_body(p, &buffer, &lifecycle_rule_list);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_lifecycle_rule_tag_parse_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    int ret;\n    mxml_node_t *root;\r\n    oss_tag_content_t tag;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = get_xmldoc(&buffer, &root);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n    CuAssertTrue(tc, root != NULL);\n\n    oss_lifecycle_rule_tag_parse(p, root, &tag);\n\n    mxmlDelete(root);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_delete_objects_parse_from_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t buffer;\r\n    aos_buf_t *content;\r\n    char *invalid_xml = \"Invalid\";\r\n    char *no_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\r\n    char *root_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<Invalid></Invalid>\";\n    char *full_node_xml =\r\n        \"<?xml version = \\\"1.0\\\" encoding = \\\"UTF-8\\\"?>\\n\"\n        \"<DeleteResult>\"\r\n        \"    <Deleted>\"\r\n        \"    </Deleted>\"\r\n        \"    <Deleted>\"\r\n        \"       <Key>test.jpg</Key>\"\r\n        \"    </Deleted>\"\r\n        \"</DeleteResult>\";\n    int ret;\n    aos_list_t object_list;\n\n    aos_pool_create(&p, NULL);\n\n    aos_list_init(&object_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, invalid_xml, strlen(invalid_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_delete_objects_parse_from_body(p, &buffer, &object_list);\n    CuAssertIntEquals(tc, AOSE_XML_PARSE_ERROR, ret);\n\n    aos_list_init(&object_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, no_node_xml, strlen(no_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_delete_objects_parse_from_body(p, &buffer, &object_list);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&object_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, root_node_xml, strlen(root_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_delete_objects_parse_from_body(p, &buffer, &object_list);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_list_init(&object_list);\r\n    aos_list_init(&buffer);\r\n    content = aos_buf_pack(p, full_node_xml, strlen(full_node_xml));\r\n    aos_list_add_tail(&content->node, &buffer);\n    ret = oss_delete_objects_parse_from_body(p, &buffer, &object_list);\n    CuAssertIntEquals(tc, AOSE_OK, ret);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_build_bucket_logging_body_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    oss_logging_config_content_t content;\n    aos_list_t body;\n\n    aos_pool_create(&p, NULL);\n\r\n    aos_list_init(&body);\r\n    aos_str_set(&content.target_bucket, \"\");\n    aos_str_set(&content.prefix, \"\");\n    build_bucket_logging_body(p, &content, &body);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_build_bucket_storage_class_negative(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t body;\n\n    aos_pool_create(&p, NULL);\n\r\n    aos_list_init(&body);\r\n    build_bucket_storage_class(p, OSS_STORAGE_CLASS_BUTT, &body);\n    CuAssertTrue(tc, aos_list_empty(&body) == 1);\n\n    aos_list_init(&body);\r\n    build_bucket_storage_class(p, OSS_STORAGE_CLASS_STANDARD, &body);\n    CuAssertTrue(tc, aos_list_empty(&body) == 0);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_publish_url_parse(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_pool_create(&p, NULL);\n\n    oss_publish_url_parse(p, NULL, NULL);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_play_url_parse(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_pool_create(&p, NULL);\n\n    oss_play_url_parse(p, NULL, NULL);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_build_select_object_body(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t body;\n    aos_string_t expression;\n    aos_pool_create(&p, NULL);\n\n    oss_build_select_object_body(p, NULL, NULL, &body);\n\n    oss_build_select_object_body(p, &expression, NULL, &body);\n\n    aos_pool_destroy(p);\n\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_build_create_select_object_meta_body(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t body;\n    aos_pool_create(&p, NULL);\n    oss_build_create_select_object_meta_body(p, NULL, &body);\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\nstatic void test_oss_build_restore_object_body(CuTest *tc)\n{\n    aos_pool_t *p;\n    aos_list_t body;\n    int64_t len = 0;\r\n    int64_t size = 0;\n    int64_t pos = 0;\n    char *buf = NULL;\n    aos_buf_t *content = NULL;\n    aos_pool_create(&p, NULL);\n\n    oss_build_restore_object_body(p, OSS_TIER_BULK, 3, &body);\n    len = aos_buf_list_len(&body);\r\n    buf = aos_pcalloc(p, len + 1);\r\n    buf[len] = '\\0';\r\n    aos_list_for_each_entry(aos_buf_t, content, &body, node) {\r\n        size = aos_buf_size(content);\r\n        memcpy(buf + pos, content->pos, size);\r\n        pos += size;\r\n    }\n    CuAssertTrue(tc, strstr(buf, \"<Days>3</Days>\") != NULL);\n    CuAssertTrue(tc, strstr(buf, \"<JobParameters><Tier>Bulk</Tier></JobParameters>\") != NULL);\n\n    aos_list_init(&body);\r\n    pos = len = size = 0;\r\n    oss_build_restore_object_body(p, OSS_TIER_EXPEDITED, 10, &body);\n    len = aos_buf_list_len(&body);\r\n    buf = aos_pcalloc(p, len + 1);\r\n    buf[len] = '\\0';\r\n    aos_list_for_each_entry(aos_buf_t, content, &body, node) {\r\n        size = aos_buf_size(content);\r\n        memcpy(buf + pos, content->pos, size);\r\n        pos += size;\r\n    }\n    CuAssertTrue(tc, strstr(buf, \"<Days>10</Days>\") != NULL);\n    CuAssertTrue(tc, strstr(buf, \"<JobParameters><Tier>Expedited</Tier></JobParameters>\") != NULL);\n\n    aos_list_init(&body);\r\n    pos = len = size = 0;\r\n    oss_build_restore_object_body(p, OSS_TIER_STANDARD, 1, &body);\n    len = aos_buf_list_len(&body);\r\n    buf = aos_pcalloc(p, len + 1);\r\n    buf[len] = '\\0';\r\n    aos_list_for_each_entry(aos_buf_t, content, &body, node) {\r\n        size = aos_buf_size(content);\r\n        memcpy(buf + pos, content->pos, size);\r\n        pos += size;\r\n    }\n    CuAssertTrue(tc, strstr(buf, \"<Days>1</Days>\") != NULL);\n    CuAssertTrue(tc, strstr(buf, \"<JobParameters><Tier>Standard</Tier></JobParameters>\") != NULL);\n\n    aos_pool_destroy(p);\n    printf(\"%s ok\\n\", __FUNCTION__);\n}\n\n//\n//build_bucket_storage_capacity_body\n//oss_build_create_select_object_meta_xml\n//\n\n\nCuSuite *test_oss_xml()\n{\n    CuSuite* suite = CuSuiteNew();\n\n    SUITE_ADD_TEST(suite, test_oss_xml_setup);\n    SUITE_ADD_TEST(suite, test_get_xmldoc_negative);\n    SUITE_ADD_TEST(suite, test_oss_acl_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_location_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_storage_capacity_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_logging_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_list_objects_owner_parse_negative);\n    SUITE_ADD_TEST(suite, test_oss_list_objects_content_parse_negative);\n    SUITE_ADD_TEST(suite, test_oss_list_objects_prefix_parse_negative);\n    SUITE_ADD_TEST(suite, test_oss_list_objects_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_list_buckets_parse_from_body_negative);\n\n    SUITE_ADD_TEST(suite, test_oss_get_bucket_info_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_get_bucket_info_parse_from_body_pasitive);\n    SUITE_ADD_TEST(suite, test_oss_get_bucket_stat_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_get_bucket_website_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_get_bucket_referer_config_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_cors_rule_content_parse_negative);\n    SUITE_ADD_TEST(suite, test_oss_get_bucket_cors_parse_from_body_negative);\n    \n    SUITE_ADD_TEST(suite, test_oss_list_parts_content_parse_negative);\n    SUITE_ADD_TEST(suite, test_oss_list_parts_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_list_multipart_uploads_content_parse_negative);\n    SUITE_ADD_TEST(suite, test_oss_list_multipart_uploads_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_upload_id_parse_from_body_negative);\n    \n    SUITE_ADD_TEST(suite, test_oss_lifecycle_rule_content_parse_negative);\n\n    SUITE_ADD_TEST(suite, test_oss_live_channel_info_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_live_channel_stat_video_content_parse);\n    SUITE_ADD_TEST(suite, test_oss_live_channel_stat_audio_content_parse);\n    SUITE_ADD_TEST(suite, test_oss_live_channel_stat_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_list_live_channel_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_live_channel_history_content_parse);\n    SUITE_ADD_TEST(suite, test_oss_live_channel_history_parse_from_body);\n    SUITE_ADD_TEST(suite, test_oss_create_live_channel_parse_from_body);\n    \n    SUITE_ADD_TEST(suite, test_oss_get_tagging_parse_from_body_negative);\n\n    SUITE_ADD_TEST(suite, test_get_xmlnode_value);\n    SUITE_ADD_TEST(suite, test_oss_lifecycle_rules_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_oss_lifecycle_rule_tag_parse_negative);\n    SUITE_ADD_TEST(suite, test_oss_delete_objects_parse_from_body_negative);\n    SUITE_ADD_TEST(suite, test_build_bucket_logging_body_negative);\n    SUITE_ADD_TEST(suite, test_build_bucket_storage_class_negative);\n\n    SUITE_ADD_TEST(suite, test_oss_publish_url_parse);\n    SUITE_ADD_TEST(suite, test_oss_play_url_parse);\n    SUITE_ADD_TEST(suite, test_oss_build_select_object_body);\n    SUITE_ADD_TEST(suite, test_oss_build_create_select_object_meta_body);\n    \n    SUITE_ADD_TEST(suite, test_oss_build_restore_object_body);\n\n    SUITE_ADD_TEST(suite, test_oss_xml_cleanup);\n\n    return suite;\n}\n\n"
  },
  {
    "path": "third_party/include/apr/apr.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n#ifndef APR_H\n#define APR_H\n\n/* GENERATED FILE WARNING!  DO NOT EDIT apr.h\n *\n * You must modify apr.hw instead.\n *\n * And please, make an effort to stub apr.hnw and apr.h.in in the process.\n *\n * This is the Win32 specific version of apr.h.  It is copied from\n * apr.hw by the apr.dsp and libapr.dsp projects. \n */\n\n/**\n * @file apr.h\n * @brief APR Platform Definitions\n * @remark This is a generated header generated from include/apr.h.in by\n * ./configure, or copied from include/apr.hw or include/apr.hnw \n * for Win32 or Netware by those build environments, respectively.\n */\n\n/* Make sure we have our platform identifier macro defined we ask for later.\n */\n#if defined(_WIN32) && !defined(WIN32)\n#define WIN32 1\n#endif\n\n#if defined(WIN32) || defined(DOXYGEN)\n\n/* Ignore most warnings (back down to /W3) for poorly constructed headers\n */\n#if defined(_MSC_VER) && _MSC_VER >= 1200\n#pragma warning(push, 3)\n#endif\n\n/* disable or reduce the frequency of...\n *   C4057: indirection to slightly different base types\n *   C4075: slight indirection changes (unsigned short* vs short[])\n *   C4100: unreferenced formal parameter\n *   C4127: conditional expression is constant\n *   C4163: '_rotl64' : not available as an intrinsic function\n *   C4201: nonstandard extension nameless struct/unions\n *   C4244: int to char/short - precision loss\n *   C4514: unreferenced inline function removed\n */\n#pragma warning(disable: 4100 4127 4163 4201 4514; once: 4057 4075 4244)\n\n/* Ignore Microsoft's interpretation of secure development\n * and the POSIX string handling API\n */\n#if defined(_MSC_VER) && _MSC_VER >= 1400\n#ifndef _CRT_SECURE_NO_DEPRECATE\n#define _CRT_SECURE_NO_DEPRECATE\n#endif\n#pragma warning(disable: 4996)\n#endif\n\n/* Has windows.h already been included?  If so, our preferences don't matter,\n * but we will still need the winsock things no matter what was included.\n * If not, include a restricted set of windows headers to our tastes.\n */\n#ifndef _WINDOWS_\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#ifndef _WIN32_WINNT\n\n/* Restrict the server to a subset of Windows XP header files by default\n */\n#define _WIN32_WINNT 0x0501\n#endif\n#ifndef NOUSER\n#define NOUSER\n#endif\n#ifndef NOMCX\n#define NOMCX\n#endif\n#ifndef NOIME\n#define NOIME\n#endif\n#include <windows.h>\n/* \n * Add a _very_few_ declarations missing from the restricted set of headers\n * (If this list becomes extensive, re-enable the required headers above!)\n * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now\n */\n#define SW_HIDE             0\n#ifndef _WIN32_WCE\n#include <winsock2.h>\n#include <ws2tcpip.h>\n#include <mswsock.h>\n#else\n#include <winsock.h>\n#endif\n#endif /* !_WINDOWS_ */\n\n/**\n * @defgroup APR Apache Portability Runtime library\n * @{\n */\n/**\n * @defgroup apr_platform Platform Definitions\n * @{\n * @warning\n * <strong><em>The actual values of macros and typedefs on this page<br>\n * are platform specific and should NOT be relied upon!</em></strong>\n */\n\n#define APR_INLINE __inline\n#define APR_HAS_INLINE          1\n#if !defined(__GNUC__) && !defined(__attribute__)\n#define __attribute__(__x)\n#endif\n\n#ifndef _WIN32_WCE\n#define APR_HAVE_ARPA_INET_H    0\n#define APR_HAVE_CONIO_H        1\n#define APR_HAVE_CRYPT_H        0\n#define APR_HAVE_CTYPE_H        1\n#define APR_HAVE_DIRENT_H       0\n#define APR_HAVE_ERRNO_H        1\n#define APR_HAVE_FCNTL_H        1\n#define APR_HAVE_IO_H           1\n#define APR_HAVE_LIMITS_H       1\n#define APR_HAVE_NETDB_H        0\n#define APR_HAVE_NETINET_IN_H   0\n#define APR_HAVE_NETINET_SCTP_H 0\n#define APR_HAVE_NETINET_SCTP_UIO_H 0\n#define APR_HAVE_NETINET_TCP_H  0\n#define APR_HAVE_PTHREAD_H      0\n#define APR_HAVE_SEMAPHORE_H    0\n#define APR_HAVE_SIGNAL_H       1\n#define APR_HAVE_STDARG_H       1\n#define APR_HAVE_STDINT_H       0\n#define APR_HAVE_STDIO_H        1\n#define APR_HAVE_STDLIB_H       1\n#define APR_HAVE_STRING_H       1\n#define APR_HAVE_STRINGS_H      0\n#define APR_HAVE_SYS_IOCTL_H    0\n#define APR_HAVE_SYS_SENDFILE_H 0\n#define APR_HAVE_SYS_SIGNAL_H   0\n#define APR_HAVE_SYS_SOCKET_H   0\n#define APR_HAVE_SYS_SOCKIO_H   0\n#define APR_HAVE_SYS_SYSLIMITS_H 0\n#define APR_HAVE_SYS_TIME_H     0\n#define APR_HAVE_SYS_TYPES_H    1\n#define APR_HAVE_SYS_UIO_H      0\n#define APR_HAVE_SYS_UN_H       0\n#define APR_HAVE_SYS_WAIT_H     0\n#define APR_HAVE_TIME_H         1\n#define APR_HAVE_UNISTD_H       0\n#define APR_HAVE_STDDEF_H       1\n#define APR_HAVE_PROCESS_H      1\n#else\n#define APR_HAVE_ARPA_INET_H    0\n#define APR_HAVE_CONIO_H        0\n#define APR_HAVE_CRYPT_H        0\n#define APR_HAVE_CTYPE_H        0\n#define APR_HAVE_DIRENT_H       0\n#define APR_HAVE_ERRNO_H        0\n#define APR_HAVE_FCNTL_H        0\n#define APR_HAVE_IO_H           0\n#define APR_HAVE_LIMITS_H       0\n#define APR_HAVE_NETDB_H        0\n#define APR_HAVE_NETINET_IN_H   0\n#define APR_HAVE_NETINET_SCTP_H 0\n#define APR_HAVE_NETINET_SCTP_UIO_H 0\n#define APR_HAVE_NETINET_TCP_H  0\n#define APR_HAVE_PTHREAD_H      0\n#define APR_HAVE_SEMAPHORE_H    0\n#define APR_HAVE_SIGNAL_H       0\n#define APR_HAVE_STDARG_H       0\n#define APR_HAVE_STDINT_H       0\n#define APR_HAVE_STDIO_H        1\n#define APR_HAVE_STDLIB_H       1\n#define APR_HAVE_STRING_H       1\n#define APR_HAVE_STRINGS_H      0\n#define APR_HAVE_SYS_IOCTL_H    0\n#define APR_HAVE_SYS_SENDFILE_H 0\n#define APR_HAVE_SYS_SIGNAL_H   0\n#define APR_HAVE_SYS_SOCKET_H   0\n#define APR_HAVE_SYS_SOCKIO_H   0\n#define APR_HAVE_SYS_SYSLIMITS_H 0\n#define APR_HAVE_SYS_TIME_H     0\n#define APR_HAVE_SYS_TYPES_H    0\n#define APR_HAVE_SYS_UIO_H      0\n#define APR_HAVE_SYS_UN_H       0\n#define APR_HAVE_SYS_WAIT_H     0\n#define APR_HAVE_TIME_H         0\n#define APR_HAVE_UNISTD_H       0\n#define APR_HAVE_STDDEF_H       0\n#define APR_HAVE_PROCESS_H      0\n#endif\n\n/** @} */\n/** @} */\n\n/* We don't include our conditional headers within the doxyblocks \n * or the extern \"C\" namespace \n */\n\n#if APR_HAVE_STDLIB_H\n#include <stdlib.h>\n#endif\n#if APR_HAVE_STDIO_H\n#include <stdio.h>\n#endif\n#if APR_HAVE_SYS_TYPES_H\n#include <sys/types.h>\n#endif\n#if APR_HAVE_STDDEF_H\n#include <stddef.h>\n#endif\n#if APR_HAVE_TIME_H\n#include <time.h>\n#endif\n#if APR_HAVE_PROCESS_H\n#include <process.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @addtogroup apr_platform\n * @ingroup APR \n * @{\n */\n\n#define APR_HAVE_SHMEM_MMAP_TMP     0\n#define APR_HAVE_SHMEM_MMAP_SHM     0\n#define APR_HAVE_SHMEM_MMAP_ZERO    0\n#define APR_HAVE_SHMEM_SHMGET_ANON  0\n#define APR_HAVE_SHMEM_SHMGET       0\n#define APR_HAVE_SHMEM_MMAP_ANON    0\n#define APR_HAVE_SHMEM_BEOS         0\n\n#define APR_USE_SHMEM_MMAP_TMP     0\n#define APR_USE_SHMEM_MMAP_SHM     0\n#define APR_USE_SHMEM_MMAP_ZERO    0\n#define APR_USE_SHMEM_SHMGET_ANON  0\n#define APR_USE_SHMEM_SHMGET       0\n#define APR_USE_SHMEM_MMAP_ANON    0\n#define APR_USE_SHMEM_BEOS         0\n\n#define APR_USE_FLOCK_SERIALIZE           0 \n#define APR_USE_POSIXSEM_SERIALIZE        0\n#define APR_USE_SYSVSEM_SERIALIZE         0\n#define APR_USE_FCNTL_SERIALIZE           0\n#define APR_USE_PROC_PTHREAD_SERIALIZE    0 \n#define APR_USE_PTHREAD_SERIALIZE         0 \n\n#define APR_HAS_FLOCK_SERIALIZE           0\n#define APR_HAS_SYSVSEM_SERIALIZE         0\n#define APR_HAS_POSIXSEM_SERIALIZE        0\n#define APR_HAS_FCNTL_SERIALIZE           0\n#define APR_HAS_PROC_PTHREAD_SERIALIZE    0\n\n#define APR_PROCESS_LOCK_IS_GLOBAL        0\n\n#define APR_HAVE_CORKABLE_TCP   0\n#define APR_HAVE_GETRLIMIT      0\n#define APR_HAVE_ICONV          0\n#define APR_HAVE_IN_ADDR        1\n#define APR_HAVE_INET_ADDR      1\n#define APR_HAVE_INET_NETWORK   0\n#define APR_HAVE_IPV6           0\n#define APR_HAVE_MEMMOVE        1\n#define APR_HAVE_SETRLIMIT      0\n#define APR_HAVE_SIGACTION      0\n#define APR_HAVE_SIGSUSPEND     0\n#define APR_HAVE_SIGWAIT        0\n#define APR_HAVE_SA_STORAGE     0\n#define APR_HAVE_STRCASECMP     0\n#define APR_HAVE_STRDUP         1\n#define APR_HAVE_STRNCASECMP    0\n#define APR_HAVE_STRSTR         1\n#define APR_HAVE_MEMCHR         1\n#define APR_HAVE_STRUCT_RLIMIT  0\n#define APR_HAVE_UNION_SEMUN    0\n#define APR_HAVE_SCTP           0\n#define APR_HAVE_IOVEC          0\n\n#ifndef _WIN32_WCE\n#define APR_HAVE_STRICMP        1\n#define APR_HAVE_STRNICMP       1\n#else\n#define APR_HAVE_STRICMP        0\n#define APR_HAVE_STRNICMP       0\n#endif\n\n/*  APR Feature Macros */\n#define APR_HAS_SHARED_MEMORY     1\n#define APR_HAS_THREADS           1\n#define APR_HAS_MMAP              1\n#define APR_HAS_FORK              0\n#define APR_HAS_RANDOM            1\n#define APR_HAS_OTHER_CHILD       1\n#define APR_HAS_DSO               1\n#define APR_HAS_SO_ACCEPTFILTER   0\n#define APR_HAS_UNICODE_FS        1\n#define APR_HAS_PROC_INVOKED      1\n#define APR_HAS_OS_UUID           1\n\n#ifndef _WIN32_WCE\n#define APR_HAS_SENDFILE          1\n#define APR_HAS_USER              1\n#define APR_HAS_LARGE_FILES       1\n#define APR_HAS_XTHREAD_FILES     1\n#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 1\n#else\n#define APR_HAS_SENDFILE          0\n#define APR_HAS_USER              0\n#define APR_HAS_LARGE_FILES       0\n#define APR_HAS_XTHREAD_FILES     0\n#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0\n#endif\n\n/* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible\n * to poll on files/pipes.\n */\n#define APR_FILES_AS_SOCKETS      0\n\n/* This macro indicates whether or not EBCDIC is the native character set.\n */\n#define APR_CHARSET_EBCDIC        0\n\n/* If we have a TCP implementation that can be \"corked\", what flag\n * do we use?\n */\n#define APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@\n\n/* Is the TCP_NODELAY socket option inherited from listening sockets?\n */\n#define APR_TCP_NODELAY_INHERITED 1\n\n/* Is the O_NONBLOCK flag inherited from listening sockets?\n */\n#define APR_O_NONBLOCK_INHERITED  1\n\n/* Typedefs that APR needs. */\n\ntypedef  unsigned char     apr_byte_t;\n\ntypedef  short             apr_int16_t;\ntypedef  unsigned short    apr_uint16_t;\n\ntypedef  int               apr_int32_t;\ntypedef  unsigned int      apr_uint32_t;\n\ntypedef  __int64           apr_int64_t;\ntypedef  unsigned __int64  apr_uint64_t;\n\ntypedef  size_t      apr_size_t;\n#if APR_HAVE_STDDEF_H\ntypedef  ptrdiff_t   apr_ssize_t;\n#else\ntypedef  int         apr_ssize_t;\n#endif\n#if APR_HAS_LARGE_FILES\ntypedef  __int64     apr_off_t;\n#else\ntypedef  int         apr_off_t;\n#endif\ntypedef  int         apr_socklen_t;\ntypedef  apr_uint64_t      apr_ino_t;\n\n#ifdef _WIN64\n#define APR_SIZEOF_VOIDP   8\n#else\n#define APR_SIZEOF_VOIDP   4\n#endif\n\n#if APR_SIZEOF_VOIDP == 8\ntypedef  apr_uint64_t            apr_uintptr_t;\n#else\ntypedef  apr_uint32_t            apr_uintptr_t;\n#endif\n\n/* Are we big endian? */\n/* XXX: Fatal assumption on Alpha platforms */\n#define APR_IS_BIGENDIAN\t0\n\n/* Mechanisms to properly type numeric literals */\n\n#ifndef __GNUC__\n#define APR_INT64_C(val) (val##i64)\n#define APR_UINT64_C(val) (val##Ui64)\n#else\n#define APR_INT64_C(val) (val##LL)\n#define APR_UINT64_C(val) (val##ULL)\n#endif\n\n#ifdef INT16_MIN\n#define APR_INT16_MIN   INT16_MIN\n#else\n#define APR_INT16_MIN   (-0x7fff - 1)\n#endif\n\n#ifdef INT16_MAX\n#define APR_INT16_MAX  INT16_MAX\n#else\n#define APR_INT16_MAX   (0x7fff)\n#endif\n\n#ifdef UINT16_MAX\n#define APR_UINT16_MAX  UINT16_MAX\n#else\n#define APR_UINT16_MAX  (0xffff)\n#endif\n\n#ifdef INT32_MIN\n#define APR_INT32_MIN   INT32_MIN\n#else\n#define APR_INT32_MIN   (-0x7fffffff - 1)\n#endif\n\n#ifdef INT32_MAX\n#define APR_INT32_MAX  INT32_MAX\n#else\n#define APR_INT32_MAX  0x7fffffff\n#endif\n\n#ifdef UINT32_MAX\n#define APR_UINT32_MAX  UINT32_MAX\n#else\n#define APR_UINT32_MAX  (0xffffffffU)\n#endif\n\n#ifdef INT64_MIN\n#define APR_INT64_MIN   INT64_MIN\n#else\n#define APR_INT64_MIN   (APR_INT64_C(-0x7fffffffffffffff) - 1)\n#endif\n\n#ifdef INT64_MAX\n#define APR_INT64_MAX   INT64_MAX\n#else\n#define APR_INT64_MAX   APR_INT64_C(0x7fffffffffffffff)\n#endif\n\n#ifdef UINT64_MAX\n#define APR_UINT64_MAX  UINT64_MAX\n#else\n#define APR_UINT64_MAX  APR_UINT64_C(0xffffffffffffffff)\n#endif\n\n#define APR_SIZE_MAX    (~((apr_size_t)0))\n\n/* Definitions that APR programs need to work properly. */\n\n/**\n * APR public API wrap for C++ compilers.\n */\n#ifdef __cplusplus\n#define APR_BEGIN_DECLS     extern \"C\" {\n#define APR_END_DECLS       }\n#else\n#define APR_BEGIN_DECLS\n#define APR_END_DECLS\n#endif\n\n/** \n * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC, \n * so that they follow the platform's calling convention.\n * <PRE>\n *\n * void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);\n *\n * </PRE>\n */\n#define APR_THREAD_FUNC  __stdcall\n\n\n#if defined(DOXYGEN) || !defined(WIN32)\n\n/**\n * The public APR functions are declared with APR_DECLARE(), so they may\n * use the most appropriate calling convention.  Public APR functions with \n * variable arguments must use APR_DECLARE_NONSTD().\n *\n * @remark Both the declaration and implementations must use the same macro.\n *\n * <PRE>\n * APR_DECLARE(rettype) apr_func(args)\n * </PRE>\n * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA\n * @remark Note that when APR compiles the library itself, it passes the \n * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32) \n * to export public symbols from the dynamic library build.\\n\n * The user must define the APR_DECLARE_STATIC when compiling to target\n * the static APR library on some platforms (e.g. Win32.)  The public symbols \n * are neither exported nor imported when APR_DECLARE_STATIC is defined.\\n\n * By default, compiling an application and including the APR public\n * headers, without defining APR_DECLARE_STATIC, will prepare the code to be\n * linked to the dynamic library.\n */\n#define APR_DECLARE(type)            type \n\n/**\n * The public APR functions using variable arguments are declared with \n * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.\n * @see APR_DECLARE @see APR_DECLARE_DATA\n * @remark Both the declaration and implementations must use the same macro.\n * <PRE>\n *\n * APR_DECLARE_NONSTD(rettype) apr_func(args, ...);\n *\n * </PRE>\n */\n#define APR_DECLARE_NONSTD(type)     type\n\n/**\n * The public APR variables are declared with AP_MODULE_DECLARE_DATA.\n * This assures the appropriate indirection is invoked at compile time.\n * @see APR_DECLARE @see APR_DECLARE_NONSTD\n * @remark Note that the declaration and implementations use different forms,\n * but both must include the macro.\n * \n * <PRE>\n *\n * extern APR_DECLARE_DATA type apr_variable;\\n\n * APR_DECLARE_DATA type apr_variable = value;\n *\n * </PRE>\n */\n#define APR_DECLARE_DATA\n\n#elif defined(APR_DECLARE_STATIC)\n#define APR_DECLARE(type)            type __stdcall\n#define APR_DECLARE_NONSTD(type)     type __cdecl\n#define APR_DECLARE_DATA\n#elif defined(APR_DECLARE_EXPORT)\n#define APR_DECLARE(type)            __declspec(dllexport) type __stdcall\n#define APR_DECLARE_NONSTD(type)     __declspec(dllexport) type __cdecl\n#define APR_DECLARE_DATA             __declspec(dllexport)\n#else\n#define APR_DECLARE(type)            __declspec(dllimport) type __stdcall\n#define APR_DECLARE_NONSTD(type)     __declspec(dllimport) type __cdecl\n#define APR_DECLARE_DATA             __declspec(dllimport)\n#endif\n\n#ifdef _WIN64\n#define APR_SSIZE_T_FMT          \"I64d\"\n#define APR_SIZE_T_FMT           \"I64u\"\n#else\n#define APR_SSIZE_T_FMT          \"d\"\n#define APR_SIZE_T_FMT           \"u\"\n#endif\n\n#if APR_HAS_LARGE_FILES\n#define APR_OFF_T_FMT            \"I64d\"\n#else\n#define APR_OFF_T_FMT            \"d\"\n#endif\n\n#define APR_PID_T_FMT            \"d\"\n\n#define APR_INT64_T_FMT          \"I64d\"\n#define APR_UINT64_T_FMT         \"I64u\"\n#define APR_UINT64_T_HEX_FMT     \"I64x\"\n\n/* No difference between PROC and GLOBAL mutex */\n#define APR_PROC_MUTEX_IS_GLOBAL      1\n\n/* Local machine definition for console and log output. */\n#define APR_EOL_STR              \"\\r\\n\"\n\ntypedef int apr_wait_t;\n\n#if APR_HAS_UNICODE_FS\n/* An arbitrary size that is digestable. True max is a bit less than 32000 */\n#define APR_PATH_MAX 8192\n#else /* !APR_HAS_UNICODE_FS */\n#define APR_PATH_MAX MAX_PATH\n#endif\n\n#define APR_DSOPATH \"PATH\"\n\n/** @} */\n\n/* Definitions that only Win32 programs need to compile properly. */\n\n/* XXX These simply don't belong here, perhaps in apr_portable.h\n * based on some APR_HAVE_PID/GID/UID?\n */\n#ifndef __GNUC__\ntypedef  int         pid_t;\n#endif\ntypedef  int         uid_t;\ntypedef  int         gid_t;\n\n/* Win32 .h ommissions we really need */\n#define STDIN_FILENO  0\n#define STDOUT_FILENO 1\n#define STDERR_FILENO 2\n\n#if APR_HAVE_IPV6\n\n/* Appears in later flavors, not the originals. */\n#ifndef in_addr6\n#define  in6_addr    in_addr6\n#endif\n\n#ifndef WS2TCPIP_INLINE\n#define IN6_IS_ADDR_V4MAPPED(a) \\\n    (   (*(const apr_uint64_t *)(const void *)(&(a)->s6_addr[0]) == 0) \\\n     && (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))\n#endif\n\n#endif /* APR_HAS_IPV6 */\n\n#ifdef __cplusplus\n}\n#endif\n\n/* Done with badly written headers\n */\n#if defined(_MSC_VER) && _MSC_VER >= 1200\n#pragma warning(pop)\n#pragma warning(disable: 4996)\n#endif\n\n#endif /* WIN32 */\n\n#endif /* APR_H */\n"
  },
  {
    "path": "third_party/include/apr/apr.h.in",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n#ifndef APR_H\n#define APR_H\n\n/* GENERATED FILE WARNING!  DO NOT EDIT apr.h\n *\n * You must modify apr.h.in instead.\n *\n * And please, make an effort to stub apr.hw and apr.hnw in the process.\n */\n\n/**\n * @file apr.h\n * @brief APR Platform Definitions\n * @remark This is a generated header generated from include/apr.h.in by\n * ./configure, or copied from include/apr.hw or include/apr.hnw \n * for Win32 or Netware by those build environments, respectively.\n */\n\n/**\n * @defgroup APR Apache Portability Runtime library\n * @{\n */\n/**\n * @defgroup apr_platform Platform Definitions\n * @{\n * @warning\n * <strong><em>The actual values of macros and typedefs on this page<br>\n * are platform specific and should NOT be relied upon!</em></strong>\n */\n\n/* So that we can use inline on some critical functions, and use\n * GNUC attributes (such as to get -Wall warnings for printf-like\n * functions).  Only do this in gcc 2.7 or later ... it may work\n * on earlier stuff, but why chance it.\n *\n * We've since discovered that the gcc shipped with NeXT systems\n * as \"cc\" is completely broken.  It claims to be __GNUC__ and so\n * on, but it doesn't implement half of the things that __GNUC__\n * means.  In particular it's missing inline and the __attribute__\n * stuff.  So we hack around it.  PR#1613. -djg\n */\n#if !defined(__GNUC__) || __GNUC__ < 2 || \\\n    (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\\\n    defined(NEXT)\n#ifndef __attribute__\n#define __attribute__(__x)\n#endif\n#define APR_INLINE\n#define APR_HAS_INLINE           0\n#else\n#define APR_INLINE __inline__\n#define APR_HAS_INLINE           1\n#endif\n\n#define APR_HAVE_ARPA_INET_H     @arpa_ineth@\n#define APR_HAVE_CONIO_H         @conioh@\n#define APR_HAVE_CRYPT_H         @crypth@\n#define APR_HAVE_CTYPE_H         @ctypeh@\n#define APR_HAVE_DIRENT_H        @direnth@\n#define APR_HAVE_ERRNO_H         @errnoh@\n#define APR_HAVE_FCNTL_H         @fcntlh@\n#define APR_HAVE_IO_H            @ioh@\n#define APR_HAVE_LIMITS_H        @limitsh@\n#define APR_HAVE_NETDB_H         @netdbh@\n#define APR_HAVE_NETINET_IN_H    @netinet_inh@\n#define APR_HAVE_NETINET_SCTP_H  @netinet_sctph@\n#define APR_HAVE_NETINET_SCTP_UIO_H @netinet_sctp_uioh@\n#define APR_HAVE_NETINET_TCP_H   @netinet_tcph@\n#define APR_HAVE_PROCESS_H       @processh@\n#define APR_HAVE_PTHREAD_H       @pthreadh@\n#define APR_HAVE_SEMAPHORE_H     @semaphoreh@\n#define APR_HAVE_SIGNAL_H        @signalh@\n#define APR_HAVE_STDARG_H        @stdargh@\n#define APR_HAVE_STDINT_H        @stdint@\n#define APR_HAVE_STDIO_H         @stdioh@\n#define APR_HAVE_STDLIB_H        @stdlibh@\n#define APR_HAVE_STRING_H        @stringh@\n#define APR_HAVE_STRINGS_H       @stringsh@\n#define APR_HAVE_SYS_IOCTL_H     @sys_ioctlh@\n#define APR_HAVE_SYS_SENDFILE_H  @sys_sendfileh@\n#define APR_HAVE_SYS_SIGNAL_H    @sys_signalh@\n#define APR_HAVE_SYS_SOCKET_H    @sys_socketh@\n#define APR_HAVE_SYS_SOCKIO_H    @sys_sockioh@\n#define APR_HAVE_SYS_SYSLIMITS_H @sys_syslimitsh@\n#define APR_HAVE_SYS_TIME_H      @sys_timeh@\n#define APR_HAVE_SYS_TYPES_H     @sys_typesh@\n#define APR_HAVE_SYS_UIO_H       @sys_uioh@\n#define APR_HAVE_SYS_UN_H        @sys_unh@\n#define APR_HAVE_SYS_WAIT_H      @sys_waith@\n#define APR_HAVE_TIME_H          @timeh@\n#define APR_HAVE_UNISTD_H        @unistdh@\n#define APR_HAVE_WINDOWS_H       @windowsh@\n#define APR_HAVE_WINSOCK2_H      @winsock2h@\n\n/** @} */\n/** @} */\n\n/* We don't include our conditional headers within the doxyblocks \n * or the extern \"C\" namespace \n */\n\n#if APR_HAVE_WINDOWS_H && defined(WIN32)\n/* If windows.h was already included, our preferences don't matter.\n * If not, include a restricted set of windows headers to our tastes.\n */\n#ifndef _WINDOWS_\n\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n\n#ifndef _WIN32_WINNT\n/* Restrict the server to a subset of Windows XP header files by default\n */\n#define _WIN32_WINNT 0x0501\n#endif\n\n#ifndef NOUSER\n#define NOUSER\n#endif\n#ifndef NOMCX\n#define NOMCX\n#endif\n#ifndef NOIME\n#define NOIME\n#endif\n\n#include <windows.h>\n/* \n * Add a _very_few_ declarations missing from the restricted set of headers\n * (If this list becomes extensive, re-enable the required headers above!)\n * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now\n */\n#define SW_HIDE             0\n#ifndef _WIN32_WCE\n#include <winsock2.h>\n#include <ws2tcpip.h>\n#include <mswsock.h>\n#else\n#include <winsock.h>\n#endif\n\n#endif /* ndef _WINDOWS_ */\n#endif /* APR_HAVE_WINDOWS_H */\n\n#if APR_HAVE_SYS_TYPES_H\n#include <sys/types.h>\n#endif\n\n#if APR_HAVE_SYS_SOCKET_H\n#include <sys/socket.h>\n#endif\n\n#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS)\n/* C99 7.18.4 requires that stdint.h only exposes INT64_C \n * and UINT64_C for C++ implementations if this is defined: */\n#define __STDC_CONSTANT_MACROS\n#endif\n\n#if APR_HAVE_STDINT_H\n#include <stdint.h>\n#endif\n\n#if APR_HAVE_SYS_WAIT_H\n#include <sys/wait.h>\n#endif\n\n#ifdef OS2\n#define INCL_DOS\n#define INCL_DOSERRORS\n#include <os2.h>\n#endif\n\n/* header files for PATH_MAX, _POSIX_PATH_MAX */\n#if APR_HAVE_LIMITS_H\n#include <limits.h>\n#else\n#if APR_HAVE_SYS_SYSLIMITS_H\n#include <sys/syslimits.h>\n#endif\n#endif\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @addtogroup apr_platform\n * @ingroup APR \n * @{\n */\n\n#define APR_HAVE_SHMEM_MMAP_TMP     @havemmaptmp@\n#define APR_HAVE_SHMEM_MMAP_SHM     @havemmapshm@\n#define APR_HAVE_SHMEM_MMAP_ZERO    @havemmapzero@\n#define APR_HAVE_SHMEM_SHMGET_ANON  @haveshmgetanon@\n#define APR_HAVE_SHMEM_SHMGET       @haveshmget@\n#define APR_HAVE_SHMEM_MMAP_ANON    @havemmapanon@\n#define APR_HAVE_SHMEM_BEOS         @havebeosarea@\n\n#define APR_USE_SHMEM_MMAP_TMP     @usemmaptmp@\n#define APR_USE_SHMEM_MMAP_SHM     @usemmapshm@\n#define APR_USE_SHMEM_MMAP_ZERO    @usemmapzero@\n#define APR_USE_SHMEM_SHMGET_ANON  @useshmgetanon@\n#define APR_USE_SHMEM_SHMGET       @useshmget@\n#define APR_USE_SHMEM_MMAP_ANON    @usemmapanon@\n#define APR_USE_SHMEM_BEOS         @usebeosarea@\n\n#define APR_USE_FLOCK_SERIALIZE           @flockser@ \n#define APR_USE_SYSVSEM_SERIALIZE         @sysvser@\n#define APR_USE_POSIXSEM_SERIALIZE        @posixser@\n#define APR_USE_FCNTL_SERIALIZE           @fcntlser@\n#define APR_USE_PROC_PTHREAD_SERIALIZE    @procpthreadser@ \n#define APR_USE_PTHREAD_SERIALIZE         @pthreadser@ \n\n#define APR_HAS_FLOCK_SERIALIZE           @hasflockser@\n#define APR_HAS_SYSVSEM_SERIALIZE         @hassysvser@\n#define APR_HAS_POSIXSEM_SERIALIZE        @hasposixser@\n#define APR_HAS_FCNTL_SERIALIZE           @hasfcntlser@\n#define APR_HAS_PROC_PTHREAD_SERIALIZE    @hasprocpthreadser@\n\n#define APR_PROCESS_LOCK_IS_GLOBAL        @proclockglobal@\n\n#define APR_HAVE_CORKABLE_TCP   @have_corkable_tcp@ \n#define APR_HAVE_GETRLIMIT      @have_getrlimit@\n#define APR_HAVE_IN_ADDR        @have_in_addr@\n#define APR_HAVE_INET_ADDR      @have_inet_addr@\n#define APR_HAVE_INET_NETWORK   @have_inet_network@\n#define APR_HAVE_IPV6           @have_ipv6@\n#define APR_HAVE_MEMMOVE        @have_memmove@\n#define APR_HAVE_SETRLIMIT      @have_setrlimit@\n#define APR_HAVE_SIGACTION      @have_sigaction@\n#define APR_HAVE_SIGSUSPEND     @have_sigsuspend@\n#define APR_HAVE_SIGWAIT        @have_sigwait@\n#define APR_HAVE_SA_STORAGE     @have_sa_storage@\n#define APR_HAVE_STRCASECMP     @have_strcasecmp@\n#define APR_HAVE_STRDUP         @have_strdup@\n#define APR_HAVE_STRICMP        @have_stricmp@\n#define APR_HAVE_STRNCASECMP    @have_strncasecmp@\n#define APR_HAVE_STRNICMP       @have_strnicmp@\n#define APR_HAVE_STRSTR         @have_strstr@\n#define APR_HAVE_MEMCHR         @have_memchr@\n#define APR_HAVE_STRUCT_RLIMIT  @struct_rlimit@\n#define APR_HAVE_UNION_SEMUN    @have_union_semun@\n#define APR_HAVE_SCTP           @have_sctp@\n#define APR_HAVE_IOVEC          @have_iovec@\n\n/*  APR Feature Macros */\n#define APR_HAS_SHARED_MEMORY     @sharedmem@\n#define APR_HAS_THREADS           @threads@\n#define APR_HAS_SENDFILE          @sendfile@\n#define APR_HAS_MMAP              @mmap@\n#define APR_HAS_FORK              @fork@\n#define APR_HAS_RANDOM            @rand@\n#define APR_HAS_OTHER_CHILD       @oc@\n#define APR_HAS_DSO               @aprdso@\n#define APR_HAS_SO_ACCEPTFILTER   @acceptfilter@\n#define APR_HAS_UNICODE_FS        @have_unicode_fs@\n#define APR_HAS_PROC_INVOKED      @have_proc_invoked@\n#define APR_HAS_USER              @apr_has_user@\n#define APR_HAS_LARGE_FILES       @aprlfs@\n#define APR_HAS_XTHREAD_FILES     @apr_has_xthread_files@\n#define APR_HAS_OS_UUID           @osuuid@\n\n#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@\n\n/* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible\n * to poll on files/pipes.\n */\n#define APR_FILES_AS_SOCKETS      @file_as_socket@\n\n/* This macro indicates whether or not EBCDIC is the native character set.\n */\n#define APR_CHARSET_EBCDIC        @apr_charset_ebcdic@\n\n/* If we have a TCP implementation that can be \"corked\", what flag\n * do we use?\n */\n#define APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@\n\n/* Is the TCP_NODELAY socket option inherited from listening sockets?\n*/\n#define APR_TCP_NODELAY_INHERITED @tcp_nodelay_inherited@\n\n/* Is the O_NONBLOCK flag inherited from listening sockets?\n*/\n#define APR_O_NONBLOCK_INHERITED @o_nonblock_inherited@\n\n/* Typedefs that APR needs. */\n\ntypedef  unsigned char           apr_byte_t;\n\ntypedef  @short_value@           apr_int16_t;\ntypedef  unsigned @short_value@  apr_uint16_t;\n\ntypedef  @int_value@             apr_int32_t;\ntypedef  unsigned @int_value@    apr_uint32_t;\n\n#define APR_SIZEOF_VOIDP @voidp_size@\n\n/*\n * Darwin 10's default compiler (gcc42) builds for both 64 and\n * 32 bit architectures unless specifically told not to.\n * In those cases, we need to override types depending on how\n * we're being built at compile time.\n * NOTE: This is an ugly work-around for Darwin's\n * concept of universal binaries, a single package\n * (executable, lib, etc...) which contains both 32\n * and 64 bit versions. The issue is that if APR is\n * built universally, if something else is compiled\n * against it, some bit sizes will depend on whether\n * it is 32 or 64 bit. This is determined by the __LP64__\n * flag. Since we need to support both, we have to\n * handle OS X unqiuely.\n */\n#ifdef DARWIN_10\n#undef APR_SIZEOF_VOIDP\n#undef INT64_C\n#undef UINT64_C\n#ifdef __LP64__\n typedef  long            apr_int64_t;\n typedef  unsigned long   apr_uint64_t;\n #define APR_SIZEOF_VOIDP     8\n #define INT64_C(v)   (v ## L)\n #define UINT64_C(v)  (v ## UL)\n#else\n typedef  long long            apr_int64_t;\n typedef  unsigned long long   apr_uint64_t;\n #define APR_SIZEOF_VOIDP     4\n #define INT64_C(v)   (v ## LL)\n #define UINT64_C(v)  (v ## ULL)\n#endif\n#else\n typedef  @long_value@            apr_int64_t;\n typedef  unsigned @long_value@   apr_uint64_t;\n#endif\n\ntypedef  @size_t_value@          apr_size_t;\ntypedef  @ssize_t_value@         apr_ssize_t;\ntypedef  @off_t_value@           apr_off_t;\ntypedef  @socklen_t_value@       apr_socklen_t;\ntypedef  @ino_t_value@           apr_ino_t;\n\n#if APR_SIZEOF_VOIDP == 8\ntypedef  apr_uint64_t            apr_uintptr_t;\n#else\ntypedef  apr_uint32_t            apr_uintptr_t;\n#endif\n\n/* Are we big endian? */\n#define APR_IS_BIGENDIAN\t@bigendian@\n\n/* Mechanisms to properly type numeric literals */\n@int64_literal@\n@uint64_literal@\n\n#ifdef INT16_MIN\n#define APR_INT16_MIN   INT16_MIN\n#else\n#define APR_INT16_MIN   (-0x7fff - 1)\n#endif\n\n#ifdef INT16_MAX\n#define APR_INT16_MAX  INT16_MAX\n#else\n#define APR_INT16_MAX   (0x7fff)\n#endif\n\n#ifdef UINT16_MAX\n#define APR_UINT16_MAX  UINT16_MAX\n#else\n#define APR_UINT16_MAX  (0xffff)\n#endif\n\n#ifdef INT32_MIN\n#define APR_INT32_MIN   INT32_MIN\n#else\n#define APR_INT32_MIN   (-0x7fffffff - 1)\n#endif\n\n#ifdef INT32_MAX\n#define APR_INT32_MAX  INT32_MAX\n#else\n#define APR_INT32_MAX  0x7fffffff\n#endif\n\n#ifdef UINT32_MAX\n#define APR_UINT32_MAX  UINT32_MAX\n#else\n#define APR_UINT32_MAX  (0xffffffffU)\n#endif\n\n#ifdef INT64_MIN\n#define APR_INT64_MIN   INT64_MIN\n#else\n#define APR_INT64_MIN   (APR_INT64_C(-0x7fffffffffffffff) - 1)\n#endif\n\n#ifdef INT64_MAX\n#define APR_INT64_MAX   INT64_MAX\n#else\n#define APR_INT64_MAX   APR_INT64_C(0x7fffffffffffffff)\n#endif\n\n#ifdef UINT64_MAX\n#define APR_UINT64_MAX  UINT64_MAX\n#else\n#define APR_UINT64_MAX  APR_UINT64_C(0xffffffffffffffff)\n#endif\n\n#define APR_SIZE_MAX    (~((apr_size_t)0))\n\n\n/* Definitions that APR programs need to work properly. */\n\n/**\n * APR public API wrap for C++ compilers.\n */\n#ifdef __cplusplus\n#define APR_BEGIN_DECLS     extern \"C\" {\n#define APR_END_DECLS       }\n#else\n#define APR_BEGIN_DECLS\n#define APR_END_DECLS\n#endif\n\n/** \n * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC, \n * so that they follow the platform's calling convention.\n * <PRE>\n *\n * void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);\n *\n * </PRE>\n */\n#define APR_THREAD_FUNC       @apr_thread_func@\n\n#if defined(DOXYGEN) || !defined(WIN32)\n\n/**\n * The public APR functions are declared with APR_DECLARE(), so they may\n * use the most appropriate calling convention.  Public APR functions with \n * variable arguments must use APR_DECLARE_NONSTD().\n *\n * @remark Both the declaration and implementations must use the same macro.\n *\n * <PRE>\n * APR_DECLARE(rettype) apr_func(args)\n * </PRE>\n * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA\n * @remark Note that when APR compiles the library itself, it passes the \n * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32) \n * to export public symbols from the dynamic library build.\\n\n * The user must define the APR_DECLARE_STATIC when compiling to target\n * the static APR library on some platforms (e.g. Win32.)  The public symbols \n * are neither exported nor imported when APR_DECLARE_STATIC is defined.\\n\n * By default, compiling an application and including the APR public\n * headers, without defining APR_DECLARE_STATIC, will prepare the code to be\n * linked to the dynamic library.\n */\n#define APR_DECLARE(type)            type \n\n/**\n * The public APR functions using variable arguments are declared with \n * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.\n * @see APR_DECLARE @see APR_DECLARE_DATA\n * @remark Both the declaration and implementations must use the same macro.\n * <PRE>\n *\n * APR_DECLARE_NONSTD(rettype) apr_func(args, ...);\n *\n * </PRE>\n */\n#define APR_DECLARE_NONSTD(type)     type\n\n/**\n * The public APR variables are declared with AP_MODULE_DECLARE_DATA.\n * This assures the appropriate indirection is invoked at compile time.\n * @see APR_DECLARE @see APR_DECLARE_NONSTD\n * @remark Note that the declaration and implementations use different forms,\n * but both must include the macro.\n * \n * <PRE>\n *\n * extern APR_DECLARE_DATA type apr_variable;\\n\n * APR_DECLARE_DATA type apr_variable = value;\n *\n * </PRE>\n */\n#define APR_DECLARE_DATA\n\n#elif defined(APR_DECLARE_STATIC)\n#define APR_DECLARE(type)            type __stdcall\n#define APR_DECLARE_NONSTD(type)     type __cdecl\n#define APR_DECLARE_DATA\n#elif defined(APR_DECLARE_EXPORT)\n#define APR_DECLARE(type)            __declspec(dllexport) type __stdcall\n#define APR_DECLARE_NONSTD(type)     __declspec(dllexport) type __cdecl\n#define APR_DECLARE_DATA             __declspec(dllexport)\n#else\n#define APR_DECLARE(type)            __declspec(dllimport) type __stdcall\n#define APR_DECLARE_NONSTD(type)     __declspec(dllimport) type __cdecl\n#define APR_DECLARE_DATA             __declspec(dllimport)\n#endif\n\n/* Define APR_SSIZE_T_FMT.  \n * If ssize_t is an integer we define it to be \"d\",\n * if ssize_t is a long int we define it to be \"ld\",\n * if ssize_t is neither we declare an error here.\n * I looked for a better way to define this here, but couldn't find one, so\n * to find the logic for this definition search for \"ssize_t_fmt\" in\n * configure.in.\n */\n\n@ssize_t_fmt@\n\n/* And APR_SIZE_T_FMT */\n@size_t_fmt@\n\n/* And APR_OFF_T_FMT */\n@off_t_fmt@\n\n/* And APR_PID_T_FMT */\n@pid_t_fmt@\n\n/* And APR_INT64_T_FMT */\n@int64_t_fmt@\n\n/* And APR_UINT64_T_FMT */\n@uint64_t_fmt@\n\n/* And APR_UINT64_T_HEX_FMT */\n@uint64_t_hex_fmt@\n\n/*\n * Ensure we work with universal binaries on Darwin\n */\n#ifdef DARWIN_10\n\n#undef APR_HAS_LARGE_FILES\n#undef APR_SIZEOF_VOIDP\n#undef APR_INT64_T_FMT\n#undef APR_UINT64_T_FMT\n#undef APR_UINT64_T_HEX_FMT\n\n#ifdef __LP64__\n #define APR_HAS_LARGE_FILES  0\n #define APR_SIZEOF_VOIDP     8\n #define APR_INT64_T_FMT      \"ld\"\n #define APR_UINT64_T_FMT     \"lu\"\n #define APR_UINT64_T_HEX_FMT \"lx\"\n#else\n #define APR_HAS_LARGE_FILES  1\n #define APR_SIZEOF_VOIDP     4\n #define APR_INT64_T_FMT      \"lld\"\n #define APR_UINT64_T_FMT     \"llu\"\n #define APR_UINT64_T_HEX_FMT \"llx\"\n#endif\n\n#undef APR_IS_BIGENDIAN\n#ifdef __BIG_ENDIAN__\n #define APR_IS_BIGENDIAN\t1\n#else\n #define APR_IS_BIGENDIAN\t0\n#endif\n\n#undef APR_OFF_T_FMT\n#define APR_OFF_T_FMT \"lld\"\n\n#endif /* DARWIN_10 */\n\n/* Does the proc mutex lock threads too */\n#define APR_PROC_MUTEX_IS_GLOBAL      @proc_mutex_is_global@\n\n/* Local machine definition for console and log output. */\n#define APR_EOL_STR              \"@eolstr@\"\n\n#if APR_HAVE_SYS_WAIT_H\n#ifdef WEXITSTATUS\n#define apr_wait_t       int\n#else\n#define apr_wait_t       union wait\n#define WEXITSTATUS(status)    (int)((status).w_retcode)\n#define WTERMSIG(status)       (int)((status).w_termsig)\n#endif /* !WEXITSTATUS */\n#elif defined(__MINGW32__)\ntypedef int apr_wait_t;\n#endif /* HAVE_SYS_WAIT_H */\n\n#if defined(PATH_MAX)\n#define APR_PATH_MAX       PATH_MAX\n#elif defined(_POSIX_PATH_MAX)\n#define APR_PATH_MAX       _POSIX_PATH_MAX\n#else\n#error no decision has been made on APR_PATH_MAX for your platform\n#endif\n\n#define APR_DSOPATH \"@shlibpath_var@\"\n\n/** @} */\n\n/* Definitions that only Win32 programs need to compile properly. */\n\n/* XXX These simply don't belong here, perhaps in apr_portable.h\n * based on some APR_HAVE_PID/GID/UID?\n */\n#ifdef __MINGW32__\n#ifndef __GNUC__\ntypedef  int         pid_t;\n#endif\ntypedef  int         uid_t;\ntypedef  int         gid_t;\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* APR_H */\n"
  },
  {
    "path": "third_party/include/apr/apr.hnw",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n#ifndef APR_H\n#define APR_H\n\n/* GENERATED FILE WARNING!  DO NOT EDIT apr.h\n *\n * You must modify apr.hnw instead.\n *\n * And please, make an effort to stub apr.hw and apr.h.in in the process.\n *\n * This is the NetWare specific version of apr.h.  It is copied from\n * apr.hnw at the start of a NetWare build by the ./build/NWGNmakefile.\n */\n\n/**\n * @file apr.h\n * @brief APR Platform Definitions\n * @remark This is a generated header generated from include/apr.h.in by\n * ./configure, or copied from include/apr.hw or include/apr.hnw\n * for Win32 or Netware by those build environments, respectively.\n */\n\n#if defined(NETWARE) || defined(DOXYGEN)\n\n#undef  FD_SETSIZE\n#define FD_SETSIZE 1024\n\n#include <sys/types.h>\n#include <stddef.h>\n#include <stdio.h>\n#include <time.h>\n#include <stdint.h>\n#include <stdlib.h>\n#include <string.h>\n#include <limits.h>\n#include <netware.h>\n#include <nks/thread.h>\n#include <nks/synch.h>\n#include <nks/time.h>\n#include <signal.h>\n#ifdef USE_WINSOCK\n#include <novsock2.h>\n#ifdef NW_BUILD_IPV6\n#include <novtcpip.h>\n#endif\n#else\n#include <sys/socket.h>\n#include <sys/select.h>\n#endif\n#include <sys/types.h>\n\n#define _POSIX_THREAD_SAFE_FUNCTIONS    1\n#define READDIR_IS_THREAD_SAFE          1\n\n/* Keep #include'd headers from within the __cplusplus or doxyblocks */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @defgroup apr_platform Platform Definitions\n * @ingroup APR\n * @{\n */\n\n#define APR_INLINE\n#define APR_HAS_INLINE                  0\n#ifndef __attribute__\n#define __attribute__(__x)\n#endif\n#define ENUM_BITFIELD(e,n,w)  signed int n : w\n\n#define APR_HAVE_CONIO_H                0\n#define APR_HAVE_CRYPT_H                0\n#define APR_HAVE_CTYPE_H                1\n#define APR_HAVE_DIRENT_H               1\n#define APR_HAVE_ERRNO_H                1\n#define APR_HAVE_FCNTL_H                1\n#define APR_HAVE_IO_H                   0\n#define APR_HAVE_LIMITS_H               1\n#ifdef USE_WINSOCK\n#define APR_HAVE_ARPA_INET_H            0\n#define APR_HAVE_NETDB_H                0\n#define APR_HAVE_NETINET_IN_H           0\n#else\n#define APR_HAVE_ARPA_INET_H            1\n#define APR_HAVE_NETDB_H                1\n#define APR_HAVE_NETINET_IN_H           1\n#endif\n#define APR_HAVE_NETINET_SCTP_H         0\n#define APR_HAVE_NETINET_SCTP_UIO_H     0\n#define APR_HAVE_NETINET_TCP_H          0\n#define APR_HAVE_PTHREAD_H              0\n#define APR_HAVE_SIGNAL_H               1\n#define APR_HAVE_STDARG_H               1\n#define APR_HAVE_STDINT_H               0\n#define APR_HAVE_STDIO_H                1\n#define APR_HAVE_STDLIB_H               1\n#define APR_HAVE_STRING_H               1\n#define APR_HAVE_STRINGS_H              0\n#define APR_HAVE_STRTOLL                1\n#define APR_HAVE_SYS_SENDFILE_H         0\n#define APR_HAVE_SYS_SYSLIMITS_H        0\n#ifdef USE_WINSOCK\n#define APR_HAVE_SYS_SOCKET_H           0\n#define APR_HAVE_SYS_SOCKIO_H           0\n#define APR_HAVE_SYS_UN_H               0\n#else\n#define APR_HAVE_SYS_SOCKET_H           1\n#define APR_HAVE_SYS_SOCKIO_H           1\n#define APR_HAVE_SYS_UN_H               1\n#endif\n#define APR_HAVE_SYS_SIGNAL_H           1\n#define APR_HAVE_SYS_TIME_H             1\n#define APR_HAVE_SYS_TYPES_H            1\n#define APR_HAVE_SYS_UIO_H              1\n#define APR_HAVE_SYS_WAIT_H             1\n#define APR_HAVE_TIME_H                 1\n#define APR_HAVE_UNISTD_H               1\n\n#define APR_HAVE_SHMEM_MMAP_TMP         0\n#define APR_HAVE_SHMEM_MMAP_SHM         0\n#define APR_HAVE_SHMEM_MMAP_ZERO        0\n#define APR_HAVE_SHMEM_SHMGET_ANON      0\n#define APR_HAVE_SHMEM_SHMGET           0\n#define APR_HAVE_SHMEM_MMAP_ANON        0\n#define APR_HAVE_SHMEM_BEOS             0\n\n#define APR_USE_SHMEM_MMAP_TMP          0\n#define APR_USE_SHMEM_MMAP_SHM          0\n#define APR_USE_SHMEM_MMAP_ZERO         0\n#define APR_USE_SHMEM_SHMGET_ANON       0\n#define APR_USE_SHMEM_SHMGET            0\n#define APR_USE_SHMEM_MMAP_ANON         0\n#define APR_USE_SHMEM_BEOS              0\n\n#define APR_USE_FLOCK_SERIALIZE         0\n#define APR_USE_SYSVSEM_SERIALIZE       0\n#define APR_USE_FCNTL_SERIALIZE         0\n#define APR_USE_PROC_PTHREAD_SERIALIZE  0\n#define APR_USE_PTHREAD_SERIALIZE       0\n\n#define APR_HAS_FLOCK_SERIALIZE         0\n#define APR_HAS_SYSVSEM_SERIALIZE       0\n#define APR_HAS_FCNTL_SERIALIZE         0\n#define APR_HAS_PROC_PTHREAD_SERIALIZE  0\n#define APR_HAS_RWLOCK_SERIALIZE        0\n\n#define APR_HAS_LOCK_CREATE_NP          0\n\n#define APR_PROCESS_LOCK_IS_GLOBAL      1\n\n#define APR_FILE_BASED_SHM              0\n\n#define APR_HAVE_CORKABLE_TCP           0\n#define APR_HAVE_GETRLIMIT              0\n#define APR_HAVE_ICONV                  0\n#define APR_HAVE_IN_ADDR                1\n#define APR_HAVE_INET_ADDR              1\n#define APR_HAVE_INET_NETWORK           0\n#ifdef NW_BUILD_IPV6\n#define APR_HAVE_IPV6                   1\n#else\n#define APR_HAVE_IPV6                   0\n#endif\n#define APR_HAVE_MEMCHR                 1\n#define APR_HAVE_MEMMOVE                1\n#define APR_HAVE_SETRLIMIT              0\n#define APR_HAVE_SIGACTION              0\n#define APR_HAVE_SIGSUSPEND             0\n#define APR_HAVE_SIGWAIT                0\n#define APR_HAVE_STRCASECMP             1\n#define APR_HAVE_STRDUP                 1\n#define APR_HAVE_STRICMP                1\n#define APR_HAVE_STRNCASECMP            1\n#define APR_HAVE_STRNICMP               1\n#define APR_HAVE_STRSTR                 1\n#define APR_HAVE_STRUCT_RLIMIT          0\n#define APR_HAVE_UNION_SEMUN            0\n#define APR_HAVE_SCTP                   0\n#define APR_HAVE_IOVEC                  1\n\n/*  APR Feature Macros */\n#define APR_HAS_SHARED_MEMORY           0\n#define APR_HAS_THREADS                 1\n#define APR_HAS_SENDFILE                0\n#define APR_HAS_MMAP                    0\n#define APR_HAS_FORK                    0\n#define APR_HAS_RANDOM                  1\n#define APR_HAS_OTHER_CHILD             0\n#define APR_HAS_DSO                     1\n#define APR_HAS_SO_ACCEPTFILTER         0\n#define APR_HAS_UNICODE_FS              0\n#define APR_HAS_PROC_INVOKED            0\n#define APR_HAS_USER                    1\n#define APR_HAS_LARGE_FILES             1\n#define APR_HAS_XTHREAD_FILES           0\n#define APR_HAS_OS_UUID                 0\n\n#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0\n\n/* Netware can poll on files/pipes.\n */\n#define APR_FILES_AS_SOCKETS            1\n\n/* This macro indicates whether or not EBCDIC is the native character set.\n */\n#define APR_CHARSET_EBCDIC              0\n\n/* Is the TCP_NODELAY socket option inherited from listening sockets?\n*/\n#define APR_TCP_NODELAY_INHERITED       1\n\n/* Is the O_NONBLOCK flag inherited from listening sockets?\n*/\n#define APR_O_NONBLOCK_INHERITED        1\n\n/* Typedefs that APR needs. */\n\ntypedef  unsigned char     apr_byte_t;\n\ntypedef  short             apr_int16_t;\ntypedef  unsigned short    apr_uint16_t;\n\ntypedef  int               apr_int32_t;\ntypedef  unsigned int      apr_uint32_t;\n\ntypedef  long long          apr_int64_t;\ntypedef  unsigned long long apr_uint64_t;\n\ntypedef  size_t            apr_size_t;\ntypedef  ssize_t           apr_ssize_t;\n#if APR_HAS_LARGE_FILES\ntypedef  off64_t           apr_off_t;\n#else\ntypedef  off_t             apr_off_t;\n#endif\n#ifdef USE_WINSOCK\ntypedef  int               apr_socklen_t;\n#else\ntypedef  size_t            apr_socklen_t;\n#endif\ntypedef  apr_uint64_t      apr_ino_t;\n\n/* Are we big endian? */\n/* XXX: Fatal assumption on Alpha platforms */\n#define APR_IS_BIGENDIAN        0\n\n#ifdef UNKNOWN_NETWARE_64BIT_FLAG_NEEDED\n#define APR_SIZEOF_VOIDP   8\n#else\n#define APR_SIZEOF_VOIDP   4\n#endif\n\n#if APR_SIZEOF_VOIDP == 8\ntypedef  apr_uint64_t            apr_uintptr_t;\n#else\ntypedef  apr_uint32_t            apr_uintptr_t;\n#endif\n\n/* Mechanisms to properly type numeric literals */\n#define APR_INT64_C(val) (val##LL)\n#define APR_UINT64_C(val) (val##ULL)\n\n#ifdef INT16_MIN\n#define APR_INT16_MIN   INT16_MIN\n#else\n#define APR_INT16_MIN   (-0x7fff - 1)\n#endif\n\n#ifdef INT16_MAX\n#define APR_INT16_MAX  INT16_MAX\n#else\n#define APR_INT16_MAX   (0x7fff)\n#endif\n\n#ifdef UINT16_MAX\n#define APR_UINT16_MAX  UINT16_MAX\n#else\n#define APR_UINT16_MAX  (0xffff)\n#endif\n\n#ifdef INT32_MIN\n#define APR_INT32_MIN   INT32_MIN\n#else\n#define APR_INT32_MIN   (-0x7fffffff - 1)\n#endif\n\n#ifdef INT32_MAX\n#define APR_INT32_MAX  INT32_MAX\n#else\n#define APR_INT32_MAX  0x7fffffff\n#endif\n\n#ifdef UINT32_MAX\n#define APR_UINT32_MAX  UINT32_MAX\n#else\n#define APR_UINT32_MAX  (0xffffffffU)\n#endif\n\n#ifdef INT64_MIN\n#define APR_INT64_MIN   INT64_MIN\n#else\n#define APR_INT64_MIN   (APR_INT64_C(-0x7fffffffffffffff) - 1)\n#endif\n\n#ifdef INT64_MAX\n#define APR_INT64_MAX   INT64_MAX\n#else\n#define APR_INT64_MAX   APR_INT64_C(0x7fffffffffffffff)\n#endif\n\n#ifdef UINT64_MAX\n#define APR_UINT64_MAX  UINT64_MAX\n#else\n#define APR_UINT64_MAX  APR_UINT64_C(0xffffffffffffffff)\n#endif\n\n#define APR_SIZE_MAX    (~((apr_size_t)0))\n\n/* PROC mutex is a GLOBAL mutex on Netware */\n#define APR_PROC_MUTEX_IS_GLOBAL      1\n\n/* Definitions that APR programs need to work properly. */\n\n/**\n * APR public API wrap for C++ compilers.\n */\n#ifdef __cplusplus\n#define APR_BEGIN_DECLS     extern \"C\" {\n#define APR_END_DECLS       }\n#else\n#define APR_BEGIN_DECLS\n#define APR_END_DECLS\n#endif\n\n/**\n * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,\n * so that they follow the platform's calling convention.\n * @example\n */\n/** void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);\n */\n#define APR_THREAD_FUNC\n\n/**\n * The public APR functions are declared with APR_DECLARE(), so they may\n * use the most appropriate calling convention.  Public APR functions with\n * variable arguments must use APR_DECLARE_NONSTD().\n *\n * @remark Both the declaration and implementations must use the same macro.\n * @example\n */\n/** APR_DECLARE(rettype) apr_func(args)\n * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA\n * @remark Note that when APR compiles the library itself, it passes the\n * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32)\n * to export public symbols from the dynamic library build.\\n\n * The user must define the APR_DECLARE_STATIC when compiling to target\n * the static APR library on some platforms (e.g. Win32.)  The public symbols\n * are neither exported nor imported when APR_DECLARE_STATIC is defined.\\n\n * By default, compiling an application and including the APR public\n * headers, without defining APR_DECLARE_STATIC, will prepare the code to be\n * linked to the dynamic library.\n */\n#define APR_DECLARE(type)            type\n\n/**\n * The public APR functions using variable arguments are declared with\n * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.\n * @see APR_DECLARE @see APR_DECLARE_DATA\n * @remark Both the declaration and implementations must use the same macro.\n * @example\n */\n/** APR_DECLARE_NONSTD(rettype) apr_func(args, ...);\n */\n#define APR_DECLARE_NONSTD(type)     type\n\n/**\n * The public APR variables are declared with APR_DECLARE_DATA.\n * This assures the appropriate indirection is invoked at compile time.\n * @see APR_DECLARE @see APR_DECLARE_NONSTD\n * @remark Note that the declaration and implementations use different forms,\n * but both must include the macro.\n * @example\n */\n/** extern APR_DECLARE_DATA type apr_variable;\\n\n * APR_DECLARE_DATA type apr_variable = value;\n */\n#define APR_DECLARE_DATA\n\n#define APR_SSIZE_T_FMT          \"d\"\n\n#define APR_SIZE_T_FMT           \"d\"\n\n#if APR_HAS_LARGE_FILES\n#define APR_OFF_T_FMT            \"lld\"\n#else\n#define APR_OFF_T_FMT            \"ld\"\n#endif\n\n#define APR_PID_T_FMT            \"d\"\n\n/* Local machine definition for console and log output. */\n#define APR_EOL_STR              \"\\r\\n\"\n\ntypedef int apr_wait_t;\n\n#define APR_PATH_MAX PATH_MAX\n\n#define APR_DSOPATH \"PATH\"\n\n#define APR_INT64_T_FMT          \"lld\"\n#define APR_UINT64_T_FMT         \"llu\"\n#define APR_UINT64_T_HEX_FMT     \"llx\"\n#define APR_TIME_T_FMT APR_INT64_T_FMT\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* NETWARE */\n\n#endif /* APR_H */\n"
  },
  {
    "path": "third_party/include/apr/apr.hw",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n#ifndef APR_H\n#define APR_H\n\n/* GENERATED FILE WARNING!  DO NOT EDIT apr.h\n *\n * You must modify apr.hw instead.\n *\n * And please, make an effort to stub apr.hnw and apr.h.in in the process.\n *\n * This is the Win32 specific version of apr.h.  It is copied from\n * apr.hw by the apr.dsp and libapr.dsp projects. \n */\n\n/**\n * @file apr.h\n * @brief APR Platform Definitions\n * @remark This is a generated header generated from include/apr.h.in by\n * ./configure, or copied from include/apr.hw or include/apr.hnw \n * for Win32 or Netware by those build environments, respectively.\n */\n\n/* Make sure we have our platform identifier macro defined we ask for later.\n */\n#if defined(_WIN32) && !defined(WIN32)\n#define WIN32 1\n#endif\n\n#if defined(WIN32) || defined(DOXYGEN)\n\n/* Ignore most warnings (back down to /W3) for poorly constructed headers\n */\n#if defined(_MSC_VER) && _MSC_VER >= 1200\n#pragma warning(push, 3)\n#endif\n\n/* disable or reduce the frequency of...\n *   C4057: indirection to slightly different base types\n *   C4075: slight indirection changes (unsigned short* vs short[])\n *   C4100: unreferenced formal parameter\n *   C4127: conditional expression is constant\n *   C4163: '_rotl64' : not available as an intrinsic function\n *   C4201: nonstandard extension nameless struct/unions\n *   C4244: int to char/short - precision loss\n *   C4514: unreferenced inline function removed\n */\n#pragma warning(disable: 4100 4127 4163 4201 4514; once: 4057 4075 4244)\n\n/* Ignore Microsoft's interpretation of secure development\n * and the POSIX string handling API\n */\n#if defined(_MSC_VER) && _MSC_VER >= 1400\n#ifndef _CRT_SECURE_NO_DEPRECATE\n#define _CRT_SECURE_NO_DEPRECATE\n#endif\n#pragma warning(disable: 4996)\n#endif\n\n/* Has windows.h already been included?  If so, our preferences don't matter,\n * but we will still need the winsock things no matter what was included.\n * If not, include a restricted set of windows headers to our tastes.\n */\n#ifndef _WINDOWS_\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#ifndef _WIN32_WINNT\n\n/* Restrict the server to a subset of Windows XP header files by default\n */\n#define _WIN32_WINNT 0x0501\n#endif\n#ifndef NOUSER\n#define NOUSER\n#endif\n#ifndef NOMCX\n#define NOMCX\n#endif\n#ifndef NOIME\n#define NOIME\n#endif\n#include <windows.h>\n/* \n * Add a _very_few_ declarations missing from the restricted set of headers\n * (If this list becomes extensive, re-enable the required headers above!)\n * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now\n */\n#define SW_HIDE             0\n#ifndef _WIN32_WCE\n#include <winsock2.h>\n#include <ws2tcpip.h>\n#include <mswsock.h>\n#else\n#include <winsock.h>\n#endif\n#endif /* !_WINDOWS_ */\n\n/**\n * @defgroup APR Apache Portability Runtime library\n * @{\n */\n/**\n * @defgroup apr_platform Platform Definitions\n * @{\n * @warning\n * <strong><em>The actual values of macros and typedefs on this page<br>\n * are platform specific and should NOT be relied upon!</em></strong>\n */\n\n#define APR_INLINE __inline\n#define APR_HAS_INLINE          1\n#if !defined(__GNUC__) && !defined(__attribute__)\n#define __attribute__(__x)\n#endif\n\n#ifndef _WIN32_WCE\n#define APR_HAVE_ARPA_INET_H    0\n#define APR_HAVE_CONIO_H        1\n#define APR_HAVE_CRYPT_H        0\n#define APR_HAVE_CTYPE_H        1\n#define APR_HAVE_DIRENT_H       0\n#define APR_HAVE_ERRNO_H        1\n#define APR_HAVE_FCNTL_H        1\n#define APR_HAVE_IO_H           1\n#define APR_HAVE_LIMITS_H       1\n#define APR_HAVE_NETDB_H        0\n#define APR_HAVE_NETINET_IN_H   0\n#define APR_HAVE_NETINET_SCTP_H 0\n#define APR_HAVE_NETINET_SCTP_UIO_H 0\n#define APR_HAVE_NETINET_TCP_H  0\n#define APR_HAVE_PTHREAD_H      0\n#define APR_HAVE_SEMAPHORE_H    0\n#define APR_HAVE_SIGNAL_H       1\n#define APR_HAVE_STDARG_H       1\n#define APR_HAVE_STDINT_H       0\n#define APR_HAVE_STDIO_H        1\n#define APR_HAVE_STDLIB_H       1\n#define APR_HAVE_STRING_H       1\n#define APR_HAVE_STRINGS_H      0\n#define APR_HAVE_SYS_IOCTL_H    0\n#define APR_HAVE_SYS_SENDFILE_H 0\n#define APR_HAVE_SYS_SIGNAL_H   0\n#define APR_HAVE_SYS_SOCKET_H   0\n#define APR_HAVE_SYS_SOCKIO_H   0\n#define APR_HAVE_SYS_SYSLIMITS_H 0\n#define APR_HAVE_SYS_TIME_H     0\n#define APR_HAVE_SYS_TYPES_H    1\n#define APR_HAVE_SYS_UIO_H      0\n#define APR_HAVE_SYS_UN_H       0\n#define APR_HAVE_SYS_WAIT_H     0\n#define APR_HAVE_TIME_H         1\n#define APR_HAVE_UNISTD_H       0\n#define APR_HAVE_STDDEF_H       1\n#define APR_HAVE_PROCESS_H      1\n#else\n#define APR_HAVE_ARPA_INET_H    0\n#define APR_HAVE_CONIO_H        0\n#define APR_HAVE_CRYPT_H        0\n#define APR_HAVE_CTYPE_H        0\n#define APR_HAVE_DIRENT_H       0\n#define APR_HAVE_ERRNO_H        0\n#define APR_HAVE_FCNTL_H        0\n#define APR_HAVE_IO_H           0\n#define APR_HAVE_LIMITS_H       0\n#define APR_HAVE_NETDB_H        0\n#define APR_HAVE_NETINET_IN_H   0\n#define APR_HAVE_NETINET_SCTP_H 0\n#define APR_HAVE_NETINET_SCTP_UIO_H 0\n#define APR_HAVE_NETINET_TCP_H  0\n#define APR_HAVE_PTHREAD_H      0\n#define APR_HAVE_SEMAPHORE_H    0\n#define APR_HAVE_SIGNAL_H       0\n#define APR_HAVE_STDARG_H       0\n#define APR_HAVE_STDINT_H       0\n#define APR_HAVE_STDIO_H        1\n#define APR_HAVE_STDLIB_H       1\n#define APR_HAVE_STRING_H       1\n#define APR_HAVE_STRINGS_H      0\n#define APR_HAVE_SYS_IOCTL_H    0\n#define APR_HAVE_SYS_SENDFILE_H 0\n#define APR_HAVE_SYS_SIGNAL_H   0\n#define APR_HAVE_SYS_SOCKET_H   0\n#define APR_HAVE_SYS_SOCKIO_H   0\n#define APR_HAVE_SYS_SYSLIMITS_H 0\n#define APR_HAVE_SYS_TIME_H     0\n#define APR_HAVE_SYS_TYPES_H    0\n#define APR_HAVE_SYS_UIO_H      0\n#define APR_HAVE_SYS_UN_H       0\n#define APR_HAVE_SYS_WAIT_H     0\n#define APR_HAVE_TIME_H         0\n#define APR_HAVE_UNISTD_H       0\n#define APR_HAVE_STDDEF_H       0\n#define APR_HAVE_PROCESS_H      0\n#endif\n\n/** @} */\n/** @} */\n\n/* We don't include our conditional headers within the doxyblocks \n * or the extern \"C\" namespace \n */\n\n#if APR_HAVE_STDLIB_H\n#include <stdlib.h>\n#endif\n#if APR_HAVE_STDIO_H\n#include <stdio.h>\n#endif\n#if APR_HAVE_SYS_TYPES_H\n#include <sys/types.h>\n#endif\n#if APR_HAVE_STDDEF_H\n#include <stddef.h>\n#endif\n#if APR_HAVE_TIME_H\n#include <time.h>\n#endif\n#if APR_HAVE_PROCESS_H\n#include <process.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @addtogroup apr_platform\n * @ingroup APR \n * @{\n */\n\n#define APR_HAVE_SHMEM_MMAP_TMP     0\n#define APR_HAVE_SHMEM_MMAP_SHM     0\n#define APR_HAVE_SHMEM_MMAP_ZERO    0\n#define APR_HAVE_SHMEM_SHMGET_ANON  0\n#define APR_HAVE_SHMEM_SHMGET       0\n#define APR_HAVE_SHMEM_MMAP_ANON    0\n#define APR_HAVE_SHMEM_BEOS         0\n\n#define APR_USE_SHMEM_MMAP_TMP     0\n#define APR_USE_SHMEM_MMAP_SHM     0\n#define APR_USE_SHMEM_MMAP_ZERO    0\n#define APR_USE_SHMEM_SHMGET_ANON  0\n#define APR_USE_SHMEM_SHMGET       0\n#define APR_USE_SHMEM_MMAP_ANON    0\n#define APR_USE_SHMEM_BEOS         0\n\n#define APR_USE_FLOCK_SERIALIZE           0 \n#define APR_USE_POSIXSEM_SERIALIZE        0\n#define APR_USE_SYSVSEM_SERIALIZE         0\n#define APR_USE_FCNTL_SERIALIZE           0\n#define APR_USE_PROC_PTHREAD_SERIALIZE    0 \n#define APR_USE_PTHREAD_SERIALIZE         0 \n\n#define APR_HAS_FLOCK_SERIALIZE           0\n#define APR_HAS_SYSVSEM_SERIALIZE         0\n#define APR_HAS_POSIXSEM_SERIALIZE        0\n#define APR_HAS_FCNTL_SERIALIZE           0\n#define APR_HAS_PROC_PTHREAD_SERIALIZE    0\n\n#define APR_PROCESS_LOCK_IS_GLOBAL        0\n\n#define APR_HAVE_CORKABLE_TCP   0\n#define APR_HAVE_GETRLIMIT      0\n#define APR_HAVE_ICONV          0\n#define APR_HAVE_IN_ADDR        1\n#define APR_HAVE_INET_ADDR      1\n#define APR_HAVE_INET_NETWORK   0\n#define APR_HAVE_IPV6           0\n#define APR_HAVE_MEMMOVE        1\n#define APR_HAVE_SETRLIMIT      0\n#define APR_HAVE_SIGACTION      0\n#define APR_HAVE_SIGSUSPEND     0\n#define APR_HAVE_SIGWAIT        0\n#define APR_HAVE_SA_STORAGE     0\n#define APR_HAVE_STRCASECMP     0\n#define APR_HAVE_STRDUP         1\n#define APR_HAVE_STRNCASECMP    0\n#define APR_HAVE_STRSTR         1\n#define APR_HAVE_MEMCHR         1\n#define APR_HAVE_STRUCT_RLIMIT  0\n#define APR_HAVE_UNION_SEMUN    0\n#define APR_HAVE_SCTP           0\n#define APR_HAVE_IOVEC          0\n\n#ifndef _WIN32_WCE\n#define APR_HAVE_STRICMP        1\n#define APR_HAVE_STRNICMP       1\n#else\n#define APR_HAVE_STRICMP        0\n#define APR_HAVE_STRNICMP       0\n#endif\n\n/*  APR Feature Macros */\n#define APR_HAS_SHARED_MEMORY     1\n#define APR_HAS_THREADS           1\n#define APR_HAS_MMAP              1\n#define APR_HAS_FORK              0\n#define APR_HAS_RANDOM            1\n#define APR_HAS_OTHER_CHILD       1\n#define APR_HAS_DSO               1\n#define APR_HAS_SO_ACCEPTFILTER   0\n#define APR_HAS_UNICODE_FS        1\n#define APR_HAS_PROC_INVOKED      1\n#define APR_HAS_OS_UUID           1\n\n#ifndef _WIN32_WCE\n#define APR_HAS_SENDFILE          1\n#define APR_HAS_USER              1\n#define APR_HAS_LARGE_FILES       1\n#define APR_HAS_XTHREAD_FILES     1\n#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 1\n#else\n#define APR_HAS_SENDFILE          0\n#define APR_HAS_USER              0\n#define APR_HAS_LARGE_FILES       0\n#define APR_HAS_XTHREAD_FILES     0\n#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0\n#endif\n\n/* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible\n * to poll on files/pipes.\n */\n#define APR_FILES_AS_SOCKETS      0\n\n/* This macro indicates whether or not EBCDIC is the native character set.\n */\n#define APR_CHARSET_EBCDIC        0\n\n/* If we have a TCP implementation that can be \"corked\", what flag\n * do we use?\n */\n#define APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@\n\n/* Is the TCP_NODELAY socket option inherited from listening sockets?\n */\n#define APR_TCP_NODELAY_INHERITED 1\n\n/* Is the O_NONBLOCK flag inherited from listening sockets?\n */\n#define APR_O_NONBLOCK_INHERITED  1\n\n/* Typedefs that APR needs. */\n\ntypedef  unsigned char     apr_byte_t;\n\ntypedef  short             apr_int16_t;\ntypedef  unsigned short    apr_uint16_t;\n\ntypedef  int               apr_int32_t;\ntypedef  unsigned int      apr_uint32_t;\n\ntypedef  __int64           apr_int64_t;\ntypedef  unsigned __int64  apr_uint64_t;\n\ntypedef  size_t      apr_size_t;\n#if APR_HAVE_STDDEF_H\ntypedef  ptrdiff_t   apr_ssize_t;\n#else\ntypedef  int         apr_ssize_t;\n#endif\n#if APR_HAS_LARGE_FILES\ntypedef  __int64     apr_off_t;\n#else\ntypedef  int         apr_off_t;\n#endif\ntypedef  int         apr_socklen_t;\ntypedef  apr_uint64_t      apr_ino_t;\n\n#ifdef _WIN64\n#define APR_SIZEOF_VOIDP   8\n#else\n#define APR_SIZEOF_VOIDP   4\n#endif\n\n#if APR_SIZEOF_VOIDP == 8\ntypedef  apr_uint64_t            apr_uintptr_t;\n#else\ntypedef  apr_uint32_t            apr_uintptr_t;\n#endif\n\n/* Are we big endian? */\n/* XXX: Fatal assumption on Alpha platforms */\n#define APR_IS_BIGENDIAN\t0\n\n/* Mechanisms to properly type numeric literals */\n\n#ifndef __GNUC__\n#define APR_INT64_C(val) (val##i64)\n#define APR_UINT64_C(val) (val##Ui64)\n#else\n#define APR_INT64_C(val) (val##LL)\n#define APR_UINT64_C(val) (val##ULL)\n#endif\n\n#ifdef INT16_MIN\n#define APR_INT16_MIN   INT16_MIN\n#else\n#define APR_INT16_MIN   (-0x7fff - 1)\n#endif\n\n#ifdef INT16_MAX\n#define APR_INT16_MAX  INT16_MAX\n#else\n#define APR_INT16_MAX   (0x7fff)\n#endif\n\n#ifdef UINT16_MAX\n#define APR_UINT16_MAX  UINT16_MAX\n#else\n#define APR_UINT16_MAX  (0xffff)\n#endif\n\n#ifdef INT32_MIN\n#define APR_INT32_MIN   INT32_MIN\n#else\n#define APR_INT32_MIN   (-0x7fffffff - 1)\n#endif\n\n#ifdef INT32_MAX\n#define APR_INT32_MAX  INT32_MAX\n#else\n#define APR_INT32_MAX  0x7fffffff\n#endif\n\n#ifdef UINT32_MAX\n#define APR_UINT32_MAX  UINT32_MAX\n#else\n#define APR_UINT32_MAX  (0xffffffffU)\n#endif\n\n#ifdef INT64_MIN\n#define APR_INT64_MIN   INT64_MIN\n#else\n#define APR_INT64_MIN   (APR_INT64_C(-0x7fffffffffffffff) - 1)\n#endif\n\n#ifdef INT64_MAX\n#define APR_INT64_MAX   INT64_MAX\n#else\n#define APR_INT64_MAX   APR_INT64_C(0x7fffffffffffffff)\n#endif\n\n#ifdef UINT64_MAX\n#define APR_UINT64_MAX  UINT64_MAX\n#else\n#define APR_UINT64_MAX  APR_UINT64_C(0xffffffffffffffff)\n#endif\n\n#define APR_SIZE_MAX    (~((apr_size_t)0))\n\n/* Definitions that APR programs need to work properly. */\n\n/**\n * APR public API wrap for C++ compilers.\n */\n#ifdef __cplusplus\n#define APR_BEGIN_DECLS     extern \"C\" {\n#define APR_END_DECLS       }\n#else\n#define APR_BEGIN_DECLS\n#define APR_END_DECLS\n#endif\n\n/** \n * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC, \n * so that they follow the platform's calling convention.\n * <PRE>\n *\n * void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);\n *\n * </PRE>\n */\n#define APR_THREAD_FUNC  __stdcall\n\n\n#if defined(DOXYGEN) || !defined(WIN32)\n\n/**\n * The public APR functions are declared with APR_DECLARE(), so they may\n * use the most appropriate calling convention.  Public APR functions with \n * variable arguments must use APR_DECLARE_NONSTD().\n *\n * @remark Both the declaration and implementations must use the same macro.\n *\n * <PRE>\n * APR_DECLARE(rettype) apr_func(args)\n * </PRE>\n * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA\n * @remark Note that when APR compiles the library itself, it passes the \n * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32) \n * to export public symbols from the dynamic library build.\\n\n * The user must define the APR_DECLARE_STATIC when compiling to target\n * the static APR library on some platforms (e.g. Win32.)  The public symbols \n * are neither exported nor imported when APR_DECLARE_STATIC is defined.\\n\n * By default, compiling an application and including the APR public\n * headers, without defining APR_DECLARE_STATIC, will prepare the code to be\n * linked to the dynamic library.\n */\n#define APR_DECLARE(type)            type \n\n/**\n * The public APR functions using variable arguments are declared with \n * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.\n * @see APR_DECLARE @see APR_DECLARE_DATA\n * @remark Both the declaration and implementations must use the same macro.\n * <PRE>\n *\n * APR_DECLARE_NONSTD(rettype) apr_func(args, ...);\n *\n * </PRE>\n */\n#define APR_DECLARE_NONSTD(type)     type\n\n/**\n * The public APR variables are declared with AP_MODULE_DECLARE_DATA.\n * This assures the appropriate indirection is invoked at compile time.\n * @see APR_DECLARE @see APR_DECLARE_NONSTD\n * @remark Note that the declaration and implementations use different forms,\n * but both must include the macro.\n * \n * <PRE>\n *\n * extern APR_DECLARE_DATA type apr_variable;\\n\n * APR_DECLARE_DATA type apr_variable = value;\n *\n * </PRE>\n */\n#define APR_DECLARE_DATA\n\n#elif defined(APR_DECLARE_STATIC)\n#define APR_DECLARE(type)            type __stdcall\n#define APR_DECLARE_NONSTD(type)     type __cdecl\n#define APR_DECLARE_DATA\n#elif defined(APR_DECLARE_EXPORT)\n#define APR_DECLARE(type)            __declspec(dllexport) type __stdcall\n#define APR_DECLARE_NONSTD(type)     __declspec(dllexport) type __cdecl\n#define APR_DECLARE_DATA             __declspec(dllexport)\n#else\n#define APR_DECLARE(type)            __declspec(dllimport) type __stdcall\n#define APR_DECLARE_NONSTD(type)     __declspec(dllimport) type __cdecl\n#define APR_DECLARE_DATA             __declspec(dllimport)\n#endif\n\n#ifdef _WIN64\n#define APR_SSIZE_T_FMT          \"I64d\"\n#define APR_SIZE_T_FMT           \"I64u\"\n#else\n#define APR_SSIZE_T_FMT          \"d\"\n#define APR_SIZE_T_FMT           \"u\"\n#endif\n\n#if APR_HAS_LARGE_FILES\n#define APR_OFF_T_FMT            \"I64d\"\n#else\n#define APR_OFF_T_FMT            \"d\"\n#endif\n\n#define APR_PID_T_FMT            \"d\"\n\n#define APR_INT64_T_FMT          \"I64d\"\n#define APR_UINT64_T_FMT         \"I64u\"\n#define APR_UINT64_T_HEX_FMT     \"I64x\"\n\n/* No difference between PROC and GLOBAL mutex */\n#define APR_PROC_MUTEX_IS_GLOBAL      1\n\n/* Local machine definition for console and log output. */\n#define APR_EOL_STR              \"\\r\\n\"\n\ntypedef int apr_wait_t;\n\n#if APR_HAS_UNICODE_FS\n/* An arbitrary size that is digestable. True max is a bit less than 32000 */\n#define APR_PATH_MAX 8192\n#else /* !APR_HAS_UNICODE_FS */\n#define APR_PATH_MAX MAX_PATH\n#endif\n\n#define APR_DSOPATH \"PATH\"\n\n/** @} */\n\n/* Definitions that only Win32 programs need to compile properly. */\n\n/* XXX These simply don't belong here, perhaps in apr_portable.h\n * based on some APR_HAVE_PID/GID/UID?\n */\n#ifndef __GNUC__\ntypedef  int         pid_t;\n#endif\ntypedef  int         uid_t;\ntypedef  int         gid_t;\n\n/* Win32 .h ommissions we really need */\n#define STDIN_FILENO  0\n#define STDOUT_FILENO 1\n#define STDERR_FILENO 2\n\n#if APR_HAVE_IPV6\n\n/* Appears in later flavors, not the originals. */\n#ifndef in_addr6\n#define  in6_addr    in_addr6\n#endif\n\n#ifndef WS2TCPIP_INLINE\n#define IN6_IS_ADDR_V4MAPPED(a) \\\n    (   (*(const apr_uint64_t *)(const void *)(&(a)->s6_addr[0]) == 0) \\\n     && (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))\n#endif\n\n#endif /* APR_HAS_IPV6 */\n\n#ifdef __cplusplus\n}\n#endif\n\n/* Done with badly written headers\n */\n#if defined(_MSC_VER) && _MSC_VER >= 1200\n#pragma warning(pop)\n#pragma warning(disable: 4996)\n#endif\n\n#endif /* WIN32 */\n\n#endif /* APR_H */\n"
  },
  {
    "path": "third_party/include/apr/apr.hwc",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n#ifndef APR_H\n#define APR_H\n\n/* GENERATED FILE WARNING!  DO NOT EDIT apr.h\n *\n * You must modify apr.hwc instead.\n *\n * And please, make an effort to stub apr.hnw and apr.h.in in the process.\n *\n * This is the Win32 specific version of apr.h.  It is copied from\n * apr.hw by the apr.dsp and libapr.dsp projects. \n */\n\n/**\n * @file apr.h\n * @brief APR Platform Definitions\n * @remark This is a generated header generated from include/apr.h.in by\n * ./configure, or copied from include/apr.hw or include/apr.hnw \n * for Win32 or Netware by those build environments, respectively.\n */\n\n/* Make sure we have our platform identifier macro defined we ask for later.\n */\n#if defined(_WIN32) && !defined(WIN32)\n#define WIN32 1\n#endif\n\n#if defined(WIN32) || defined(DOXYGEN)\n\n/* Ignore most warnings (back down to /W3) for poorly constructed headers\n */\n#if defined(_MSC_VER) && _MSC_VER >= 1200\n#pragma warning(push, 3)\n#endif\n\n/* disable or reduce the frequency of...\n *   C4057: indirection to slightly different base types\n *   C4075: slight indirection changes (unsigned short* vs short[])\n *   C4100: unreferenced formal parameter\n *   C4127: conditional expression is constant\n *   C4163: '_rotl64' : not available as an intrinsic function\n *   C4201: nonstandard extension nameless struct/unions\n *   C4244: int to char/short - precision loss\n *   C4514: unreferenced inline function removed\n */\n#pragma warning(disable: 4100 4127 4163 4201 4514; once: 4057 4075 4244)\n\n/* Ignore Microsoft's interpretation of secure development\n * and the POSIX string handling API\n */\n#if defined(_MSC_VER) && _MSC_VER >= 1400\n#ifndef _CRT_SECURE_NO_DEPRECATE\n#define _CRT_SECURE_NO_DEPRECATE\n#endif\n#pragma warning(disable: 4996)\n#endif\n\n/* Has windows.h already been included?  If so, our preferences don't matter,\n * but we will still need the winsock things no matter what was included.\n * If not, include a restricted set of windows headers to our tastes.\n */\n#ifndef _WINDOWS_\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#ifndef _WIN32_WINNT\n#define _WIN32_WINNT @win32_winnt_str@\n#endif\n#ifndef NOUSER\n#define NOUSER\n#endif\n#ifndef NOMCX\n#define NOMCX\n#endif\n#ifndef NOIME\n#define NOIME\n#endif\n#include <windows.h>\n/* \n * Add a _very_few_ declarations missing from the restricted set of headers\n * (If this list becomes extensive, re-enable the required headers above!)\n * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now\n */\n#define SW_HIDE             0\n#ifndef _WIN32_WCE\n#include <winsock2.h>\n#include <ws2tcpip.h>\n#include <mswsock.h>\n#else\n#include <winsock.h>\n#endif\n#endif /* !_WINDOWS_ */\n\n/**\n * @defgroup APR Apache Portability Runtime library\n * @{\n */\n/**\n * @defgroup apr_platform Platform Definitions\n * @{\n * @warning\n * <strong><em>The actual values of macros and typedefs on this page<br>\n * are platform specific and should NOT be relied upon!</em></strong>\n */\n\n#define APR_INLINE __inline\n#define APR_HAS_INLINE          1\n#if !defined(__GNUC__) && !defined(__attribute__)\n#define __attribute__(__x)\n#endif\n\n#ifndef _WIN32_WCE\n#define APR_HAVE_ARPA_INET_H    0\n#define APR_HAVE_CONIO_H        1\n#define APR_HAVE_CRYPT_H        0\n#define APR_HAVE_CTYPE_H        1\n#define APR_HAVE_DIRENT_H       0\n#define APR_HAVE_ERRNO_H        1\n#define APR_HAVE_FCNTL_H        1\n#define APR_HAVE_IO_H           1\n#define APR_HAVE_LIMITS_H       1\n#define APR_HAVE_NETDB_H        0\n#define APR_HAVE_NETINET_IN_H   0\n#define APR_HAVE_NETINET_SCTP_H 0\n#define APR_HAVE_NETINET_SCTP_UIO_H 0\n#define APR_HAVE_NETINET_TCP_H  0\n#define APR_HAVE_PTHREAD_H      0\n#define APR_HAVE_SEMAPHORE_H    0\n#define APR_HAVE_SIGNAL_H       1\n#define APR_HAVE_STDARG_H       1\n#define APR_HAVE_STDINT_H       0\n#define APR_HAVE_STDIO_H        1\n#define APR_HAVE_STDLIB_H       1\n#define APR_HAVE_STRING_H       1\n#define APR_HAVE_STRINGS_H      0\n#define APR_HAVE_SYS_IOCTL_H    0\n#define APR_HAVE_SYS_SENDFILE_H 0\n#define APR_HAVE_SYS_SIGNAL_H   0\n#define APR_HAVE_SYS_SOCKET_H   0\n#define APR_HAVE_SYS_SOCKIO_H   0\n#define APR_HAVE_SYS_SYSLIMITS_H 0\n#define APR_HAVE_SYS_TIME_H     0\n#define APR_HAVE_SYS_TYPES_H    1\n#define APR_HAVE_SYS_UIO_H      0\n#define APR_HAVE_SYS_UN_H       0\n#define APR_HAVE_SYS_WAIT_H     0\n#define APR_HAVE_TIME_H         1\n#define APR_HAVE_UNISTD_H       0\n#define APR_HAVE_STDDEF_H       1\n#define APR_HAVE_PROCESS_H      1\n#else\n#define APR_HAVE_ARPA_INET_H    0\n#define APR_HAVE_CONIO_H        0\n#define APR_HAVE_CRYPT_H        0\n#define APR_HAVE_CTYPE_H        0\n#define APR_HAVE_DIRENT_H       0\n#define APR_HAVE_ERRNO_H        0\n#define APR_HAVE_FCNTL_H        0\n#define APR_HAVE_IO_H           0\n#define APR_HAVE_LIMITS_H       0\n#define APR_HAVE_NETDB_H        0\n#define APR_HAVE_NETINET_IN_H   0\n#define APR_HAVE_NETINET_SCTP_H 0\n#define APR_HAVE_NETINET_SCTP_UIO_H 0\n#define APR_HAVE_NETINET_TCP_H  0\n#define APR_HAVE_PTHREAD_H      0\n#define APR_HAVE_SEMAPHORE_H    0\n#define APR_HAVE_SIGNAL_H       0\n#define APR_HAVE_STDARG_H       0\n#define APR_HAVE_STDINT_H       0\n#define APR_HAVE_STDIO_H        1\n#define APR_HAVE_STDLIB_H       1\n#define APR_HAVE_STRING_H       1\n#define APR_HAVE_STRINGS_H      0\n#define APR_HAVE_SYS_IOCTL_H    0\n#define APR_HAVE_SYS_SENDFILE_H 0\n#define APR_HAVE_SYS_SIGNAL_H   0\n#define APR_HAVE_SYS_SOCKET_H   0\n#define APR_HAVE_SYS_SOCKIO_H   0\n#define APR_HAVE_SYS_SYSLIMITS_H 0\n#define APR_HAVE_SYS_TIME_H     0\n#define APR_HAVE_SYS_TYPES_H    0\n#define APR_HAVE_SYS_UIO_H      0\n#define APR_HAVE_SYS_UN_H       0\n#define APR_HAVE_SYS_WAIT_H     0\n#define APR_HAVE_TIME_H         0\n#define APR_HAVE_UNISTD_H       0\n#define APR_HAVE_STDDEF_H       0\n#define APR_HAVE_PROCESS_H      0\n#endif\n\n/** @} */\n/** @} */\n\n/* We don't include our conditional headers within the doxyblocks \n * or the extern \"C\" namespace \n */\n\n#if APR_HAVE_STDLIB_H\n#include <stdlib.h>\n#endif\n#if APR_HAVE_STDIO_H\n#include <stdio.h>\n#endif\n#if APR_HAVE_SYS_TYPES_H\n#include <sys/types.h>\n#endif\n#if APR_HAVE_STDDEF_H\n#include <stddef.h>\n#endif\n#if APR_HAVE_TIME_H\n#include <time.h>\n#endif\n#if APR_HAVE_PROCESS_H\n#include <process.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @addtogroup apr_platform\n * @ingroup APR \n * @{\n */\n\n#define APR_HAVE_SHMEM_MMAP_TMP     0\n#define APR_HAVE_SHMEM_MMAP_SHM     0\n#define APR_HAVE_SHMEM_MMAP_ZERO    0\n#define APR_HAVE_SHMEM_SHMGET_ANON  0\n#define APR_HAVE_SHMEM_SHMGET       0\n#define APR_HAVE_SHMEM_MMAP_ANON    0\n#define APR_HAVE_SHMEM_BEOS         0\n\n#define APR_USE_SHMEM_MMAP_TMP     0\n#define APR_USE_SHMEM_MMAP_SHM     0\n#define APR_USE_SHMEM_MMAP_ZERO    0\n#define APR_USE_SHMEM_SHMGET_ANON  0\n#define APR_USE_SHMEM_SHMGET       0\n#define APR_USE_SHMEM_MMAP_ANON    0\n#define APR_USE_SHMEM_BEOS         0\n\n#define APR_USE_FLOCK_SERIALIZE           0 \n#define APR_USE_POSIXSEM_SERIALIZE        0\n#define APR_USE_SYSVSEM_SERIALIZE         0\n#define APR_USE_FCNTL_SERIALIZE           0\n#define APR_USE_PROC_PTHREAD_SERIALIZE    0 \n#define APR_USE_PTHREAD_SERIALIZE         0 \n\n#define APR_HAS_FLOCK_SERIALIZE           0\n#define APR_HAS_SYSVSEM_SERIALIZE         0\n#define APR_HAS_POSIXSEM_SERIALIZE        0\n#define APR_HAS_FCNTL_SERIALIZE           0\n#define APR_HAS_PROC_PTHREAD_SERIALIZE    0\n\n#define APR_PROCESS_LOCK_IS_GLOBAL        0\n\n#define APR_HAVE_CORKABLE_TCP   0\n#define APR_HAVE_GETRLIMIT      0\n#define APR_HAVE_ICONV          0\n#define APR_HAVE_IN_ADDR        1\n#define APR_HAVE_INET_ADDR      1\n#define APR_HAVE_INET_NETWORK   0\n#define APR_HAVE_IPV6           @apr_have_ipv6_10@\n#define APR_HAVE_MEMMOVE        1\n#define APR_HAVE_SETRLIMIT      0\n#define APR_HAVE_SIGACTION      0\n#define APR_HAVE_SIGSUSPEND     0\n#define APR_HAVE_SIGWAIT        0\n#define APR_HAVE_SA_STORAGE     0\n#define APR_HAVE_STRCASECMP     0\n#define APR_HAVE_STRDUP         1\n#define APR_HAVE_STRNCASECMP    0\n#define APR_HAVE_STRSTR         1\n#define APR_HAVE_MEMCHR         1\n#define APR_HAVE_STRUCT_RLIMIT  0\n#define APR_HAVE_UNION_SEMUN    0\n#define APR_HAVE_SCTP           0\n#define APR_HAVE_IOVEC          0\n\n#ifndef _WIN32_WCE\n#define APR_HAVE_STRICMP        1\n#define APR_HAVE_STRNICMP       1\n#else\n#define APR_HAVE_STRICMP        0\n#define APR_HAVE_STRNICMP       0\n#endif\n\n/*  APR Feature Macros */\n#define APR_HAS_SHARED_MEMORY     1\n#define APR_HAS_THREADS           1\n#define APR_HAS_MMAP              1\n#define APR_HAS_FORK              0\n#define APR_HAS_RANDOM            1\n#define APR_HAS_OTHER_CHILD       1\n#define APR_HAS_DSO               1\n#define APR_HAS_SO_ACCEPTFILTER   0\n#define APR_HAS_UNICODE_FS        1\n#define APR_HAS_PROC_INVOKED      1\n#define APR_HAS_OS_UUID           1\n\n#ifndef _WIN32_WCE\n#define APR_HAS_SENDFILE          1\n#define APR_HAS_USER              1\n#define APR_HAS_LARGE_FILES       1\n#define APR_HAS_XTHREAD_FILES     1\n#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 1\n#else\n#define APR_HAS_SENDFILE          0\n#define APR_HAS_USER              0\n#define APR_HAS_LARGE_FILES       0\n#define APR_HAS_XTHREAD_FILES     0\n#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0\n#endif\n\n/* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible\n * to poll on files/pipes.\n */\n#define APR_FILES_AS_SOCKETS      0\n\n/* This macro indicates whether or not EBCDIC is the native character set.\n */\n#define APR_CHARSET_EBCDIC        0\n\n/* If we have a TCP implementation that can be \"corked\", what flag\n * do we use?\n */\n#define APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@\n\n/* Is the TCP_NODELAY socket option inherited from listening sockets?\n */\n#define APR_TCP_NODELAY_INHERITED 1\n\n/* Is the O_NONBLOCK flag inherited from listening sockets?\n */\n#define APR_O_NONBLOCK_INHERITED  1\n\n/* Typedefs that APR needs. */\n\ntypedef  unsigned char     apr_byte_t;\n\ntypedef  short             apr_int16_t;\ntypedef  unsigned short    apr_uint16_t;\n\ntypedef  int               apr_int32_t;\ntypedef  unsigned int      apr_uint32_t;\n\ntypedef  __int64           apr_int64_t;\ntypedef  unsigned __int64  apr_uint64_t;\n\ntypedef  size_t      apr_size_t;\n#if APR_HAVE_STDDEF_H\ntypedef  ptrdiff_t   apr_ssize_t;\n#else\ntypedef  int         apr_ssize_t;\n#endif\n#if APR_HAS_LARGE_FILES\ntypedef  __int64     apr_off_t;\n#else\ntypedef  int         apr_off_t;\n#endif\ntypedef  int         apr_socklen_t;\ntypedef  apr_uint64_t      apr_ino_t;\n\n#ifdef _WIN64\n#define APR_SIZEOF_VOIDP   8\n#else\n#define APR_SIZEOF_VOIDP   4\n#endif\n\n#if APR_SIZEOF_VOIDP == 8\ntypedef  apr_uint64_t            apr_uintptr_t;\n#else\ntypedef  apr_uint32_t            apr_uintptr_t;\n#endif\n\n/* Are we big endian? */\n/* XXX: Fatal assumption on Alpha platforms */\n#define APR_IS_BIGENDIAN\t0\n\n/* Mechanisms to properly type numeric literals */\n\n#ifndef __GNUC__\n#define APR_INT64_C(val) (val##i64)\n#define APR_UINT64_C(val) (val##Ui64)\n#else\n#define APR_INT64_C(val) (val##LL)\n#define APR_UINT64_C(val) (val##ULL)\n#endif\n\n#ifdef INT16_MIN\n#define APR_INT16_MIN   INT16_MIN\n#else\n#define APR_INT16_MIN   (-0x7fff - 1)\n#endif\n\n#ifdef INT16_MAX\n#define APR_INT16_MAX  INT16_MAX\n#else\n#define APR_INT16_MAX   (0x7fff)\n#endif\n\n#ifdef UINT16_MAX\n#define APR_UINT16_MAX  UINT16_MAX\n#else\n#define APR_UINT16_MAX  (0xffff)\n#endif\n\n#ifdef INT32_MIN\n#define APR_INT32_MIN   INT32_MIN\n#else\n#define APR_INT32_MIN   (-0x7fffffff - 1)\n#endif\n\n#ifdef INT32_MAX\n#define APR_INT32_MAX  INT32_MAX\n#else\n#define APR_INT32_MAX  0x7fffffff\n#endif\n\n#ifdef UINT32_MAX\n#define APR_UINT32_MAX  UINT32_MAX\n#else\n#define APR_UINT32_MAX  (0xffffffffU)\n#endif\n\n#ifdef INT64_MIN\n#define APR_INT64_MIN   INT64_MIN\n#else\n#define APR_INT64_MIN   (APR_INT64_C(-0x7fffffffffffffff) - 1)\n#endif\n\n#ifdef INT64_MAX\n#define APR_INT64_MAX   INT64_MAX\n#else\n#define APR_INT64_MAX   APR_INT64_C(0x7fffffffffffffff)\n#endif\n\n#ifdef UINT64_MAX\n#define APR_UINT64_MAX  UINT64_MAX\n#else\n#define APR_UINT64_MAX  APR_UINT64_C(0xffffffffffffffff)\n#endif\n\n#define APR_SIZE_MAX    (~((apr_size_t)0))\n\n/* Definitions that APR programs need to work properly. */\n\n/**\n * APR public API wrap for C++ compilers.\n */\n#ifdef __cplusplus\n#define APR_BEGIN_DECLS     extern \"C\" {\n#define APR_END_DECLS       }\n#else\n#define APR_BEGIN_DECLS\n#define APR_END_DECLS\n#endif\n\n/** \n * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC, \n * so that they follow the platform's calling convention.\n * <PRE>\n *\n * void* APR_THREAD_FUNC my_thread_entry_fn(apr_thread_t *thd, void *data);\n *\n * </PRE>\n */\n#define APR_THREAD_FUNC  __stdcall\n\n\n#if defined(DOXYGEN) || !defined(WIN32)\n\n/**\n * The public APR functions are declared with APR_DECLARE(), so they may\n * use the most appropriate calling convention.  Public APR functions with \n * variable arguments must use APR_DECLARE_NONSTD().\n *\n * @remark Both the declaration and implementations must use the same macro.\n *\n * <PRE>\n * APR_DECLARE(rettype) apr_func(args)\n * </PRE>\n * @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA\n * @remark Note that when APR compiles the library itself, it passes the \n * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32) \n * to export public symbols from the dynamic library build.\\n\n * The user must define the APR_DECLARE_STATIC when compiling to target\n * the static APR library on some platforms (e.g. Win32.)  The public symbols \n * are neither exported nor imported when APR_DECLARE_STATIC is defined.\\n\n * By default, compiling an application and including the APR public\n * headers, without defining APR_DECLARE_STATIC, will prepare the code to be\n * linked to the dynamic library.\n */\n#define APR_DECLARE(type)            type \n\n/**\n * The public APR functions using variable arguments are declared with \n * APR_DECLARE_NONSTD(), as they must follow the C language calling convention.\n * @see APR_DECLARE @see APR_DECLARE_DATA\n * @remark Both the declaration and implementations must use the same macro.\n * <PRE>\n *\n * APR_DECLARE_NONSTD(rettype) apr_func(args, ...);\n *\n * </PRE>\n */\n#define APR_DECLARE_NONSTD(type)     type\n\n/**\n * The public APR variables are declared with AP_MODULE_DECLARE_DATA.\n * This assures the appropriate indirection is invoked at compile time.\n * @see APR_DECLARE @see APR_DECLARE_NONSTD\n * @remark Note that the declaration and implementations use different forms,\n * but both must include the macro.\n * \n * <PRE>\n *\n * extern APR_DECLARE_DATA type apr_variable;\\n\n * APR_DECLARE_DATA type apr_variable = value;\n *\n * </PRE>\n */\n#define APR_DECLARE_DATA\n\n#elif defined(APR_DECLARE_STATIC)\n#define APR_DECLARE(type)            type __stdcall\n#define APR_DECLARE_NONSTD(type)     type __cdecl\n#define APR_DECLARE_DATA\n#elif defined(APR_DECLARE_EXPORT)\n#define APR_DECLARE(type)            __declspec(dllexport) type __stdcall\n#define APR_DECLARE_NONSTD(type)     __declspec(dllexport) type __cdecl\n#define APR_DECLARE_DATA             __declspec(dllexport)\n#else\n#define APR_DECLARE(type)            __declspec(dllimport) type __stdcall\n#define APR_DECLARE_NONSTD(type)     __declspec(dllimport) type __cdecl\n#define APR_DECLARE_DATA             __declspec(dllimport)\n#endif\n\n#ifdef _WIN64\n#define APR_SSIZE_T_FMT          \"I64d\"\n#define APR_SIZE_T_FMT           \"I64u\"\n#else\n#define APR_SSIZE_T_FMT          \"d\"\n#define APR_SIZE_T_FMT           \"u\"\n#endif\n\n#if APR_HAS_LARGE_FILES\n#define APR_OFF_T_FMT            \"I64d\"\n#else\n#define APR_OFF_T_FMT            \"d\"\n#endif\n\n#define APR_PID_T_FMT            \"d\"\n\n#define APR_INT64_T_FMT          \"I64d\"\n#define APR_UINT64_T_FMT         \"I64u\"\n#define APR_UINT64_T_HEX_FMT     \"I64x\"\n\n/* No difference between PROC and GLOBAL mutex */\n#define APR_PROC_MUTEX_IS_GLOBAL      1\n\n/* Local machine definition for console and log output. */\n#define APR_EOL_STR              \"\\r\\n\"\n\ntypedef int apr_wait_t;\n\n#if APR_HAS_UNICODE_FS\n/* An arbitrary size that is digestable. True max is a bit less than 32000 */\n#define APR_PATH_MAX 8192\n#else /* !APR_HAS_UNICODE_FS */\n#define APR_PATH_MAX MAX_PATH\n#endif\n\n#define APR_DSOPATH \"PATH\"\n\n/** @} */\n\n/* Definitions that only Win32 programs need to compile properly. */\n\n/* XXX These simply don't belong here, perhaps in apr_portable.h\n * based on some APR_HAVE_PID/GID/UID?\n */\n#ifndef __GNUC__\ntypedef  int         pid_t;\n#endif\ntypedef  int         uid_t;\ntypedef  int         gid_t;\n\n/* Win32 .h ommissions we really need */\n#define STDIN_FILENO  0\n#define STDOUT_FILENO 1\n#define STDERR_FILENO 2\n\n#if APR_HAVE_IPV6\n\n/* Appears in later flavors, not the originals. */\n#ifndef in_addr6\n#define  in6_addr    in_addr6\n#endif\n\n#ifndef WS2TCPIP_INLINE\n#define IN6_IS_ADDR_V4MAPPED(a) \\\n    (   (*(const apr_uint64_t *)(const void *)(&(a)->s6_addr[0]) == 0) \\\n     && (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))\n#endif\n\n#endif /* APR_HAS_IPV6 */\n\n#ifdef __cplusplus\n}\n#endif\n\n/* Done with badly written headers\n */\n#if defined(_MSC_VER) && _MSC_VER >= 1200\n#pragma warning(pop)\n#pragma warning(disable: 4996)\n#endif\n\n#endif /* WIN32 */\n\n#endif /* APR_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_allocator.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_ALLOCATOR_H\n#define APR_ALLOCATOR_H\n\n/**\n * @file apr_allocator.h\n * @brief APR Internal Memory Allocation\n */\n\n#include \"apr.h\"\n#include \"apr_errno.h\"\n#define APR_WANT_MEMFUNC /**< For no good reason? */\n#include \"apr_want.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @defgroup apr_allocator Internal Memory Allocation\n * @ingroup APR \n * @{\n */\n\n/** the allocator structure */\ntypedef struct apr_allocator_t apr_allocator_t;\n/** the structure which holds information about the allocation */\ntypedef struct apr_memnode_t apr_memnode_t;\n\n/** basic memory node structure\n * @note The next, ref and first_avail fields are available for use by the\n *       caller of apr_allocator_alloc(), the remaining fields are read-only.\n *       The next field has to be used with caution and sensibly set when the\n *       memnode is passed back to apr_allocator_free().  See apr_allocator_free()\n *       for details.  \n *       The ref and first_avail fields will be properly restored by\n *       apr_allocator_free().\n */\nstruct apr_memnode_t {\n    apr_memnode_t *next;            /**< next memnode */\n    apr_memnode_t **ref;            /**< reference to self */\n    apr_uint32_t   index;           /**< size */\n    apr_uint32_t   free_index;      /**< how much free */\n    char          *first_avail;     /**< pointer to first free memory */\n    char          *endp;            /**< pointer to end of free memory */\n};\n\n/** The base size of a memory node - aligned.  */\n#define APR_MEMNODE_T_SIZE APR_ALIGN_DEFAULT(sizeof(apr_memnode_t))\n\n/** Symbolic constants */\n#define APR_ALLOCATOR_MAX_FREE_UNLIMITED 0\n\n/**\n * Create a new allocator\n * @param allocator The allocator we have just created.\n *\n */\nAPR_DECLARE(apr_status_t) apr_allocator_create(apr_allocator_t **allocator)\n                          __attribute__((nonnull(1)));\n\n/**\n * Destroy an allocator\n * @param allocator The allocator to be destroyed\n * @remark Any memnodes not given back to the allocator prior to destroying\n *         will _not_ be free()d.\n */\nAPR_DECLARE(void) apr_allocator_destroy(apr_allocator_t *allocator)\n                  __attribute__((nonnull(1)));\n\n/**\n * Allocate a block of mem from the allocator\n * @param allocator The allocator to allocate from\n * @param size The size of the mem to allocate (excluding the\n *        memnode structure)\n */\nAPR_DECLARE(apr_memnode_t *) apr_allocator_alloc(apr_allocator_t *allocator,\n                                                 apr_size_t size)\n                             __attribute__((nonnull(1)));\n\n/**\n * Free a list of blocks of mem, giving them back to the allocator.\n * The list is typically terminated by a memnode with its next field\n * set to NULL.\n * @param allocator The allocator to give the mem back to\n * @param memnode The memory node to return\n */\nAPR_DECLARE(void) apr_allocator_free(apr_allocator_t *allocator,\n                                     apr_memnode_t *memnode)\n                  __attribute__((nonnull(1,2)));\n\n#include \"apr_pools.h\"\n\n/**\n * Set the owner of the allocator\n * @param allocator The allocator to set the owner for\n * @param pool The pool that is to own the allocator\n * @remark Typically pool is the highest level pool using the allocator\n */\n/*\n * XXX: see if we can come up with something a bit better.  Currently\n * you can make a pool an owner, but if the pool doesn't use the allocator\n * the allocator will never be destroyed.\n */\nAPR_DECLARE(void) apr_allocator_owner_set(apr_allocator_t *allocator,\n                                          apr_pool_t *pool)\n                  __attribute__((nonnull(1)));\n\n/**\n * Get the current owner of the allocator\n * @param allocator The allocator to get the owner from\n */\nAPR_DECLARE(apr_pool_t *) apr_allocator_owner_get(apr_allocator_t *allocator)\n                          __attribute__((nonnull(1)));\n\n/**\n * Set the current threshold at which the allocator should start\n * giving blocks back to the system.\n * @param allocator The allocator to set the threshold on\n * @param size The threshold.  0 == unlimited.\n */\nAPR_DECLARE(void) apr_allocator_max_free_set(apr_allocator_t *allocator,\n                                             apr_size_t size)\n                  __attribute__((nonnull(1)));\n\n#include \"apr_thread_mutex.h\"\n\n#if APR_HAS_THREADS\n/**\n * Set a mutex for the allocator to use\n * @param allocator The allocator to set the mutex for\n * @param mutex The mutex\n */\nAPR_DECLARE(void) apr_allocator_mutex_set(apr_allocator_t *allocator,\n                                          apr_thread_mutex_t *mutex)\n                  __attribute__((nonnull(1)));\n\n/**\n * Get the mutex currently set for the allocator\n * @param allocator The allocator\n */\nAPR_DECLARE(apr_thread_mutex_t *) apr_allocator_mutex_get(\n                                          apr_allocator_t *allocator)\n                                  __attribute__((nonnull(1)));\n\n#endif /* APR_HAS_THREADS */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* !APR_ALLOCATOR_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_atomic.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_ATOMIC_H\n#define APR_ATOMIC_H\n\n/**\n * @file apr_atomic.h\n * @brief APR Atomic Operations\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @defgroup apr_atomic Atomic Operations\n * @ingroup APR \n * @{\n */\n\n/**\n * this function is required on some platforms to initialize the\n * atomic operation's internal structures\n * @param p pool\n * @return APR_SUCCESS on successful completion\n * @remark Programs do NOT need to call this directly. APR will call this\n *         automatically from apr_initialize.\n * @internal\n */\nAPR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p);\n\n/*\n * Atomic operations on 32-bit values\n * Note: Each of these functions internally implements a memory barrier\n * on platforms that require it\n */\n\n/**\n * atomically read an apr_uint32_t from memory\n * @param mem the pointer\n */\nAPR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem);\n\n/**\n * atomically set an apr_uint32_t in memory\n * @param mem pointer to the object\n * @param val value that the object will assume\n */\nAPR_DECLARE(void) apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val);\n\n/**\n * atomically add 'val' to an apr_uint32_t\n * @param mem pointer to the object\n * @param val amount to add\n * @return old value pointed to by mem\n */\nAPR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val);\n\n/**\n * atomically subtract 'val' from an apr_uint32_t\n * @param mem pointer to the object\n * @param val amount to subtract\n */\nAPR_DECLARE(void) apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val);\n\n/**\n * atomically increment an apr_uint32_t by 1\n * @param mem pointer to the object\n * @return old value pointed to by mem\n */\nAPR_DECLARE(apr_uint32_t) apr_atomic_inc32(volatile apr_uint32_t *mem);\n\n/**\n * atomically decrement an apr_uint32_t by 1\n * @param mem pointer to the atomic value\n * @return zero if the value becomes zero on decrement, otherwise non-zero\n */\nAPR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem);\n\n/**\n * compare an apr_uint32_t's value with 'cmp'.\n * If they are the same swap the value with 'with'\n * @param mem pointer to the value\n * @param with what to swap it with\n * @param cmp the value to compare it to\n * @return the old value of *mem\n */\nAPR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,\n                              apr_uint32_t cmp);\n\n/**\n * exchange an apr_uint32_t's value with 'val'.\n * @param mem pointer to the value\n * @param val what to swap it with\n * @return the old value of *mem\n */\nAPR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val);\n\n/**\n * compare the pointer's value with cmp.\n * If they are the same swap the value with 'with'\n * @param mem pointer to the pointer\n * @param with what to swap it with\n * @param cmp the value to compare it to\n * @return the old value of the pointer\n */\nAPR_DECLARE(void*) apr_atomic_casptr(volatile void **mem, void *with, const void *cmp);\n\n/**\n * exchange a pair of pointer values\n * @param mem pointer to the pointer\n * @param with what to swap it with\n * @return the old value of the pointer\n */\nAPR_DECLARE(void*) apr_atomic_xchgptr(volatile void **mem, void *with);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\t/* !APR_ATOMIC_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_dso.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_DSO_DOT_H\n#define APR_DSO_DOT_H\n\n/**\n * @file apr_dso.h\n * @brief APR Dynamic Object Handling Routines\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @defgroup apr_dso Dynamic Object Handling\n * @ingroup APR \n * @{\n */\n\n#if APR_HAS_DSO || defined(DOXYGEN)\n\n/**\n * Structure for referencing dynamic objects\n */\ntypedef struct apr_dso_handle_t       apr_dso_handle_t;\n\n/**\n * Structure for referencing symbols from dynamic objects\n */\ntypedef void *                        apr_dso_handle_sym_t;\n\n/**\n * Load a DSO library.\n * @param res_handle Location to store new handle for the DSO.\n * @param path Path to the DSO library\n * @param ctx Pool to use.\n * @bug We aught to provide an alternative to RTLD_GLOBAL, which\n * is the only supported method of loading DSOs today.\n */\nAPR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, \n                                       const char *path, apr_pool_t *ctx);\n\n/**\n * Close a DSO library.\n * @param handle handle to close.\n */\nAPR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle);\n\n/**\n * Load a symbol from a DSO handle.\n * @param ressym Location to store the loaded symbol\n * @param handle handle to load the symbol from.\n * @param symname Name of the symbol to load.\n */\nAPR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym, \n                                      apr_dso_handle_t *handle,\n                                      const char *symname);\n\n/**\n * Report more information when a DSO function fails.\n * @param dso The dso handle that has been opened\n * @param buf Location to store the dso error\n * @param bufsize The size of the provided buffer\n */\nAPR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buf, apr_size_t bufsize);\n\n#endif /* APR_HAS_DSO */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "third_party/include/apr/apr_env.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_ENV_H\n#define APR_ENV_H\n/**\n * @file apr_env.h\n * @brief APR Environment functions\n */\n#include \"apr_errno.h\"\n#include \"apr_pools.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_env Functions for manipulating the environment\n * @ingroup APR \n * @{\n */\n\n/**\n * Get the value of an environment variable\n * @param value the returned value, allocated from @a pool\n * @param envvar the name of the environment variable\n * @param pool where to allocate @a value and any temporary storage from\n */\nAPR_DECLARE(apr_status_t) apr_env_get(char **value, const char *envvar,\n                                      apr_pool_t *pool);\n\n/**\n * Set the value of an environment variable\n * @param envvar the name of the environment variable\n * @param value the value to set\n * @param pool where to allocate temporary storage from\n */\nAPR_DECLARE(apr_status_t) apr_env_set(const char *envvar, const char *value,\n                                      apr_pool_t *pool);\n\n/**\n * Delete a variable from the environment\n * @param envvar the name of the environment variable\n * @param pool where to allocate temporary storage from\n */\nAPR_DECLARE(apr_status_t) apr_env_delete(const char *envvar, apr_pool_t *pool);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_ENV_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_errno.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_ERRNO_H\n#define APR_ERRNO_H\n\n/**\n * @file apr_errno.h\n * @brief APR Error Codes\n */\n\n#include \"apr.h\"\n\n#if APR_HAVE_ERRNO_H\n#include <errno.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_errno Error Codes\n * @ingroup APR\n * @{\n */\n\n/**\n * Type for specifying an error or status code.\n */\ntypedef int apr_status_t;\n\n/**\n * Return a human readable string describing the specified error.\n * @param statcode The error code to get a string for.\n * @param buf A buffer to hold the error string.\n * @param bufsize Size of the buffer to hold the string.\n */\nAPR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,\n                                 apr_size_t bufsize);\n\n#if defined(DOXYGEN)\n/**\n * @def APR_FROM_OS_ERROR(os_err_type syserr)\n * Fold a platform specific error into an apr_status_t code.\n * @return apr_status_t\n * @param e The platform os error code.\n * @warning  macro implementation; the syserr argument may be evaluated\n *      multiple times.\n */\n#define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)\n\n/**\n * @def APR_TO_OS_ERROR(apr_status_t statcode)\n * @return os_err_type\n * Fold an apr_status_t code back to the native platform defined error.\n * @param e The apr_status_t folded platform os error code.\n * @warning  macro implementation; the statcode argument may be evaluated\n *      multiple times.  If the statcode was not created by apr_get_os_error\n *      or APR_FROM_OS_ERROR, the results are undefined.\n */\n#define APR_TO_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR)\n\n/** @def apr_get_os_error()\n * @return apr_status_t the last platform error, folded into apr_status_t, on most platforms\n * @remark This retrieves errno, or calls a GetLastError() style function, and\n *      folds it with APR_FROM_OS_ERROR.  Some platforms (such as OS2) have no\n *      such mechanism, so this call may be unsupported.  Do NOT use this\n *      call for socket errors from socket, send, recv etc!\n */\n\n/** @def apr_set_os_error(e)\n * Reset the last platform error, unfolded from an apr_status_t, on some platforms\n * @param e The OS error folded in a prior call to APR_FROM_OS_ERROR()\n * @warning This is a macro implementation; the statcode argument may be evaluated\n *      multiple times.  If the statcode was not created by apr_get_os_error\n *      or APR_FROM_OS_ERROR, the results are undefined.  This macro sets\n *      errno, or calls a SetLastError() style function, unfolding statcode\n *      with APR_TO_OS_ERROR.  Some platforms (such as OS2) have no such\n *      mechanism, so this call may be unsupported.\n */\n\n/** @def apr_get_netos_error()\n * Return the last socket error, folded into apr_status_t, on all platforms\n * @remark This retrieves errno or calls a GetLastSocketError() style function,\n *      and folds it with APR_FROM_OS_ERROR.\n */\n\n/** @def apr_set_netos_error(e)\n * Reset the last socket error, unfolded from an apr_status_t\n * @param e The socket error folded in a prior call to APR_FROM_OS_ERROR()\n * @warning This is a macro implementation; the statcode argument may be evaluated\n *      multiple times.  If the statcode was not created by apr_get_os_error\n *      or APR_FROM_OS_ERROR, the results are undefined.  This macro sets\n *      errno, or calls a WSASetLastError() style function, unfolding\n *      socketcode with APR_TO_OS_ERROR.\n */\n\n#endif /* defined(DOXYGEN) */\n\n/**\n * APR_OS_START_ERROR is where the APR specific error values start.\n */\n#define APR_OS_START_ERROR     20000\n/**\n * APR_OS_ERRSPACE_SIZE is the maximum number of errors you can fit\n *    into one of the error/status ranges below -- except for\n *    APR_OS_START_USERERR, which see.\n */\n#define APR_OS_ERRSPACE_SIZE 50000\n/**\n * APR_UTIL_ERRSPACE_SIZE is the size of the space that is reserved for\n * use within apr-util. This space is reserved above that used by APR\n * internally.\n * @note This number MUST be smaller than APR_OS_ERRSPACE_SIZE by a\n *       large enough amount that APR has sufficient room for its\n *       codes.\n */\n#define APR_UTIL_ERRSPACE_SIZE 20000\n/**\n * APR_OS_START_STATUS is where the APR specific status codes start.\n */\n#define APR_OS_START_STATUS    (APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE)\n/**\n * APR_UTIL_START_STATUS is where APR-Util starts defining its\n * status codes.\n */\n#define APR_UTIL_START_STATUS   (APR_OS_START_STATUS + \\\n                           (APR_OS_ERRSPACE_SIZE - APR_UTIL_ERRSPACE_SIZE))\n/**\n * APR_OS_START_USERERR are reserved for applications that use APR that\n *     layer their own error codes along with APR's.  Note that the\n *     error immediately following this one is set ten times farther\n *     away than usual, so that users of apr have a lot of room in\n *     which to declare custom error codes.\n *\n * In general applications should try and create unique error codes. To try\n * and assist in finding suitable ranges of numbers to use, the following\n * ranges are known to be used by the listed applications. If your\n * application defines error codes please advise the range of numbers it\n * uses to dev@apr.apache.org for inclusion in this list.\n *\n * Ranges shown are in relation to APR_OS_START_USERERR\n *\n * Subversion - Defined ranges, of less than 100, at intervals of 5000\n *              starting at an offset of 5000, e.g.\n *               +5000 to 5100,  +10000 to 10100\n *\n * Apache HTTPD - +2000 to 2999\n */\n#define APR_OS_START_USERERR    (APR_OS_START_STATUS + APR_OS_ERRSPACE_SIZE)\n/**\n * APR_OS_START_USEERR is obsolete, defined for compatibility only.\n * Use APR_OS_START_USERERR instead.\n */\n#define APR_OS_START_USEERR     APR_OS_START_USERERR\n/**\n * APR_OS_START_CANONERR is where APR versions of errno values are defined\n *     on systems which don't have the corresponding errno.\n */\n#define APR_OS_START_CANONERR  (APR_OS_START_USERERR \\\n                                 + (APR_OS_ERRSPACE_SIZE * 10))\n/**\n * APR_OS_START_EAIERR folds EAI_ error codes from getaddrinfo() into\n *     apr_status_t values.\n */\n#define APR_OS_START_EAIERR    (APR_OS_START_CANONERR + APR_OS_ERRSPACE_SIZE)\n/**\n * APR_OS_START_SYSERR folds platform-specific system error values into\n *     apr_status_t values.\n */\n#define APR_OS_START_SYSERR    (APR_OS_START_EAIERR + APR_OS_ERRSPACE_SIZE)\n\n/**\n * @defgroup APR_ERROR_map APR Error Space\n * <PRE>\n * The following attempts to show the relation of the various constants\n * used for mapping APR Status codes.\n *\n *       0\n *\n *  20,000     APR_OS_START_ERROR\n *\n *         + APR_OS_ERRSPACE_SIZE (50,000)\n *\n *  70,000      APR_OS_START_STATUS\n *\n *         + APR_OS_ERRSPACE_SIZE - APR_UTIL_ERRSPACE_SIZE (30,000)\n *\n * 100,000      APR_UTIL_START_STATUS\n *\n *         + APR_UTIL_ERRSPACE_SIZE (20,000)\n *\n * 120,000      APR_OS_START_USERERR\n *\n *         + 10 x APR_OS_ERRSPACE_SIZE (50,000 * 10)\n *\n * 620,000      APR_OS_START_CANONERR\n *\n *         + APR_OS_ERRSPACE_SIZE (50,000)\n *\n * 670,000      APR_OS_START_EAIERR\n *\n *         + APR_OS_ERRSPACE_SIZE (50,000)\n *\n * 720,000      APR_OS_START_SYSERR\n *\n * </PRE>\n */\n\n/** no error. */\n#define APR_SUCCESS 0\n\n/**\n * @defgroup APR_Error APR Error Values\n * <PRE>\n * <b>APR ERROR VALUES</b>\n * APR_ENOSTAT      APR was unable to perform a stat on the file\n * APR_ENOPOOL      APR was not provided a pool with which to allocate memory\n * APR_EBADDATE     APR was given an invalid date\n * APR_EINVALSOCK   APR was given an invalid socket\n * APR_ENOPROC      APR was not given a process structure\n * APR_ENOTIME      APR was not given a time structure\n * APR_ENODIR       APR was not given a directory structure\n * APR_ENOLOCK      APR was not given a lock structure\n * APR_ENOPOLL      APR was not given a poll structure\n * APR_ENOSOCKET    APR was not given a socket\n * APR_ENOTHREAD    APR was not given a thread structure\n * APR_ENOTHDKEY    APR was not given a thread key structure\n * APR_ENOSHMAVAIL  There is no more shared memory available\n * APR_EDSOOPEN     APR was unable to open the dso object.  For more\n *                  information call apr_dso_error().\n * APR_EGENERAL     General failure (specific information not available)\n * APR_EBADIP       The specified IP address is invalid\n * APR_EBADMASK     The specified netmask is invalid\n * APR_ESYMNOTFOUND Could not find the requested symbol\n * APR_ENOTENOUGHENTROPY Not enough entropy to continue\n * </PRE>\n *\n * <PRE>\n * <b>APR STATUS VALUES</b>\n * APR_INCHILD        Program is currently executing in the child\n * APR_INPARENT       Program is currently executing in the parent\n * APR_DETACH         The thread is detached\n * APR_NOTDETACH      The thread is not detached\n * APR_CHILD_DONE     The child has finished executing\n * APR_CHILD_NOTDONE  The child has not finished executing\n * APR_TIMEUP         The operation did not finish before the timeout\n * APR_INCOMPLETE     The operation was incomplete although some processing\n *                    was performed and the results are partially valid\n * APR_BADCH          Getopt found an option not in the option string\n * APR_BADARG         Getopt found an option that is missing an argument\n *                    and an argument was specified in the option string\n * APR_EOF            APR has encountered the end of the file\n * APR_NOTFOUND       APR was unable to find the socket in the poll structure\n * APR_ANONYMOUS      APR is using anonymous shared memory\n * APR_FILEBASED      APR is using a file name as the key to the shared memory\n * APR_KEYBASED       APR is using a shared key as the key to the shared memory\n * APR_EINIT          Ininitalizer value.  If no option has been found, but\n *                    the status variable requires a value, this should be used\n * APR_ENOTIMPL       The APR function has not been implemented on this\n *                    platform, either because nobody has gotten to it yet,\n *                    or the function is impossible on this platform.\n * APR_EMISMATCH      Two passwords do not match.\n * APR_EABSOLUTE      The given path was absolute.\n * APR_ERELATIVE      The given path was relative.\n * APR_EINCOMPLETE    The given path was neither relative nor absolute.\n * APR_EABOVEROOT     The given path was above the root path.\n * APR_EBUSY          The given lock was busy.\n * APR_EPROC_UNKNOWN  The given process wasn't recognized by APR\n * </PRE>\n * @{\n */\n/** @see APR_STATUS_IS_ENOSTAT */\n#define APR_ENOSTAT        (APR_OS_START_ERROR + 1)\n/** @see APR_STATUS_IS_ENOPOOL */\n#define APR_ENOPOOL        (APR_OS_START_ERROR + 2)\n/* empty slot: +3 */\n/** @see APR_STATUS_IS_EBADDATE */\n#define APR_EBADDATE       (APR_OS_START_ERROR + 4)\n/** @see APR_STATUS_IS_EINVALSOCK */\n#define APR_EINVALSOCK     (APR_OS_START_ERROR + 5)\n/** @see APR_STATUS_IS_ENOPROC */\n#define APR_ENOPROC        (APR_OS_START_ERROR + 6)\n/** @see APR_STATUS_IS_ENOTIME */\n#define APR_ENOTIME        (APR_OS_START_ERROR + 7)\n/** @see APR_STATUS_IS_ENODIR */\n#define APR_ENODIR         (APR_OS_START_ERROR + 8)\n/** @see APR_STATUS_IS_ENOLOCK */\n#define APR_ENOLOCK        (APR_OS_START_ERROR + 9)\n/** @see APR_STATUS_IS_ENOPOLL */\n#define APR_ENOPOLL        (APR_OS_START_ERROR + 10)\n/** @see APR_STATUS_IS_ENOSOCKET */\n#define APR_ENOSOCKET      (APR_OS_START_ERROR + 11)\n/** @see APR_STATUS_IS_ENOTHREAD */\n#define APR_ENOTHREAD      (APR_OS_START_ERROR + 12)\n/** @see APR_STATUS_IS_ENOTHDKEY */\n#define APR_ENOTHDKEY      (APR_OS_START_ERROR + 13)\n/** @see APR_STATUS_IS_EGENERAL */\n#define APR_EGENERAL       (APR_OS_START_ERROR + 14)\n/** @see APR_STATUS_IS_ENOSHMAVAIL */\n#define APR_ENOSHMAVAIL    (APR_OS_START_ERROR + 15)\n/** @see APR_STATUS_IS_EBADIP */\n#define APR_EBADIP         (APR_OS_START_ERROR + 16)\n/** @see APR_STATUS_IS_EBADMASK */\n#define APR_EBADMASK       (APR_OS_START_ERROR + 17)\n/* empty slot: +18 */\n/** @see APR_STATUS_IS_EDSOPEN */\n#define APR_EDSOOPEN       (APR_OS_START_ERROR + 19)\n/** @see APR_STATUS_IS_EABSOLUTE */\n#define APR_EABSOLUTE      (APR_OS_START_ERROR + 20)\n/** @see APR_STATUS_IS_ERELATIVE */\n#define APR_ERELATIVE      (APR_OS_START_ERROR + 21)\n/** @see APR_STATUS_IS_EINCOMPLETE */\n#define APR_EINCOMPLETE    (APR_OS_START_ERROR + 22)\n/** @see APR_STATUS_IS_EABOVEROOT */\n#define APR_EABOVEROOT     (APR_OS_START_ERROR + 23)\n/** @see APR_STATUS_IS_EBADPATH */\n#define APR_EBADPATH       (APR_OS_START_ERROR + 24)\n/** @see APR_STATUS_IS_EPATHWILD */\n#define APR_EPATHWILD      (APR_OS_START_ERROR + 25)\n/** @see APR_STATUS_IS_ESYMNOTFOUND */\n#define APR_ESYMNOTFOUND   (APR_OS_START_ERROR + 26)\n/** @see APR_STATUS_IS_EPROC_UNKNOWN */\n#define APR_EPROC_UNKNOWN  (APR_OS_START_ERROR + 27)\n/** @see APR_STATUS_IS_ENOTENOUGHENTROPY */\n#define APR_ENOTENOUGHENTROPY (APR_OS_START_ERROR + 28)\n/** @} */\n\n/**\n * @defgroup APR_STATUS_IS Status Value Tests\n * @warning For any particular error condition, more than one of these tests\n *      may match. This is because platform-specific error codes may not\n *      always match the semantics of the POSIX codes these tests (and the\n *      corresponding APR error codes) are named after. A notable example\n *      are the APR_STATUS_IS_ENOENT and APR_STATUS_IS_ENOTDIR tests on\n *      Win32 platforms. The programmer should always be aware of this and\n *      adjust the order of the tests accordingly.\n * @{\n */\n/**\n * APR was unable to perform a stat on the file\n * @warning always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_ENOSTAT(s)        ((s) == APR_ENOSTAT)\n/**\n * APR was not provided a pool with which to allocate memory\n * @warning always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_ENOPOOL(s)        ((s) == APR_ENOPOOL)\n/** APR was given an invalid date  */\n#define APR_STATUS_IS_EBADDATE(s)       ((s) == APR_EBADDATE)\n/** APR was given an invalid socket */\n#define APR_STATUS_IS_EINVALSOCK(s)     ((s) == APR_EINVALSOCK)\n/** APR was not given a process structure */\n#define APR_STATUS_IS_ENOPROC(s)        ((s) == APR_ENOPROC)\n/** APR was not given a time structure */\n#define APR_STATUS_IS_ENOTIME(s)        ((s) == APR_ENOTIME)\n/** APR was not given a directory structure */\n#define APR_STATUS_IS_ENODIR(s)         ((s) == APR_ENODIR)\n/** APR was not given a lock structure */\n#define APR_STATUS_IS_ENOLOCK(s)        ((s) == APR_ENOLOCK)\n/** APR was not given a poll structure */\n#define APR_STATUS_IS_ENOPOLL(s)        ((s) == APR_ENOPOLL)\n/** APR was not given a socket */\n#define APR_STATUS_IS_ENOSOCKET(s)      ((s) == APR_ENOSOCKET)\n/** APR was not given a thread structure */\n#define APR_STATUS_IS_ENOTHREAD(s)      ((s) == APR_ENOTHREAD)\n/** APR was not given a thread key structure */\n#define APR_STATUS_IS_ENOTHDKEY(s)      ((s) == APR_ENOTHDKEY)\n/** Generic Error which can not be put into another spot */\n#define APR_STATUS_IS_EGENERAL(s)       ((s) == APR_EGENERAL)\n/** There is no more shared memory available */\n#define APR_STATUS_IS_ENOSHMAVAIL(s)    ((s) == APR_ENOSHMAVAIL)\n/** The specified IP address is invalid */\n#define APR_STATUS_IS_EBADIP(s)         ((s) == APR_EBADIP)\n/** The specified netmask is invalid */\n#define APR_STATUS_IS_EBADMASK(s)       ((s) == APR_EBADMASK)\n/* empty slot: +18 */\n/**\n * APR was unable to open the dso object.\n * For more information call apr_dso_error().\n */\n#if defined(WIN32)\n#define APR_STATUS_IS_EDSOOPEN(s)       ((s) == APR_EDSOOPEN \\\n                       || APR_TO_OS_ERROR(s) == ERROR_MOD_NOT_FOUND)\n#else\n#define APR_STATUS_IS_EDSOOPEN(s)       ((s) == APR_EDSOOPEN)\n#endif\n/** The given path was absolute. */\n#define APR_STATUS_IS_EABSOLUTE(s)      ((s) == APR_EABSOLUTE)\n/** The given path was relative. */\n#define APR_STATUS_IS_ERELATIVE(s)      ((s) == APR_ERELATIVE)\n/** The given path was neither relative nor absolute. */\n#define APR_STATUS_IS_EINCOMPLETE(s)    ((s) == APR_EINCOMPLETE)\n/** The given path was above the root path. */\n#define APR_STATUS_IS_EABOVEROOT(s)     ((s) == APR_EABOVEROOT)\n/** The given path was bad. */\n#define APR_STATUS_IS_EBADPATH(s)       ((s) == APR_EBADPATH)\n/** The given path contained wildcards. */\n#define APR_STATUS_IS_EPATHWILD(s)      ((s) == APR_EPATHWILD)\n/** Could not find the requested symbol.\n * For more information call apr_dso_error().\n */\n#if defined(WIN32)\n#define APR_STATUS_IS_ESYMNOTFOUND(s)   ((s) == APR_ESYMNOTFOUND \\\n                       || APR_TO_OS_ERROR(s) == ERROR_PROC_NOT_FOUND)\n#else\n#define APR_STATUS_IS_ESYMNOTFOUND(s)   ((s) == APR_ESYMNOTFOUND)\n#endif\n/** The given process was not recognized by APR. */\n#define APR_STATUS_IS_EPROC_UNKNOWN(s)  ((s) == APR_EPROC_UNKNOWN)\n/** APR could not gather enough entropy to continue. */\n#define APR_STATUS_IS_ENOTENOUGHENTROPY(s) ((s) == APR_ENOTENOUGHENTROPY)\n\n/** @} */\n\n/**\n * @addtogroup APR_Error\n * @{\n */\n/** @see APR_STATUS_IS_INCHILD */\n#define APR_INCHILD        (APR_OS_START_STATUS + 1)\n/** @see APR_STATUS_IS_INPARENT */\n#define APR_INPARENT       (APR_OS_START_STATUS + 2)\n/** @see APR_STATUS_IS_DETACH */\n#define APR_DETACH         (APR_OS_START_STATUS + 3)\n/** @see APR_STATUS_IS_NOTDETACH */\n#define APR_NOTDETACH      (APR_OS_START_STATUS + 4)\n/** @see APR_STATUS_IS_CHILD_DONE */\n#define APR_CHILD_DONE     (APR_OS_START_STATUS + 5)\n/** @see APR_STATUS_IS_CHILD_NOTDONE */\n#define APR_CHILD_NOTDONE  (APR_OS_START_STATUS + 6)\n/** @see APR_STATUS_IS_TIMEUP */\n#define APR_TIMEUP         (APR_OS_START_STATUS + 7)\n/** @see APR_STATUS_IS_INCOMPLETE */\n#define APR_INCOMPLETE     (APR_OS_START_STATUS + 8)\n/* empty slot: +9 */\n/* empty slot: +10 */\n/* empty slot: +11 */\n/** @see APR_STATUS_IS_BADCH */\n#define APR_BADCH          (APR_OS_START_STATUS + 12)\n/** @see APR_STATUS_IS_BADARG */\n#define APR_BADARG         (APR_OS_START_STATUS + 13)\n/** @see APR_STATUS_IS_EOF */\n#define APR_EOF            (APR_OS_START_STATUS + 14)\n/** @see APR_STATUS_IS_NOTFOUND */\n#define APR_NOTFOUND       (APR_OS_START_STATUS + 15)\n/* empty slot: +16 */\n/* empty slot: +17 */\n/* empty slot: +18 */\n/** @see APR_STATUS_IS_ANONYMOUS */\n#define APR_ANONYMOUS      (APR_OS_START_STATUS + 19)\n/** @see APR_STATUS_IS_FILEBASED */\n#define APR_FILEBASED      (APR_OS_START_STATUS + 20)\n/** @see APR_STATUS_IS_KEYBASED */\n#define APR_KEYBASED       (APR_OS_START_STATUS + 21)\n/** @see APR_STATUS_IS_EINIT */\n#define APR_EINIT          (APR_OS_START_STATUS + 22)\n/** @see APR_STATUS_IS_ENOTIMPL */\n#define APR_ENOTIMPL       (APR_OS_START_STATUS + 23)\n/** @see APR_STATUS_IS_EMISMATCH */\n#define APR_EMISMATCH      (APR_OS_START_STATUS + 24)\n/** @see APR_STATUS_IS_EBUSY */\n#define APR_EBUSY          (APR_OS_START_STATUS + 25)\n/** @} */\n\n/**\n * @addtogroup APR_STATUS_IS\n * @{\n */\n/**\n * Program is currently executing in the child\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code */\n#define APR_STATUS_IS_INCHILD(s)        ((s) == APR_INCHILD)\n/**\n * Program is currently executing in the parent\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_INPARENT(s)       ((s) == APR_INPARENT)\n/**\n * The thread is detached\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_DETACH(s)         ((s) == APR_DETACH)\n/**\n * The thread is not detached\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_NOTDETACH(s)      ((s) == APR_NOTDETACH)\n/**\n * The child has finished executing\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_CHILD_DONE(s)     ((s) == APR_CHILD_DONE)\n/**\n * The child has not finished executing\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_CHILD_NOTDONE(s)  ((s) == APR_CHILD_NOTDONE)\n/**\n * The operation did not finish before the timeout\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_TIMEUP(s)         ((s) == APR_TIMEUP)\n/**\n * The operation was incomplete although some processing was performed\n * and the results are partially valid.\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_INCOMPLETE(s)     ((s) == APR_INCOMPLETE)\n/* empty slot: +9 */\n/* empty slot: +10 */\n/* empty slot: +11 */\n/**\n * Getopt found an option not in the option string\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_BADCH(s)          ((s) == APR_BADCH)\n/**\n * Getopt found an option not in the option string and an argument was\n * specified in the option string\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_BADARG(s)         ((s) == APR_BADARG)\n/**\n * APR has encountered the end of the file\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_EOF(s)            ((s) == APR_EOF)\n/**\n * APR was unable to find the socket in the poll structure\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_NOTFOUND(s)       ((s) == APR_NOTFOUND)\n/* empty slot: +16 */\n/* empty slot: +17 */\n/* empty slot: +18 */\n/**\n * APR is using anonymous shared memory\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_ANONYMOUS(s)      ((s) == APR_ANONYMOUS)\n/**\n * APR is using a file name as the key to the shared memory\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_FILEBASED(s)      ((s) == APR_FILEBASED)\n/**\n * APR is using a shared key as the key to the shared memory\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_KEYBASED(s)       ((s) == APR_KEYBASED)\n/**\n * Ininitalizer value.  If no option has been found, but\n * the status variable requires a value, this should be used\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_EINIT(s)          ((s) == APR_EINIT)\n/**\n * The APR function has not been implemented on this\n * platform, either because nobody has gotten to it yet,\n * or the function is impossible on this platform.\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_ENOTIMPL(s)       ((s) == APR_ENOTIMPL)\n/**\n * Two passwords do not match.\n * @warning\n * always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_EMISMATCH(s)      ((s) == APR_EMISMATCH)\n/**\n * The given lock was busy\n * @warning always use this test, as platform-specific variances may meet this\n * more than one error code\n */\n#define APR_STATUS_IS_EBUSY(s)          ((s) == APR_EBUSY)\n\n/** @} */\n\n/**\n * @addtogroup APR_Error APR Error Values\n * @{\n */\n/* APR CANONICAL ERROR VALUES */\n/** @see APR_STATUS_IS_EACCES */\n#ifdef EACCES\n#define APR_EACCES EACCES\n#else\n#define APR_EACCES         (APR_OS_START_CANONERR + 1)\n#endif\n\n/** @see APR_STATUS_IS_EEXIST */\n#ifdef EEXIST\n#define APR_EEXIST EEXIST\n#else\n#define APR_EEXIST         (APR_OS_START_CANONERR + 2)\n#endif\n\n/** @see APR_STATUS_IS_ENAMETOOLONG */\n#ifdef ENAMETOOLONG\n#define APR_ENAMETOOLONG ENAMETOOLONG\n#else\n#define APR_ENAMETOOLONG   (APR_OS_START_CANONERR + 3)\n#endif\n\n/** @see APR_STATUS_IS_ENOENT */\n#ifdef ENOENT\n#define APR_ENOENT ENOENT\n#else\n#define APR_ENOENT         (APR_OS_START_CANONERR + 4)\n#endif\n\n/** @see APR_STATUS_IS_ENOTDIR */\n#ifdef ENOTDIR\n#define APR_ENOTDIR ENOTDIR\n#else\n#define APR_ENOTDIR        (APR_OS_START_CANONERR + 5)\n#endif\n\n/** @see APR_STATUS_IS_ENOSPC */\n#ifdef ENOSPC\n#define APR_ENOSPC ENOSPC\n#else\n#define APR_ENOSPC         (APR_OS_START_CANONERR + 6)\n#endif\n\n/** @see APR_STATUS_IS_ENOMEM */\n#ifdef ENOMEM\n#define APR_ENOMEM ENOMEM\n#else\n#define APR_ENOMEM         (APR_OS_START_CANONERR + 7)\n#endif\n\n/** @see APR_STATUS_IS_EMFILE */\n#ifdef EMFILE\n#define APR_EMFILE EMFILE\n#else\n#define APR_EMFILE         (APR_OS_START_CANONERR + 8)\n#endif\n\n/** @see APR_STATUS_IS_ENFILE */\n#ifdef ENFILE\n#define APR_ENFILE ENFILE\n#else\n#define APR_ENFILE         (APR_OS_START_CANONERR + 9)\n#endif\n\n/** @see APR_STATUS_IS_EBADF */\n#ifdef EBADF\n#define APR_EBADF EBADF\n#else\n#define APR_EBADF          (APR_OS_START_CANONERR + 10)\n#endif\n\n/** @see APR_STATUS_IS_EINVAL */\n#ifdef EINVAL\n#define APR_EINVAL EINVAL\n#else\n#define APR_EINVAL         (APR_OS_START_CANONERR + 11)\n#endif\n\n/** @see APR_STATUS_IS_ESPIPE */\n#ifdef ESPIPE\n#define APR_ESPIPE ESPIPE\n#else\n#define APR_ESPIPE         (APR_OS_START_CANONERR + 12)\n#endif\n\n/**\n * @see APR_STATUS_IS_EAGAIN\n * @warning use APR_STATUS_IS_EAGAIN instead of just testing this value\n */\n#ifdef EAGAIN\n#define APR_EAGAIN EAGAIN\n#elif defined(EWOULDBLOCK)\n#define APR_EAGAIN EWOULDBLOCK\n#else\n#define APR_EAGAIN         (APR_OS_START_CANONERR + 13)\n#endif\n\n/** @see APR_STATUS_IS_EINTR */\n#ifdef EINTR\n#define APR_EINTR EINTR\n#else\n#define APR_EINTR          (APR_OS_START_CANONERR + 14)\n#endif\n\n/** @see APR_STATUS_IS_ENOTSOCK */\n#ifdef ENOTSOCK\n#define APR_ENOTSOCK ENOTSOCK\n#else\n#define APR_ENOTSOCK       (APR_OS_START_CANONERR + 15)\n#endif\n\n/** @see APR_STATUS_IS_ECONNREFUSED */\n#ifdef ECONNREFUSED\n#define APR_ECONNREFUSED ECONNREFUSED\n#else\n#define APR_ECONNREFUSED   (APR_OS_START_CANONERR + 16)\n#endif\n\n/** @see APR_STATUS_IS_EINPROGRESS */\n#ifdef EINPROGRESS\n#define APR_EINPROGRESS EINPROGRESS\n#else\n#define APR_EINPROGRESS    (APR_OS_START_CANONERR + 17)\n#endif\n\n/**\n * @see APR_STATUS_IS_ECONNABORTED\n * @warning use APR_STATUS_IS_ECONNABORTED instead of just testing this value\n */\n\n#ifdef ECONNABORTED\n#define APR_ECONNABORTED ECONNABORTED\n#else\n#define APR_ECONNABORTED   (APR_OS_START_CANONERR + 18)\n#endif\n\n/** @see APR_STATUS_IS_ECONNRESET */\n#ifdef ECONNRESET\n#define APR_ECONNRESET ECONNRESET\n#else\n#define APR_ECONNRESET     (APR_OS_START_CANONERR + 19)\n#endif\n\n/** @see APR_STATUS_IS_ETIMEDOUT\n *  @deprecated */\n#ifdef ETIMEDOUT\n#define APR_ETIMEDOUT ETIMEDOUT\n#else\n#define APR_ETIMEDOUT      (APR_OS_START_CANONERR + 20)\n#endif\n\n/** @see APR_STATUS_IS_EHOSTUNREACH */\n#ifdef EHOSTUNREACH\n#define APR_EHOSTUNREACH EHOSTUNREACH\n#else\n#define APR_EHOSTUNREACH   (APR_OS_START_CANONERR + 21)\n#endif\n\n/** @see APR_STATUS_IS_ENETUNREACH */\n#ifdef ENETUNREACH\n#define APR_ENETUNREACH ENETUNREACH\n#else\n#define APR_ENETUNREACH    (APR_OS_START_CANONERR + 22)\n#endif\n\n/** @see APR_STATUS_IS_EFTYPE */\n#ifdef EFTYPE\n#define APR_EFTYPE EFTYPE\n#else\n#define APR_EFTYPE        (APR_OS_START_CANONERR + 23)\n#endif\n\n/** @see APR_STATUS_IS_EPIPE */\n#ifdef EPIPE\n#define APR_EPIPE EPIPE\n#else\n#define APR_EPIPE         (APR_OS_START_CANONERR + 24)\n#endif\n\n/** @see APR_STATUS_IS_EXDEV */\n#ifdef EXDEV\n#define APR_EXDEV EXDEV\n#else\n#define APR_EXDEV         (APR_OS_START_CANONERR + 25)\n#endif\n\n/** @see APR_STATUS_IS_ENOTEMPTY */\n#ifdef ENOTEMPTY\n#define APR_ENOTEMPTY ENOTEMPTY\n#else\n#define APR_ENOTEMPTY     (APR_OS_START_CANONERR + 26)\n#endif\n\n/** @see APR_STATUS_IS_EAFNOSUPPORT */\n#ifdef EAFNOSUPPORT\n#define APR_EAFNOSUPPORT EAFNOSUPPORT\n#else\n#define APR_EAFNOSUPPORT  (APR_OS_START_CANONERR + 27)\n#endif\n\n/** @} */\n\n#if defined(OS2) && !defined(DOXYGEN)\n\n#define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)\n#define APR_TO_OS_ERROR(e)   (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR)\n\n#define INCL_DOSERRORS\n#define INCL_DOS\n\n/* Leave these undefined.\n * OS2 doesn't rely on the errno concept.\n * The API calls always return a result codes which\n * should be filtered through APR_FROM_OS_ERROR().\n *\n * #define apr_get_os_error()   (APR_FROM_OS_ERROR(GetLastError()))\n * #define apr_set_os_error(e)  (SetLastError(APR_TO_OS_ERROR(e)))\n */\n\n/* A special case, only socket calls require this;\n */\n#define apr_get_netos_error()   (APR_FROM_OS_ERROR(errno))\n#define apr_set_netos_error(e)  (errno = APR_TO_OS_ERROR(e))\n\n/* And this needs to be greped away for good:\n */\n#define APR_OS2_STATUS(e) (APR_FROM_OS_ERROR(e))\n\n/* These can't sit in a private header, so in spite of the extra size,\n * they need to be made available here.\n */\n#define SOCBASEERR              10000\n#define SOCEPERM                (SOCBASEERR+1)             /* Not owner */\n#define SOCESRCH                (SOCBASEERR+3)             /* No such process */\n#define SOCEINTR                (SOCBASEERR+4)             /* Interrupted system call */\n#define SOCENXIO                (SOCBASEERR+6)             /* No such device or address */\n#define SOCEBADF                (SOCBASEERR+9)             /* Bad file number */\n#define SOCEACCES               (SOCBASEERR+13)            /* Permission denied */\n#define SOCEFAULT               (SOCBASEERR+14)            /* Bad address */\n#define SOCEINVAL               (SOCBASEERR+22)            /* Invalid argument */\n#define SOCEMFILE               (SOCBASEERR+24)            /* Too many open files */\n#define SOCEPIPE                (SOCBASEERR+32)            /* Broken pipe */\n#define SOCEOS2ERR              (SOCBASEERR+100)           /* OS/2 Error */\n#define SOCEWOULDBLOCK          (SOCBASEERR+35)            /* Operation would block */\n#define SOCEINPROGRESS          (SOCBASEERR+36)            /* Operation now in progress */\n#define SOCEALREADY             (SOCBASEERR+37)            /* Operation already in progress */\n#define SOCENOTSOCK             (SOCBASEERR+38)            /* Socket operation on non-socket */\n#define SOCEDESTADDRREQ         (SOCBASEERR+39)            /* Destination address required */\n#define SOCEMSGSIZE             (SOCBASEERR+40)            /* Message too long */\n#define SOCEPROTOTYPE           (SOCBASEERR+41)            /* Protocol wrong type for socket */\n#define SOCENOPROTOOPT          (SOCBASEERR+42)            /* Protocol not available */\n#define SOCEPROTONOSUPPORT      (SOCBASEERR+43)            /* Protocol not supported */\n#define SOCESOCKTNOSUPPORT      (SOCBASEERR+44)            /* Socket type not supported */\n#define SOCEOPNOTSUPP           (SOCBASEERR+45)            /* Operation not supported on socket */\n#define SOCEPFNOSUPPORT         (SOCBASEERR+46)            /* Protocol family not supported */\n#define SOCEAFNOSUPPORT         (SOCBASEERR+47)            /* Address family not supported by protocol family */\n#define SOCEADDRINUSE           (SOCBASEERR+48)            /* Address already in use */\n#define SOCEADDRNOTAVAIL        (SOCBASEERR+49)            /* Can't assign requested address */\n#define SOCENETDOWN             (SOCBASEERR+50)            /* Network is down */\n#define SOCENETUNREACH          (SOCBASEERR+51)            /* Network is unreachable */\n#define SOCENETRESET            (SOCBASEERR+52)            /* Network dropped connection on reset */\n#define SOCECONNABORTED         (SOCBASEERR+53)            /* Software caused connection abort */\n#define SOCECONNRESET           (SOCBASEERR+54)            /* Connection reset by peer */\n#define SOCENOBUFS              (SOCBASEERR+55)            /* No buffer space available */\n#define SOCEISCONN              (SOCBASEERR+56)            /* Socket is already connected */\n#define SOCENOTCONN             (SOCBASEERR+57)            /* Socket is not connected */\n#define SOCESHUTDOWN            (SOCBASEERR+58)            /* Can't send after socket shutdown */\n#define SOCETOOMANYREFS         (SOCBASEERR+59)            /* Too many references: can't splice */\n#define SOCETIMEDOUT            (SOCBASEERR+60)            /* Connection timed out */\n#define SOCECONNREFUSED         (SOCBASEERR+61)            /* Connection refused */\n#define SOCELOOP                (SOCBASEERR+62)            /* Too many levels of symbolic links */\n#define SOCENAMETOOLONG         (SOCBASEERR+63)            /* File name too long */\n#define SOCEHOSTDOWN            (SOCBASEERR+64)            /* Host is down */\n#define SOCEHOSTUNREACH         (SOCBASEERR+65)            /* No route to host */\n#define SOCENOTEMPTY            (SOCBASEERR+66)            /* Directory not empty */\n\n/* APR CANONICAL ERROR TESTS */\n#define APR_STATUS_IS_EACCES(s)         ((s) == APR_EACCES \\\n                || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED \\\n                || (s) == APR_OS_START_SYSERR + ERROR_SHARING_VIOLATION)\n#define APR_STATUS_IS_EEXIST(s)         ((s) == APR_EEXIST \\\n                || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED \\\n                || (s) == APR_OS_START_SYSERR + ERROR_FILE_EXISTS \\\n                || (s) == APR_OS_START_SYSERR + ERROR_ALREADY_EXISTS \\\n                || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED)\n#define APR_STATUS_IS_ENAMETOOLONG(s)   ((s) == APR_ENAMETOOLONG \\\n                || (s) == APR_OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \\\n                || (s) == APR_OS_START_SYSERR + SOCENAMETOOLONG)\n#define APR_STATUS_IS_ENOENT(s)         ((s) == APR_ENOENT \\\n                || (s) == APR_OS_START_SYSERR + ERROR_FILE_NOT_FOUND \\\n                || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NO_MORE_FILES \\\n                || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED)\n#define APR_STATUS_IS_ENOTDIR(s)        ((s) == APR_ENOTDIR)\n#define APR_STATUS_IS_ENOSPC(s)         ((s) == APR_ENOSPC \\\n                || (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL)\n#define APR_STATUS_IS_ENOMEM(s)         ((s) == APR_ENOMEM)\n#define APR_STATUS_IS_EMFILE(s)         ((s) == APR_EMFILE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES)\n#define APR_STATUS_IS_ENFILE(s)         ((s) == APR_ENFILE)\n#define APR_STATUS_IS_EBADF(s)          ((s) == APR_EBADF \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE)\n#define APR_STATUS_IS_EINVAL(s)         ((s) == APR_EINVAL \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_PARAMETER \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_FUNCTION)\n#define APR_STATUS_IS_ESPIPE(s)         ((s) == APR_ESPIPE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK)\n#define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \\\n                || (s) == APR_OS_START_SYSERR + SOCEWOULDBLOCK \\\n                || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION)\n#define APR_STATUS_IS_EINTR(s)          ((s) == APR_EINTR \\\n                || (s) == APR_OS_START_SYSERR + SOCEINTR)\n#define APR_STATUS_IS_ENOTSOCK(s)       ((s) == APR_ENOTSOCK \\\n                || (s) == APR_OS_START_SYSERR + SOCENOTSOCK)\n#define APR_STATUS_IS_ECONNREFUSED(s)   ((s) == APR_ECONNREFUSED \\\n                || (s) == APR_OS_START_SYSERR + SOCECONNREFUSED)\n#define APR_STATUS_IS_EINPROGRESS(s)    ((s) == APR_EINPROGRESS \\\n                || (s) == APR_OS_START_SYSERR + SOCEINPROGRESS)\n#define APR_STATUS_IS_ECONNABORTED(s)   ((s) == APR_ECONNABORTED \\\n                || (s) == APR_OS_START_SYSERR + SOCECONNABORTED)\n#define APR_STATUS_IS_ECONNRESET(s)     ((s) == APR_ECONNRESET \\\n                || (s) == APR_OS_START_SYSERR + SOCECONNRESET)\n/* XXX deprecated */\n#define APR_STATUS_IS_ETIMEDOUT(s)         ((s) == APR_ETIMEDOUT \\\n                || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT)\n#undef APR_STATUS_IS_TIMEUP\n#define APR_STATUS_IS_TIMEUP(s)         ((s) == APR_TIMEUP \\\n                || (s) == APR_OS_START_SYSERR + SOCETIMEDOUT)\n#define APR_STATUS_IS_EHOSTUNREACH(s)   ((s) == APR_EHOSTUNREACH \\\n                || (s) == APR_OS_START_SYSERR + SOCEHOSTUNREACH)\n#define APR_STATUS_IS_ENETUNREACH(s)    ((s) == APR_ENETUNREACH \\\n                || (s) == APR_OS_START_SYSERR + SOCENETUNREACH)\n#define APR_STATUS_IS_EFTYPE(s)         ((s) == APR_EFTYPE)\n#define APR_STATUS_IS_EPIPE(s)          ((s) == APR_EPIPE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_BROKEN_PIPE \\\n                || (s) == APR_OS_START_SYSERR + SOCEPIPE)\n#define APR_STATUS_IS_EXDEV(s)          ((s) == APR_EXDEV \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NOT_SAME_DEVICE)\n#define APR_STATUS_IS_ENOTEMPTY(s)      ((s) == APR_ENOTEMPTY \\\n                || (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY \\\n                || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED)\n#define APR_STATUS_IS_EAFNOSUPPORT(s)   ((s) == APR_AFNOSUPPORT \\\n                || (s) == APR_OS_START_SYSERR + SOCEAFNOSUPPORT)\n\n/*\n    Sorry, too tired to wrap this up for OS2... feel free to\n    fit the following into their best matches.\n\n    { ERROR_NO_SIGNAL_SENT,     ESRCH           },\n    { SOCEALREADY,              EALREADY        },\n    { SOCEDESTADDRREQ,          EDESTADDRREQ    },\n    { SOCEMSGSIZE,              EMSGSIZE        },\n    { SOCEPROTOTYPE,            EPROTOTYPE      },\n    { SOCENOPROTOOPT,           ENOPROTOOPT     },\n    { SOCEPROTONOSUPPORT,       EPROTONOSUPPORT },\n    { SOCESOCKTNOSUPPORT,       ESOCKTNOSUPPORT },\n    { SOCEOPNOTSUPP,            EOPNOTSUPP      },\n    { SOCEPFNOSUPPORT,          EPFNOSUPPORT    },\n    { SOCEADDRINUSE,            EADDRINUSE      },\n    { SOCEADDRNOTAVAIL,         EADDRNOTAVAIL   },\n    { SOCENETDOWN,              ENETDOWN        },\n    { SOCENETRESET,             ENETRESET       },\n    { SOCENOBUFS,               ENOBUFS         },\n    { SOCEISCONN,               EISCONN         },\n    { SOCENOTCONN,              ENOTCONN        },\n    { SOCESHUTDOWN,             ESHUTDOWN       },\n    { SOCETOOMANYREFS,          ETOOMANYREFS    },\n    { SOCELOOP,                 ELOOP           },\n    { SOCEHOSTDOWN,             EHOSTDOWN       },\n    { SOCENOTEMPTY,             ENOTEMPTY       },\n    { SOCEPIPE,                 EPIPE           }\n*/\n\n#elif defined(WIN32) && !defined(DOXYGEN) /* !defined(OS2) */\n\n#define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)\n#define APR_TO_OS_ERROR(e)   (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR)\n\n#define apr_get_os_error()   (APR_FROM_OS_ERROR(GetLastError()))\n#define apr_set_os_error(e)  (SetLastError(APR_TO_OS_ERROR(e)))\n\n/* A special case, only socket calls require this:\n */\n#define apr_get_netos_error()   (APR_FROM_OS_ERROR(WSAGetLastError()))\n#define apr_set_netos_error(e)   (WSASetLastError(APR_TO_OS_ERROR(e)))\n\n/* APR CANONICAL ERROR TESTS */\n#define APR_STATUS_IS_EACCES(s)         ((s) == APR_EACCES \\\n                || (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED \\\n                || (s) == APR_OS_START_SYSERR + ERROR_CANNOT_MAKE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_CURRENT_DIRECTORY \\\n                || (s) == APR_OS_START_SYSERR + ERROR_DRIVE_LOCKED \\\n                || (s) == APR_OS_START_SYSERR + ERROR_FAIL_I24 \\\n                || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION \\\n                || (s) == APR_OS_START_SYSERR + ERROR_LOCK_FAILED \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NOT_LOCKED \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NETWORK_ACCESS_DENIED \\\n                || (s) == APR_OS_START_SYSERR + ERROR_SHARING_VIOLATION)\n#define APR_STATUS_IS_EEXIST(s)         ((s) == APR_EEXIST \\\n                || (s) == APR_OS_START_SYSERR + ERROR_FILE_EXISTS \\\n                || (s) == APR_OS_START_SYSERR + ERROR_ALREADY_EXISTS)\n#define APR_STATUS_IS_ENAMETOOLONG(s)   ((s) == APR_ENAMETOOLONG \\\n                || (s) == APR_OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \\\n                || (s) == APR_OS_START_SYSERR + WSAENAMETOOLONG)\n#define APR_STATUS_IS_ENOENT(s)         ((s) == APR_ENOENT \\\n                || (s) == APR_OS_START_SYSERR + ERROR_FILE_NOT_FOUND \\\n                || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \\\n                || (s) == APR_OS_START_SYSERR + ERROR_OPEN_FAILED \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NO_MORE_FILES)\n#define APR_STATUS_IS_ENOTDIR(s)        ((s) == APR_ENOTDIR \\\n                || (s) == APR_OS_START_SYSERR + ERROR_PATH_NOT_FOUND \\\n                || (s) == APR_OS_START_SYSERR + ERROR_BAD_NETPATH \\\n                || (s) == APR_OS_START_SYSERR + ERROR_BAD_NET_NAME \\\n                || (s) == APR_OS_START_SYSERR + ERROR_BAD_PATHNAME \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DRIVE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_DIRECTORY)\n#define APR_STATUS_IS_ENOSPC(s)         ((s) == APR_ENOSPC \\\n                || (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL)\n#define APR_STATUS_IS_ENOMEM(s)         ((s) == APR_ENOMEM \\\n                || (s) == APR_OS_START_SYSERR + ERROR_ARENA_TRASHED \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NOT_ENOUGH_MEMORY \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_BLOCK \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NOT_ENOUGH_QUOTA \\\n                || (s) == APR_OS_START_SYSERR + ERROR_OUTOFMEMORY)\n#define APR_STATUS_IS_EMFILE(s)         ((s) == APR_EMFILE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES)\n#define APR_STATUS_IS_ENFILE(s)         ((s) == APR_ENFILE)\n#define APR_STATUS_IS_EBADF(s)          ((s) == APR_EBADF \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_TARGET_HANDLE)\n#define APR_STATUS_IS_EINVAL(s)         ((s) == APR_EINVAL \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_ACCESS \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DATA \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_FUNCTION \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_PARAMETER \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK)\n#define APR_STATUS_IS_ESPIPE(s)         ((s) == APR_ESPIPE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_SEEK_ON_DEVICE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK)\n#define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NO_PROC_SLOTS \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NESTING_NOT_ALLOWED \\\n                || (s) == APR_OS_START_SYSERR + ERROR_MAX_THRDS_REACHED \\\n                || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION \\\n                || (s) == APR_OS_START_SYSERR + WSAEWOULDBLOCK)\n#define APR_STATUS_IS_EINTR(s)          ((s) == APR_EINTR \\\n                || (s) == APR_OS_START_SYSERR + WSAEINTR)\n#define APR_STATUS_IS_ENOTSOCK(s)       ((s) == APR_ENOTSOCK \\\n                || (s) == APR_OS_START_SYSERR + WSAENOTSOCK)\n#define APR_STATUS_IS_ECONNREFUSED(s)   ((s) == APR_ECONNREFUSED \\\n                || (s) == APR_OS_START_SYSERR + WSAECONNREFUSED)\n#define APR_STATUS_IS_EINPROGRESS(s)    ((s) == APR_EINPROGRESS \\\n                || (s) == APR_OS_START_SYSERR + WSAEINPROGRESS)\n#define APR_STATUS_IS_ECONNABORTED(s)   ((s) == APR_ECONNABORTED \\\n                || (s) == APR_OS_START_SYSERR + WSAECONNABORTED)\n#define APR_STATUS_IS_ECONNRESET(s)     ((s) == APR_ECONNRESET \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NETNAME_DELETED \\\n                || (s) == APR_OS_START_SYSERR + WSAECONNRESET)\n/* XXX deprecated */\n#define APR_STATUS_IS_ETIMEDOUT(s)         ((s) == APR_ETIMEDOUT \\\n                || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \\\n                || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT)\n#undef APR_STATUS_IS_TIMEUP\n#define APR_STATUS_IS_TIMEUP(s)         ((s) == APR_TIMEUP \\\n                || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \\\n                || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT)\n#define APR_STATUS_IS_EHOSTUNREACH(s)   ((s) == APR_EHOSTUNREACH \\\n                || (s) == APR_OS_START_SYSERR + WSAEHOSTUNREACH)\n#define APR_STATUS_IS_ENETUNREACH(s)    ((s) == APR_ENETUNREACH \\\n                || (s) == APR_OS_START_SYSERR + WSAENETUNREACH)\n#define APR_STATUS_IS_EFTYPE(s)         ((s) == APR_EFTYPE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_EXE_MACHINE_TYPE_MISMATCH \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DLL \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_MODULETYPE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_BAD_EXE_FORMAT \\\n                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_EXE_SIGNATURE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_FILE_CORRUPT \\\n                || (s) == APR_OS_START_SYSERR + ERROR_BAD_FORMAT)\n#define APR_STATUS_IS_EPIPE(s)          ((s) == APR_EPIPE \\\n                || (s) == APR_OS_START_SYSERR + ERROR_BROKEN_PIPE)\n#define APR_STATUS_IS_EXDEV(s)          ((s) == APR_EXDEV \\\n                || (s) == APR_OS_START_SYSERR + ERROR_NOT_SAME_DEVICE)\n#define APR_STATUS_IS_ENOTEMPTY(s)      ((s) == APR_ENOTEMPTY \\\n                || (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY)\n#define APR_STATUS_IS_EAFNOSUPPORT(s)   ((s) == APR_EAFNOSUPPORT \\\n                || (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT)\n\n#elif defined(NETWARE) && defined(USE_WINSOCK) && !defined(DOXYGEN) /* !defined(OS2) && !defined(WIN32) */\n\n#define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)\n#define APR_TO_OS_ERROR(e)   (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR)\n\n#define apr_get_os_error()    (errno)\n#define apr_set_os_error(e)   (errno = (e))\n\n/* A special case, only socket calls require this: */\n#define apr_get_netos_error()   (APR_FROM_OS_ERROR(WSAGetLastError()))\n#define apr_set_netos_error(e)  (WSASetLastError(APR_TO_OS_ERROR(e)))\n\n/* APR CANONICAL ERROR TESTS */\n#define APR_STATUS_IS_EACCES(s)         ((s) == APR_EACCES)\n#define APR_STATUS_IS_EEXIST(s)         ((s) == APR_EEXIST)\n#define APR_STATUS_IS_ENAMETOOLONG(s)   ((s) == APR_ENAMETOOLONG)\n#define APR_STATUS_IS_ENOENT(s)         ((s) == APR_ENOENT)\n#define APR_STATUS_IS_ENOTDIR(s)        ((s) == APR_ENOTDIR)\n#define APR_STATUS_IS_ENOSPC(s)         ((s) == APR_ENOSPC)\n#define APR_STATUS_IS_ENOMEM(s)         ((s) == APR_ENOMEM)\n#define APR_STATUS_IS_EMFILE(s)         ((s) == APR_EMFILE)\n#define APR_STATUS_IS_ENFILE(s)         ((s) == APR_ENFILE)\n#define APR_STATUS_IS_EBADF(s)          ((s) == APR_EBADF)\n#define APR_STATUS_IS_EINVAL(s)         ((s) == APR_EINVAL)\n#define APR_STATUS_IS_ESPIPE(s)         ((s) == APR_ESPIPE)\n\n#define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN \\\n                || (s) ==                       EWOULDBLOCK \\\n                || (s) == APR_OS_START_SYSERR + WSAEWOULDBLOCK)\n#define APR_STATUS_IS_EINTR(s)          ((s) == APR_EINTR \\\n                || (s) == APR_OS_START_SYSERR + WSAEINTR)\n#define APR_STATUS_IS_ENOTSOCK(s)       ((s) == APR_ENOTSOCK \\\n                || (s) == APR_OS_START_SYSERR + WSAENOTSOCK)\n#define APR_STATUS_IS_ECONNREFUSED(s)   ((s) == APR_ECONNREFUSED \\\n                || (s) == APR_OS_START_SYSERR + WSAECONNREFUSED)\n#define APR_STATUS_IS_EINPROGRESS(s)    ((s) == APR_EINPROGRESS \\\n                || (s) == APR_OS_START_SYSERR + WSAEINPROGRESS)\n#define APR_STATUS_IS_ECONNABORTED(s)   ((s) == APR_ECONNABORTED \\\n                || (s) == APR_OS_START_SYSERR + WSAECONNABORTED)\n#define APR_STATUS_IS_ECONNRESET(s)     ((s) == APR_ECONNRESET \\\n                || (s) == APR_OS_START_SYSERR + WSAECONNRESET)\n/* XXX deprecated */\n#define APR_STATUS_IS_ETIMEDOUT(s)       ((s) == APR_ETIMEDOUT \\\n                || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \\\n                || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT)\n#undef APR_STATUS_IS_TIMEUP\n#define APR_STATUS_IS_TIMEUP(s)         ((s) == APR_TIMEUP \\\n                || (s) == APR_OS_START_SYSERR + WSAETIMEDOUT \\\n                || (s) == APR_OS_START_SYSERR + WAIT_TIMEOUT)\n#define APR_STATUS_IS_EHOSTUNREACH(s)   ((s) == APR_EHOSTUNREACH \\\n                || (s) == APR_OS_START_SYSERR + WSAEHOSTUNREACH)\n#define APR_STATUS_IS_ENETUNREACH(s)    ((s) == APR_ENETUNREACH \\\n                || (s) == APR_OS_START_SYSERR + WSAENETUNREACH)\n#define APR_STATUS_IS_ENETDOWN(s)       ((s) == APR_OS_START_SYSERR + WSAENETDOWN)\n#define APR_STATUS_IS_EFTYPE(s)         ((s) == APR_EFTYPE)\n#define APR_STATUS_IS_EPIPE(s)          ((s) == APR_EPIPE)\n#define APR_STATUS_IS_EXDEV(s)          ((s) == APR_EXDEV)\n#define APR_STATUS_IS_ENOTEMPTY(s)      ((s) == APR_ENOTEMPTY)\n#define APR_STATUS_IS_EAFNOSUPPORT(s)   ((s) == APR_EAFNOSUPPORT \\\n                || (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT)\n\n#else /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */\n\n/*\n *  os error codes are clib error codes\n */\n#define APR_FROM_OS_ERROR(e)  (e)\n#define APR_TO_OS_ERROR(e)    (e)\n\n#define apr_get_os_error()    (errno)\n#define apr_set_os_error(e)   (errno = (e))\n\n/* A special case, only socket calls require this:\n */\n#define apr_get_netos_error() (errno)\n#define apr_set_netos_error(e) (errno = (e))\n\n/**\n * @addtogroup APR_STATUS_IS\n * @{\n */\n\n/** permission denied */\n#define APR_STATUS_IS_EACCES(s)         ((s) == APR_EACCES)\n/** file exists */\n#define APR_STATUS_IS_EEXIST(s)         ((s) == APR_EEXIST)\n/** path name is too long */\n#define APR_STATUS_IS_ENAMETOOLONG(s)   ((s) == APR_ENAMETOOLONG)\n/**\n * no such file or directory\n * @remark\n * EMVSCATLG can be returned by the automounter on z/OS for\n * paths which do not exist.\n */\n#ifdef EMVSCATLG\n#define APR_STATUS_IS_ENOENT(s)         ((s) == APR_ENOENT \\\n                                      || (s) == EMVSCATLG)\n#else\n#define APR_STATUS_IS_ENOENT(s)         ((s) == APR_ENOENT)\n#endif\n/** not a directory */\n#define APR_STATUS_IS_ENOTDIR(s)        ((s) == APR_ENOTDIR)\n/** no space left on device */\n#ifdef EDQUOT\n#define APR_STATUS_IS_ENOSPC(s)         ((s) == APR_ENOSPC \\\n                                      || (s) == EDQUOT)\n#else\n#define APR_STATUS_IS_ENOSPC(s)         ((s) == APR_ENOSPC)\n#endif\n/** not enough memory */\n#define APR_STATUS_IS_ENOMEM(s)         ((s) == APR_ENOMEM)\n/** too many open files */\n#define APR_STATUS_IS_EMFILE(s)         ((s) == APR_EMFILE)\n/** file table overflow */\n#define APR_STATUS_IS_ENFILE(s)         ((s) == APR_ENFILE)\n/** bad file # */\n#define APR_STATUS_IS_EBADF(s)          ((s) == APR_EBADF)\n/** invalid argument */\n#define APR_STATUS_IS_EINVAL(s)         ((s) == APR_EINVAL)\n/** illegal seek */\n#define APR_STATUS_IS_ESPIPE(s)         ((s) == APR_ESPIPE)\n\n/** operation would block */\n#if !defined(EWOULDBLOCK) || !defined(EAGAIN)\n#define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN)\n#elif (EWOULDBLOCK == EAGAIN)\n#define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN)\n#else\n#define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN \\\n                                      || (s) == EWOULDBLOCK)\n#endif\n\n/** interrupted system call */\n#define APR_STATUS_IS_EINTR(s)          ((s) == APR_EINTR)\n/** socket operation on a non-socket */\n#define APR_STATUS_IS_ENOTSOCK(s)       ((s) == APR_ENOTSOCK)\n/** Connection Refused */\n#define APR_STATUS_IS_ECONNREFUSED(s)   ((s) == APR_ECONNREFUSED)\n/** operation now in progress */\n#define APR_STATUS_IS_EINPROGRESS(s)    ((s) == APR_EINPROGRESS)\n\n/**\n * Software caused connection abort\n * @remark\n * EPROTO on certain older kernels really means ECONNABORTED, so we need to\n * ignore it for them.  See discussion in new-httpd archives nh.9701 & nh.9603\n *\n * There is potentially a bug in Solaris 2.x x<6, and other boxes that\n * implement tcp sockets in userland (i.e. on top of STREAMS).  On these\n * systems, EPROTO can actually result in a fatal loop.  See PR#981 for\n * example.  It's hard to handle both uses of EPROTO.\n */\n#ifdef EPROTO\n#define APR_STATUS_IS_ECONNABORTED(s)    ((s) == APR_ECONNABORTED \\\n                                       || (s) == EPROTO)\n#else\n#define APR_STATUS_IS_ECONNABORTED(s)    ((s) == APR_ECONNABORTED)\n#endif\n\n/** Connection Reset by peer */\n#define APR_STATUS_IS_ECONNRESET(s)      ((s) == APR_ECONNRESET)\n/** Operation timed out\n *  @deprecated */\n#define APR_STATUS_IS_ETIMEDOUT(s)      ((s) == APR_ETIMEDOUT)\n/** no route to host */\n#define APR_STATUS_IS_EHOSTUNREACH(s)    ((s) == APR_EHOSTUNREACH)\n/** network is unreachable */\n#define APR_STATUS_IS_ENETUNREACH(s)     ((s) == APR_ENETUNREACH)\n/** inappropiate file type or format */\n#define APR_STATUS_IS_EFTYPE(s)          ((s) == APR_EFTYPE)\n/** broken pipe */\n#define APR_STATUS_IS_EPIPE(s)           ((s) == APR_EPIPE)\n/** cross device link */\n#define APR_STATUS_IS_EXDEV(s)           ((s) == APR_EXDEV)\n/** Directory Not Empty */\n#define APR_STATUS_IS_ENOTEMPTY(s)       ((s) == APR_ENOTEMPTY || \\\n                                          (s) == APR_EEXIST)\n/** Address Family not supported */\n#define APR_STATUS_IS_EAFNOSUPPORT(s)    ((s) == APR_EAFNOSUPPORT)\n/** @} */\n\n#endif /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_ERRNO_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_escape.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file apr_escape.h\n * @brief APR-UTIL Escaping\n */\n#ifndef APR_ESCAPE_H\n#define APR_ESCAPE_H\n#include \"apr.h\"\n#include \"apr_general.h\"\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @defgroup APR_Util_Escaping Escape functions\n * @ingroup APR\n * @{\n */\n\n/* Simple escape/unescape functions.\n *\n */\n\n/**\n * When passing a string to one of the escape functions, this value can be\n * passed to indicate a string-valued key, and have the length computed\n * automatically.\n */\n#define APR_ESCAPE_STRING     (-1)\n\n/**\n * Perform shell escaping on the provided string.\n * \n * Shell escaping causes characters to be prefixed with a '\\' character.\n * @param escaped Optional buffer to write the encoded string, can be\n * NULL\n * @param str The original string\n * @param slen The length of the original string, or APR_ESCAPE_STRING\n * @param len If present, returns the length of the string\n * @return APR_SUCCESS, or APR_NOTFOUND if no changes to the string were\n * detected or the string was NULL\n */\nAPR_DECLARE(apr_status_t) apr_escape_shell(char *escaped, const char *str,\n        apr_ssize_t slen, apr_size_t *len);\n\n/**\n * Perform shell escaping on the provided string, returning the result\n * from the pool.\n *\n * Shell escaping causes characters to be prefixed with a '\\' character.\n *\n * If no characters were escaped, the original string is returned.\n * @param p Pool to allocate from\n * @param str The original string\n * @return the encoded string, allocated from the pool, or the original\n * string if no escaping took place or the string was NULL.\n */\nAPR_DECLARE(const char *) apr_pescape_shell(apr_pool_t *p, const char *str)\n        __attribute__((nonnull(1)));\n\n/**\n * Unescapes a URL, leaving reserved characters intact.\n * @param escaped Optional buffer to write the encoded string, can be\n * NULL\n * @param url String to be unescaped\n * @param slen The length of the original url, or APR_ESCAPE_STRING\n * @param forbid Optional list of forbidden characters, in addition to\n * 0x00\n * @param reserved Optional list of reserved characters that will be\n * left unescaped\n * @param plus If non zero, '+' is converted to ' ' as per\n * application/x-www-form-urlencoded encoding\n * @param len If set, the length of the escaped string will be returned\n * @return APR_SUCCESS on success, APR_NOTFOUND if no characters are\n * decoded or the string is NULL, APR_EINVAL if a bad escape sequence is\n * found, APR_BADCH if a character on the forbid list is found.\n */\nAPR_DECLARE(apr_status_t) apr_unescape_url(char *escaped, const char *url,\n        apr_ssize_t slen, const char *forbid, const char *reserved, int plus,\n        apr_size_t *len);\n\n/**\n * Unescapes a URL, leaving reserved characters intact, returning the\n * result from a pool.\n * @param p Pool to allocate from\n * @param url String to be unescaped in place\n * @param forbid Optional list of forbidden characters, in addition to\n * 0x00\n * @param reserved Optional list of reserved characters that will be\n * left unescaped\n * @param plus If non zero, '+' is converted to ' ' as per\n * application/x-www-form-urlencoded encoding\n * @return A string allocated from the pool on success, the original string\n * if no characters are decoded, or NULL if a bad escape sequence is found\n * or if a character on the forbid list is found, or if the original string\n * was NULL.\n */\nAPR_DECLARE(const char *) apr_punescape_url(apr_pool_t *p, const char *url,\n        const char *forbid, const char *reserved, int plus)\n        __attribute__((nonnull(1)));\n\n/**\n * Escape a path segment, as defined in RFC1808.\n * @param escaped Optional buffer to write the encoded string, can be\n * NULL\n * @param str The original string\n * @param slen The length of the original string, or APR_ESCAPE_STRING\n * @param len If present, returns the length of the string\n * @return APR_SUCCESS, or APR_NOTFOUND if no changes to the string were\n * detected or the string was NULL\n */\nAPR_DECLARE(apr_status_t) apr_escape_path_segment(char *escaped,\n        const char *str, apr_ssize_t slen, apr_size_t *len);\n\n/**\n * Escape a path segment, as defined in RFC1808, returning the result from a\n * pool.\n * @param p Pool to allocate from\n * @param str String to be escaped\n * @return A string allocated from the pool on success, the original string\n * if no characters are encoded or the string is NULL.\n */\nAPR_DECLARE(const char *) apr_pescape_path_segment(apr_pool_t *p,\n        const char *str) __attribute__((nonnull(1)));\n\n/**\n * Converts an OS path to a URL, in an OS dependent way, as defined in RFC1808.\n * In all cases if a ':' occurs before the first '/' in the URL, the URL should\n * be prefixed with \"./\" (or the ':' escaped). In the case of Unix, this means\n * leaving '/' alone, but otherwise doing what escape_path_segment() does. For\n * efficiency reasons, we don't use escape_path_segment(), which is provided for\n * reference. Again, RFC 1808 is where this stuff is defined.\n *\n * If partial is set, os_escape_path() assumes that the path will be appended to\n * something with a '/' in it (and thus does not prefix \"./\").\n * @param escaped Optional buffer to write the encoded string, can be\n * NULL\n * @param path The original string\n * @param slen The length of the original string, or APR_ESCAPE_STRING\n * @param partial If non zero, suppresses the prepending of \"./\"\n * @param len If present, returns the length of the string\n * @return APR_SUCCESS, or APR_NOTFOUND if no changes to the string were\n * detected or if the string was NULL\n */\nAPR_DECLARE(apr_status_t) apr_escape_path(char *escaped, const char *path,\n        apr_ssize_t slen, int partial, apr_size_t *len);\n\n/**\n * Converts an OS path to a URL, in an OS dependent way, as defined in RFC1808,\n * returning the result from a pool.\n *\n * In all cases if a ':' occurs before the first '/' in the URL, the URL should\n * be prefixed with \"./\" (or the ':' escaped). In the case of Unix, this means\n * leaving '/' alone, but otherwise doing what escape_path_segment() does. For\n * efficiency reasons, we don't use escape_path_segment(), which is provided for\n * reference. Again, RFC 1808 is where this stuff is defined.\n *\n * If partial is set, os_escape_path() assumes that the path will be appended to\n * something with a '/' in it (and thus does not prefix \"./\").\n * @param p Pool to allocate from\n * @param str The original string\n * @param partial If non zero, suppresses the prepending of \"./\"\n * @return A string allocated from the pool on success, the original string\n * if no characters are encoded or if the string was NULL.\n */\nAPR_DECLARE(const char *) apr_pescape_path(apr_pool_t *p, const char *str,\n        int partial) __attribute__((nonnull(1)));\n\n/**\n * Urlencode a string, as defined in\n * http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1.\n * @param escaped Optional buffer to write the encoded string, can be\n * NULL\n * @param str The original string\n * @param slen The length of the original string, or APR_ESCAPE_STRING\n * @param len If present, returns the length of the string\n * @return APR_SUCCESS, or APR_NOTFOUND if no changes to the string were\n * detected or if the stirng was NULL\n */\nAPR_DECLARE(apr_status_t) apr_escape_urlencoded(char *escaped, const char *str,\n        apr_ssize_t slen, apr_size_t *len);\n\n/**\n * Urlencode a string, as defined in\n * http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1, returning\n * the result from a pool.\n * @param p Pool to allocate from\n * @param str String to be escaped\n * @return A string allocated from the pool on success, the original string\n * if no characters are encoded or if the string was NULL.\n */\nAPR_DECLARE(const char *) apr_pescape_urlencoded(apr_pool_t *p,\n        const char *str) __attribute__((nonnull(1)));\n\n/**\n * Apply entity encoding to a string. Characters are replaced as follows:\n * '<' becomes '&lt;', '>' becomes '&gt;', '&' becomes '&amp;', the\n * double quote becomes '&quot;\" and the single quote becomes '&apos;'.\n *\n * If toasc is not zero, any non ascii character will be encoded as\n * '%\\#ddd;', where ddd is the decimal code of the character.\n * @param escaped Optional buffer to write the encoded string, can be\n * NULL\n * @param str The original string\n * @param slen The length of the original string, or APR_ESCAPE_STRING\n * @param toasc If non zero, encode non ascii characters\n * @param len If present, returns the length of the string\n * @return APR_SUCCESS, or APR_NOTFOUND if no changes to the string were\n * detected or the string was NULL\n */\nAPR_DECLARE(apr_status_t) apr_escape_entity(char *escaped, const char *str,\n        apr_ssize_t slen, int toasc, apr_size_t *len);\n\n/**\n * Apply entity encoding to a string, returning the result from a pool.\n * Characters are replaced as follows: '<' becomes '&lt;', '>' becomes\n * '&gt;', '&' becomes '&amp;', the double quote becomes '&quot;\" and the\n * single quote becomes '&apos;'.\n * @param p Pool to allocate from\n * @param str The original string\n * @param toasc If non zero, encode non ascii characters\n * @return A string allocated from the pool on success, the original string\n * if no characters are encoded or the string is NULL.\n */\nAPR_DECLARE(const char *) apr_pescape_entity(apr_pool_t *p, const char *str,\n        int toasc) __attribute__((nonnull(1)));\n\n/**\n * Decodes html entities or numeric character references in a string. If\n * the string to be unescaped is syntactically incorrect, then the\n * following fixups will be made:\n * unknown entities will be left undecoded;\n * references to unused numeric characters will be deleted.\n * In particular, &#00; will not be decoded, but will be deleted.\n * @param unescaped Optional buffer to write the encoded string, can be\n * NULL\n * @param str The original string\n * @param slen The length of the original string, or APR_ESCAPE_STRING\n * @param len If present, returns the length of the string\n * @return APR_SUCCESS, or APR_NOTFOUND if no changes to the string were\n * detected or the string was NULL\n */\nAPR_DECLARE(apr_status_t) apr_unescape_entity(char *unescaped, const char *str,\n        apr_ssize_t slen, apr_size_t *len);\n\n/**\n * Decodes html entities or numeric character references in a string. If\n * the string to be unescaped is syntactically incorrect, then the\n * following fixups will be made:\n * unknown entities will be left undecoded;\n * references to unused numeric characters will be deleted.\n * In particular, &#00; will not be decoded, but will be deleted.\n * @param p Pool to allocate from\n * @param str The original string\n * @return A string allocated from the pool on success, the original string\n * if no characters are encoded or the string is NULL.\n */\nAPR_DECLARE(const char *) apr_punescape_entity(apr_pool_t *p, const char *str)\n        __attribute__((nonnull(1)));\n\n/**\n * Escape control characters in a string, as performed by the shell's\n * 'echo' command. Characters are replaced as follows:\n * \\\\a alert (bell), \\\\b backspace, \\\\f form feed, \\\\n new line, \\\\r carriage\n * return, \\\\t horizontal tab, \\\\v vertical tab, \\\\ backslash.\n *\n * Any non ascii character will be encoded as '\\\\xHH', where HH is the hex\n * code of the character.\n *\n * If quote is not zero, the double quote character will also be escaped.\n * @param escaped Optional buffer to write the encoded string, can be\n * NULL\n * @param str The original string\n * @param slen The length of the original string, or APR_ESCAPE_STRING\n * @param quote If non zero, encode double quotes\n * @param len If present, returns the length of the string\n * @return APR_SUCCESS, or APR_NOTFOUND if no changes to the string were\n * detected or the string was NULL\n */\nAPR_DECLARE(apr_status_t) apr_escape_echo(char *escaped, const char *str,\n        apr_ssize_t slen, int quote, apr_size_t *len);\n\n/**\n * Escape control characters in a string, as performed by the shell's\n * 'echo' command, and return the results from a pool. Characters are\n * replaced as follows: \\\\a alert (bell), \\\\b backspace, \\\\f form feed,\n * \\\\n new line, \\\\r carriage return, \\\\t horizontal tab, \\\\v vertical tab,\n * \\\\ backslash.\n *\n * Any non ascii character will be encoded as '\\\\xHH', where HH is the hex\n * code of the character.\n *\n * If quote is not zero, the double quote character will also be escaped.\n * @param p Pool to allocate from\n * @param str The original string\n * @param quote If non zero, encode double quotes\n * @return A string allocated from the pool on success, the original string\n * if no characters are encoded or the string is NULL.\n */\nAPR_DECLARE(const char *) apr_pescape_echo(apr_pool_t *p, const char *str,\n        int quote);\n\n/**\n * Convert binary data to a hex encoding.\n * @param dest The destination buffer, can be NULL\n * @param src The original buffer\n * @param srclen The length of the original buffer\n * @param colon If not zero, insert colon characters between hex digits.\n * @param len If present, returns the length of the string\n * @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL\n */\nAPR_DECLARE(apr_status_t) apr_escape_hex(char *dest, const void *src,\n        apr_size_t srclen, int colon, apr_size_t *len);\n\n/**\n * Convert binary data to a hex encoding, and return the results from a\n * pool.\n * @param p Pool to allocate from\n * @param src The original buffer\n * @param slen The length of the original buffer\n * @param colon If not zero, insert colon characters between hex digits.\n * @return A zero padded buffer allocated from the pool on success, or\n * NULL if src was NULL.\n */\nAPR_DECLARE(const char *) apr_pescape_hex(apr_pool_t *p, const void *src,\n        apr_size_t slen, int colon) __attribute__((nonnull(1)));\n\n/**\n * Convert hex encoded string to binary data.\n * @param dest The destination buffer, can be NULL\n * @param str The original buffer\n * @param slen The length of the original buffer\n * @param colon If not zero, ignore colon characters between hex digits.\n * @param len If present, returns the length of the string\n * @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL, or APR_BADCH\n * if a non hex character is present.\n */\nAPR_DECLARE(apr_status_t) apr_unescape_hex(void *dest, const char *str,\n        apr_ssize_t slen, int colon, apr_size_t *len);\n\n/**\n * Convert hex encoding to binary data, and return the results from a pool.\n * If the colon character appears between pairs of hex digits, it will be\n * ignored.\n * @param p Pool to allocate from\n * @param str The original string\n * @param colon If not zero, ignore colon characters between hex digits.\n * @param len If present, returns the length of the final buffer\n * @return A buffer allocated from the pool on success, or NULL if src was\n * NULL, or a bad character was present.\n */\nAPR_DECLARE(const void *) apr_punescape_hex(apr_pool_t *p, const char *str,\n        int colon, apr_size_t *len);\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif\t/* !APR_ESCAPE_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_escape_test_char.h",
    "content": "/* this file is automatically generated by gen_test_char, do not edit. \"make include/private/apr_escape_test_char.h\" to regenerate. */\n#define T_ESCAPE_SHELL_CMD     (1)\n#define T_ESCAPE_PATH_SEGMENT  (2)\n#define T_OS_ESCAPE_PATH       (4)\n#define T_ESCAPE_ECHO          (8)\n#define T_ESCAPE_URLENCODED    (16)\n#define T_ESCAPE_XML           (32)\n\nstatic const unsigned char test_char_table[256] = {\n    32,30,30,30,30,30,30,30,30,30,31,30,30,31,30,30,30,30,30,30,\n    30,30,30,30,30,30,30,30,30,30,30,30,6,16,63,22,17,23,49,17,\n    17,17,1,16,16,0,0,18,0,0,0,0,0,0,0,0,0,0,16,23,\n    55,16,55,23,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n    0,0,0,0,0,0,0,0,0,0,0,23,31,23,23,0,23,0,0,0,\n    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n    0,0,0,23,23,23,17,30,30,30,30,30,30,30,30,30,30,30,30,30,\n    30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,\n    30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,\n    30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,\n    30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,\n    30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,\n    30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30 \n};\n"
  },
  {
    "path": "third_party/include/apr/apr_file_info.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_FILE_INFO_H\n#define APR_FILE_INFO_H\n\n/**\n * @file apr_file_info.h\n * @brief APR File Information\n */\n\n#include \"apr.h\"\n#include \"apr_user.h\"\n#include \"apr_pools.h\"\n#include \"apr_tables.h\"\n#include \"apr_time.h\"\n#include \"apr_errno.h\"\n\n#if APR_HAVE_SYS_UIO_H\n#include <sys/uio.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_file_info File Information\n * @ingroup APR \n * @{\n */\n\n/* Many applications use the type member to determine the\n * existance of a file or initialization of the file info,\n * so the APR_NOFILE value must be distinct from APR_UNKFILE.\n */\n\n/** apr_filetype_e values for the filetype member of the \n * apr_file_info_t structure\n * @warning: Not all of the filetypes below can be determined.\n * For example, a given platform might not correctly report \n * a socket descriptor as APR_SOCK if that type isn't \n * well-identified on that platform.  In such cases where\n * a filetype exists but cannot be described by the recognized\n * flags below, the filetype will be APR_UNKFILE.  If the\n * filetype member is not determined, the type will be APR_NOFILE.\n */\n\ntypedef enum {\n    APR_NOFILE = 0,     /**< no file type determined */\n    APR_REG,            /**< a regular file */\n    APR_DIR,            /**< a directory */\n    APR_CHR,            /**< a character device */\n    APR_BLK,            /**< a block device */\n    APR_PIPE,           /**< a FIFO / pipe */\n    APR_LNK,            /**< a symbolic link */\n    APR_SOCK,           /**< a [unix domain] socket */\n    APR_UNKFILE = 127   /**< a file of some other unknown type */\n} apr_filetype_e; \n\n/**\n * @defgroup apr_file_permissions File Permissions flags \n * @{\n */\n\n#define APR_FPROT_USETID      0x8000 /**< Set user id */\n#define APR_FPROT_UREAD       0x0400 /**< Read by user */\n#define APR_FPROT_UWRITE      0x0200 /**< Write by user */\n#define APR_FPROT_UEXECUTE    0x0100 /**< Execute by user */\n\n#define APR_FPROT_GSETID      0x4000 /**< Set group id */\n#define APR_FPROT_GREAD       0x0040 /**< Read by group */\n#define APR_FPROT_GWRITE      0x0020 /**< Write by group */\n#define APR_FPROT_GEXECUTE    0x0010 /**< Execute by group */\n\n#define APR_FPROT_WSTICKY     0x2000 /**< Sticky bit */\n#define APR_FPROT_WREAD       0x0004 /**< Read by others */\n#define APR_FPROT_WWRITE      0x0002 /**< Write by others */\n#define APR_FPROT_WEXECUTE    0x0001 /**< Execute by others */\n\n#define APR_FPROT_OS_DEFAULT  0x0FFF /**< use OS's default permissions */\n\n/* additional permission flags for apr_file_copy  and apr_file_append */\n#define APR_FPROT_FILE_SOURCE_PERMS 0x1000 /**< Copy source file's permissions */\n    \n/* backcompat */\n#define APR_USETID     APR_FPROT_USETID     /**< @deprecated @see APR_FPROT_USETID     */\n#define APR_UREAD      APR_FPROT_UREAD      /**< @deprecated @see APR_FPROT_UREAD      */\n#define APR_UWRITE     APR_FPROT_UWRITE     /**< @deprecated @see APR_FPROT_UWRITE     */\n#define APR_UEXECUTE   APR_FPROT_UEXECUTE   /**< @deprecated @see APR_FPROT_UEXECUTE   */\n#define APR_GSETID     APR_FPROT_GSETID     /**< @deprecated @see APR_FPROT_GSETID     */\n#define APR_GREAD      APR_FPROT_GREAD      /**< @deprecated @see APR_FPROT_GREAD      */\n#define APR_GWRITE     APR_FPROT_GWRITE     /**< @deprecated @see APR_FPROT_GWRITE     */\n#define APR_GEXECUTE   APR_FPROT_GEXECUTE   /**< @deprecated @see APR_FPROT_GEXECUTE   */\n#define APR_WSTICKY    APR_FPROT_WSTICKY    /**< @deprecated @see APR_FPROT_WSTICKY    */\n#define APR_WREAD      APR_FPROT_WREAD      /**< @deprecated @see APR_FPROT_WREAD      */\n#define APR_WWRITE     APR_FPROT_WWRITE     /**< @deprecated @see APR_FPROT_WWRITE     */\n#define APR_WEXECUTE   APR_FPROT_WEXECUTE   /**< @deprecated @see APR_FPROT_WEXECUTE   */\n#define APR_OS_DEFAULT APR_FPROT_OS_DEFAULT /**< @deprecated @see APR_FPROT_OS_DEFAULT */\n#define APR_FILE_SOURCE_PERMS APR_FPROT_FILE_SOURCE_PERMS /**< @deprecated @see APR_FPROT_FILE_SOURCE_PERMS */\n    \n/** @} */\n\n\n/**\n * Structure for referencing directories.\n */\ntypedef struct apr_dir_t          apr_dir_t;\n/**\n * Structure for determining file permissions.\n */\ntypedef apr_int32_t               apr_fileperms_t;\n#if (defined WIN32) || (defined NETWARE)\n/**\n * Structure for determining the device the file is on.\n */\ntypedef apr_uint32_t              apr_dev_t;\n#else\n/**\n * Structure for determining the device the file is on.\n */\ntypedef dev_t                     apr_dev_t;\n#endif\n\n/**\n * @defgroup apr_file_stat Stat Functions\n * @{\n */\n/** file info structure */\ntypedef struct apr_finfo_t        apr_finfo_t;\n\n#define APR_FINFO_LINK   0x00000001 /**< Stat the link not the file itself if it is a link */\n#define APR_FINFO_MTIME  0x00000010 /**< Modification Time */\n#define APR_FINFO_CTIME  0x00000020 /**< Creation or inode-changed time */\n#define APR_FINFO_ATIME  0x00000040 /**< Access Time */\n#define APR_FINFO_SIZE   0x00000100 /**< Size of the file */\n#define APR_FINFO_CSIZE  0x00000200 /**< Storage size consumed by the file */\n#define APR_FINFO_DEV    0x00001000 /**< Device */\n#define APR_FINFO_INODE  0x00002000 /**< Inode */\n#define APR_FINFO_NLINK  0x00004000 /**< Number of links */\n#define APR_FINFO_TYPE   0x00008000 /**< Type */\n#define APR_FINFO_USER   0x00010000 /**< User */\n#define APR_FINFO_GROUP  0x00020000 /**< Group */\n#define APR_FINFO_UPROT  0x00100000 /**< User protection bits */\n#define APR_FINFO_GPROT  0x00200000 /**< Group protection bits */\n#define APR_FINFO_WPROT  0x00400000 /**< World protection bits */\n#define APR_FINFO_ICASE  0x01000000 /**< if dev is case insensitive */\n#define APR_FINFO_NAME   0x02000000 /**< ->name in proper case */\n\n#define APR_FINFO_MIN    0x00008170 /**< type, mtime, ctime, atime, size */\n#define APR_FINFO_IDENT  0x00003000 /**< dev and inode */\n#define APR_FINFO_OWNER  0x00030000 /**< user and group */\n#define APR_FINFO_PROT   0x00700000 /**<  all protections */\n#define APR_FINFO_NORM   0x0073b170 /**<  an atomic unix apr_stat() */\n#define APR_FINFO_DIRENT 0x02000000 /**<  an atomic unix apr_dir_read() */\n\n/**\n * The file information structure.  This is analogous to the POSIX\n * stat structure.\n */\nstruct apr_finfo_t {\n    /** Allocates memory and closes lingering handles in the specified pool */\n    apr_pool_t *pool;\n    /** The bitmask describing valid fields of this apr_finfo_t structure \n     *  including all available 'wanted' fields and potentially more */\n    apr_int32_t valid;\n    /** The access permissions of the file.  Mimics Unix access rights. */\n    apr_fileperms_t protection;\n    /** The type of file.  One of APR_REG, APR_DIR, APR_CHR, APR_BLK, APR_PIPE, \n     * APR_LNK or APR_SOCK.  If the type is undetermined, the value is APR_NOFILE.\n     * If the type cannot be determined, the value is APR_UNKFILE.\n     */\n    apr_filetype_e filetype;\n    /** The user id that owns the file */\n    apr_uid_t user;\n    /** The group id that owns the file */\n    apr_gid_t group;\n    /** The inode of the file. */\n    apr_ino_t inode;\n    /** The id of the device the file is on. */\n    apr_dev_t device;\n    /** The number of hard links to the file. */\n    apr_int32_t nlink;\n    /** The size of the file */\n    apr_off_t size;\n    /** The storage size consumed by the file */\n    apr_off_t csize;\n    /** The time the file was last accessed */\n    apr_time_t atime;\n    /** The time the file was last modified */\n    apr_time_t mtime;\n    /** The time the file was created, or the inode was last changed */\n    apr_time_t ctime;\n    /** The pathname of the file (possibly unrooted) */\n    const char *fname;\n    /** The file's name (no path) in filesystem case */\n    const char *name;\n    /** Unused */\n    struct apr_file_t *filehand;\n};\n\n/**\n * get the specified file's stats.  The file is specified by filename, \n * instead of using a pre-opened file.\n * @param finfo Where to store the information about the file, which is\n * never touched if the call fails.\n * @param fname The name of the file to stat.\n * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_\n                 values \n * @param pool the pool to use to allocate the new file. \n *\n * @note If @c APR_INCOMPLETE is returned all the fields in @a finfo may\n *       not be filled in, and you need to check the @c finfo->valid bitmask\n *       to verify that what you're looking for is there.\n */ \nAPR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,\n                                   apr_int32_t wanted, apr_pool_t *pool);\n\n/** @} */\n/**\n * @defgroup apr_dir Directory Manipulation Functions\n * @{\n */\n\n/**\n * Open the specified directory.\n * @param new_dir The opened directory descriptor.\n * @param dirname The full path to the directory (use / on all systems)\n * @param pool The pool to use.\n */                        \nAPR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new_dir, \n                                       const char *dirname, \n                                       apr_pool_t *pool);\n\n/**\n * close the specified directory. \n * @param thedir the directory descriptor to close.\n */                        \nAPR_DECLARE(apr_status_t) apr_dir_close(apr_dir_t *thedir);\n\n/**\n * Read the next entry from the specified directory. \n * @param finfo the file info structure and filled in by apr_dir_read\n * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_\n                 values \n * @param thedir the directory descriptor returned from apr_dir_open\n * @remark No ordering is guaranteed for the entries read.\n *\n * @note If @c APR_INCOMPLETE is returned all the fields in @a finfo may\n *       not be filled in, and you need to check the @c finfo->valid bitmask\n *       to verify that what you're looking for is there. When no more\n *       entries are available, APR_ENOENT is returned.\n */                        \nAPR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,\n                                       apr_dir_t *thedir);\n\n/**\n * Rewind the directory to the first entry.\n * @param thedir the directory descriptor to rewind.\n */                        \nAPR_DECLARE(apr_status_t) apr_dir_rewind(apr_dir_t *thedir);\n/** @} */\n\n/**\n * @defgroup apr_filepath Filepath Manipulation Functions\n * @{\n */\n\n/** Cause apr_filepath_merge to fail if addpath is above rootpath \n * @bug in APR 0.9 and 1.x, this flag's behavior is undefined\n * if the rootpath is NULL or empty.  In APR 2.0 this should be\n * changed to imply NOTABSOLUTE if the rootpath is NULL or empty.\n */\n#define APR_FILEPATH_NOTABOVEROOT   0x01\n\n/** internal: Only meaningful with APR_FILEPATH_NOTABOVEROOT */\n#define APR_FILEPATH_SECUREROOTTEST 0x02\n\n/** Cause apr_filepath_merge to fail if addpath is above rootpath,\n * even given a rootpath /foo/bar and an addpath ../bar/bash\n */\n#define APR_FILEPATH_SECUREROOT     0x03\n\n/** Fail apr_filepath_merge if the merged path is relative */\n#define APR_FILEPATH_NOTRELATIVE    0x04\n\n/** Fail apr_filepath_merge if the merged path is absolute */\n#define APR_FILEPATH_NOTABSOLUTE    0x08\n\n/** Return the file system's native path format (e.g. path delimiters\n * of ':' on MacOS9, '\\' on Win32, etc.) */\n#define APR_FILEPATH_NATIVE         0x10\n\n/** Resolve the true case of existing directories and file elements\n * of addpath, (resolving any aliases on Win32) and append a proper \n * trailing slash if a directory\n */\n#define APR_FILEPATH_TRUENAME       0x20\n\n/**\n * Extract the rootpath from the given filepath\n * @param rootpath the root file path returned with APR_SUCCESS or APR_EINCOMPLETE\n * @param filepath the pathname to parse for its root component\n * @param flags the desired rules to apply, from\n * <PRE>\n *      APR_FILEPATH_NATIVE    Use native path separators (e.g. '\\' on Win32)\n *      APR_FILEPATH_TRUENAME  Tests that the root exists, and makes it proper\n * </PRE>\n * @param p the pool to allocate the new path string from\n * @remark on return, filepath points to the first non-root character in the\n * given filepath.  In the simplest example, given a filepath of \"/foo\", \n * returns the rootpath of \"/\" and filepath points at \"foo\".  This is far \n * more complex on other platforms, which will canonicalize the root form\n * to a consistant format, given the APR_FILEPATH_TRUENAME flag, and also\n * test for the validity of that root (e.g., that a drive d:/ or network \n * share //machine/foovol/). \n * The function returns APR_ERELATIVE if filepath isn't rooted (an\n * error), APR_EINCOMPLETE if the root path is ambiguous (but potentially\n * legitimate, e.g. \"/\" on Windows is incomplete because it doesn't specify\n * the drive letter), or APR_EBADPATH if the root is simply invalid.\n * APR_SUCCESS is returned if filepath is an absolute path.\n */\nAPR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath, \n                                            const char **filepath, \n                                            apr_int32_t flags,\n                                            apr_pool_t *p);\n\n/**\n * Merge additional file path onto the previously processed rootpath\n * @param newpath the merged paths returned\n * @param rootpath the root file path (NULL uses the current working path)\n * @param addpath the path to add to the root path\n * @param flags the desired APR_FILEPATH_ rules to apply when merging\n * @param p the pool to allocate the new path string from\n * @remark if the flag APR_FILEPATH_TRUENAME is given, and the addpath \n * contains wildcard characters ('*', '?') on platforms that don't support \n * such characters within filenames, the paths will be merged, but the \n * result code will be APR_EPATHWILD, and all further segments will not\n * reflect the true filenames including the wildcard and following segments.\n */                        \nAPR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath, \n                                             const char *rootpath,\n                                             const char *addpath, \n                                             apr_int32_t flags,\n                                             apr_pool_t *p);\n\n/**\n * Split a search path into separate components\n * @param pathelts the returned components of the search path\n * @param liststr the search path (e.g., <tt>getenv(\"PATH\")</tt>)\n * @param p the pool to allocate the array and path components from\n * @remark empty path components do not become part of @a pathelts.\n * @remark the path separator in @a liststr is system specific;\n * e.g., ':' on Unix, ';' on Windows, etc.\n */\nAPR_DECLARE(apr_status_t) apr_filepath_list_split(apr_array_header_t **pathelts,\n                                                  const char *liststr,\n                                                  apr_pool_t *p);\n\n/**\n * Merge a list of search path components into a single search path\n * @param liststr the returned search path; may be NULL if @a pathelts is empty\n * @param pathelts the components of the search path\n * @param p the pool to allocate the search path from\n * @remark emtpy strings in the source array are ignored.\n * @remark the path separator in @a liststr is system specific;\n * e.g., ':' on Unix, ';' on Windows, etc.\n */\nAPR_DECLARE(apr_status_t) apr_filepath_list_merge(char **liststr,\n                                                  apr_array_header_t *pathelts,\n                                                  apr_pool_t *p);\n\n/**\n * Return the default file path (for relative file names)\n * @param path the default path string returned\n * @param flags optional flag APR_FILEPATH_NATIVE to retrieve the\n *              default file path in os-native format.\n * @param p the pool to allocate the default path string from\n */\nAPR_DECLARE(apr_status_t) apr_filepath_get(char **path, apr_int32_t flags,\n                                           apr_pool_t *p);\n\n/**\n * Set the default file path (for relative file names)\n * @param path the default path returned\n * @param p the pool to allocate any working storage\n */\nAPR_DECLARE(apr_status_t) apr_filepath_set(const char *path, apr_pool_t *p);\n\n/** The FilePath character encoding is unknown */\n#define APR_FILEPATH_ENCODING_UNKNOWN  0\n\n/** The FilePath character encoding is locale-dependent */\n#define APR_FILEPATH_ENCODING_LOCALE   1\n\n/** The FilePath character encoding is UTF-8 */\n#define APR_FILEPATH_ENCODING_UTF8     2\n\n/**\n * Determine the encoding used internally by the FilePath functions\n * @param style points to a variable which receives the encoding style flag\n * @param p the pool to allocate any working storage\n * @remark Use @c apr_os_locale_encoding and/or @c apr_os_default_encoding\n * to get the name of the path encoding if it's not UTF-8.\n */\nAPR_DECLARE(apr_status_t) apr_filepath_encoding(int *style, apr_pool_t *p);\n/** @} */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_FILE_INFO_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_file_io.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_FILE_IO_H\n#define APR_FILE_IO_H\n\n/**\n * @file apr_file_io.h\n * @brief APR File I/O Handling\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_time.h\"\n#include \"apr_errno.h\"\n#include \"apr_file_info.h\"\n#include \"apr_inherit.h\"\n\n#define APR_WANT_STDIO          /**< for SEEK_* */\n#define APR_WANT_IOVEC          /**< for apr_file_writev */\n#include \"apr_want.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_file_io File I/O Handling Functions\n * @ingroup APR \n * @{\n */\n\n/**\n * @defgroup apr_file_open_flags File Open Flags/Routines\n * @{\n */\n\n/* Note to implementors: Values in the range 0x00100000--0x80000000\n   are reserved for platform-specific values. */\n\n#define APR_FOPEN_READ       0x00001  /**< Open the file for reading */\n#define APR_FOPEN_WRITE      0x00002  /**< Open the file for writing */\n#define APR_FOPEN_CREATE     0x00004  /**< Create the file if not there */\n#define APR_FOPEN_APPEND     0x00008  /**< Append to the end of the file */\n#define APR_FOPEN_TRUNCATE   0x00010  /**< Open the file and truncate\n                                         to 0 length */\n#define APR_FOPEN_BINARY     0x00020  /**< Open the file in binary mode\n\t\t\t\t         (This flag is ignored on UNIX \n\t\t\t\t\t because it has no meaning)*/\n#define APR_FOPEN_EXCL       0x00040  /**< Open should fail if #APR_FOPEN_CREATE\n                                         and file exists. */\n#define APR_FOPEN_BUFFERED   0x00080  /**< Open the file for buffered I/O */\n#define APR_FOPEN_DELONCLOSE 0x00100  /**< Delete the file after close */\n#define APR_FOPEN_XTHREAD    0x00200  /**< Platform dependent tag to open\n                                         the file for use across multiple\n                                         threads */\n#define APR_FOPEN_SHARELOCK  0x00400  /**< Platform dependent support for\n                                         higher level locked read/write\n                                         access to support writes across\n                                         process/machines */\n#define APR_FOPEN_NOCLEANUP  0x00800  /**< Do not register a cleanup\n                                         when the file is opened. The\n\t\t\t\t\t apr_os_file_t handle in apr_file_t\n\t\t\t\t\t will not be closed when the pool\n\t\t\t\t\t is destroyed. */\n#define APR_FOPEN_SENDFILE_ENABLED 0x01000 /**< Advisory flag that this\n                                             file should support\n                                             apr_socket_sendfile operation */\n#define APR_FOPEN_LARGEFILE   0x04000 /**< Platform dependent flag to enable\n                                       * large file support, see WARNING below\n                                       */\n#define APR_FOPEN_SPARSE      0x08000 /**< Platform dependent flag to enable\n                                       * sparse file support, see WARNING below\n                                       */\n#define APR_FOPEN_NONBLOCK    0x40000 /**< Platform dependent flag to enable\n                                       * non blocking file io */\n\n\n/* backcompat */\n#define APR_READ             APR_FOPEN_READ       /**< @deprecated @see APR_FOPEN_READ */\n#define APR_WRITE            APR_FOPEN_WRITE      /**< @deprecated @see APR_FOPEN_WRITE */   \n#define APR_CREATE           APR_FOPEN_CREATE     /**< @deprecated @see APR_FOPEN_CREATE */   \n#define APR_APPEND           APR_FOPEN_APPEND     /**< @deprecated @see APR_FOPEN_APPEND */   \n#define APR_TRUNCATE         APR_FOPEN_TRUNCATE   /**< @deprecated @see APR_FOPEN_TRUNCATE */   \n#define APR_BINARY           APR_FOPEN_BINARY     /**< @deprecated @see APR_FOPEN_BINARY */   \n#define APR_EXCL             APR_FOPEN_EXCL       /**< @deprecated @see APR_FOPEN_EXCL */   \n#define APR_BUFFERED         APR_FOPEN_BUFFERED   /**< @deprecated @see APR_FOPEN_BUFFERED */   \n#define APR_DELONCLOSE       APR_FOPEN_DELONCLOSE /**< @deprecated @see APR_FOPEN_DELONCLOSE */   \n#define APR_XTHREAD          APR_FOPEN_XTHREAD    /**< @deprecated @see APR_FOPEN_XTHREAD */   \n#define APR_SHARELOCK        APR_FOPEN_SHARELOCK  /**< @deprecated @see APR_FOPEN_SHARELOCK */   \n#define APR_FILE_NOCLEANUP   APR_FOPEN_NOCLEANUP  /**< @deprecated @see APR_FOPEN_NOCLEANUP */   \n#define APR_SENDFILE_ENABLED APR_FOPEN_SENDFILE_ENABLED /**< @deprecated @see APR_FOPEN_SENDFILE_ENABLED */   \n#define APR_LARGEFILE        APR_FOPEN_LARGEFILE  /**< @deprecated @see APR_FOPEN_LARGEFILE */   \n\n/** @def APR_FOPEN_LARGEFILE \n * @warning APR_FOPEN_LARGEFILE flag only has effect on some\n * platforms where sizeof(apr_off_t) == 4.  Where implemented, it\n * allows opening and writing to a file which exceeds the size which\n * can be represented by apr_off_t (2 gigabytes).  When a file's size\n * does exceed 2Gb, apr_file_info_get() will fail with an error on the\n * descriptor, likewise apr_stat()/apr_lstat() will fail on the\n * filename.  apr_dir_read() will fail with #APR_INCOMPLETE on a\n * directory entry for a large file depending on the particular\n * APR_FINFO_* flags.  Generally, it is not recommended to use this\n * flag.\n *\n * @def APR_FOPEN_SPARSE\n * @warning APR_FOPEN_SPARSE may, depending on platform, convert a\n * normal file to a sparse file.  Some applications may be unable\n * to decipher a sparse file, so it's critical that the sparse file\n * flag should only be used for files accessed only by APR or other\n * applications known to be able to decipher them.  APR does not\n * guarantee that it will compress the file into sparse segments\n * if it was previously created and written without the sparse flag.\n * On platforms which do not understand, or on file systems which\n * cannot handle sparse files, the flag is ignored by apr_file_open().\n *\n * @def APR_FOPEN_NONBLOCK\n * @warning APR_FOPEN_NONBLOCK is not implemented on all platforms.\n * Callers should be prepared for it to fail with #APR_ENOTIMPL.\n */\n\n/** @} */\n\n/**\n * @defgroup apr_file_seek_flags File Seek Flags\n * @{\n */\n\n/* flags for apr_file_seek */\n/** Set the file position */\n#define APR_SET SEEK_SET\n/** Current */\n#define APR_CUR SEEK_CUR\n/** Go to end of file */\n#define APR_END SEEK_END\n/** @} */\n\n/**\n * @defgroup apr_file_attrs_set_flags File Attribute Flags\n * @{\n */\n\n/* flags for apr_file_attrs_set */\n#define APR_FILE_ATTR_READONLY   0x01          /**< File is read-only */\n#define APR_FILE_ATTR_EXECUTABLE 0x02          /**< File is executable */\n#define APR_FILE_ATTR_HIDDEN     0x04          /**< File is hidden */\n/** @} */\n\n/**\n * @defgroup apr_file_writev{_full} max iovec size\n * @{\n */\n#if defined(DOXYGEN)\n#define APR_MAX_IOVEC_SIZE 1024                /**< System dependent maximum \n                                                    size of an iovec array */\n#elif defined(IOV_MAX)\n#define APR_MAX_IOVEC_SIZE IOV_MAX\n#elif defined(MAX_IOVEC)\n#define APR_MAX_IOVEC_SIZE MAX_IOVEC\n#else\n#define APR_MAX_IOVEC_SIZE 1024\n#endif\n/** @} */\n\n/** File attributes */\ntypedef apr_uint32_t apr_fileattrs_t;\n\n/** Type to pass as whence argument to apr_file_seek. */\ntypedef int       apr_seek_where_t;\n\n/**\n * Structure for referencing files.\n */\ntypedef struct apr_file_t         apr_file_t;\n\n/* File lock types/flags */\n/**\n * @defgroup apr_file_lock_types File Lock Types\n * @{\n */\n\n#define APR_FLOCK_SHARED        1       /**< Shared lock. More than one process\n                                           or thread can hold a shared lock\n                                           at any given time. Essentially,\n                                           this is a \"read lock\", preventing\n                                           writers from establishing an\n                                           exclusive lock. */\n#define APR_FLOCK_EXCLUSIVE     2       /**< Exclusive lock. Only one process\n                                           may hold an exclusive lock at any\n                                           given time. This is analogous to\n                                           a \"write lock\". */\n\n#define APR_FLOCK_TYPEMASK      0x000F  /**< mask to extract lock type */\n#define APR_FLOCK_NONBLOCK      0x0010  /**< do not block while acquiring the\n                                           file lock */\n/** @} */\n\n/**\n * Open the specified file.\n * @param newf The opened file descriptor.\n * @param fname The full path to the file (using / on all systems)\n * @param flag Or'ed value of:\n * @li #APR_FOPEN_READ           open for reading\n * @li #APR_FOPEN_WRITE          open for writing\n * @li #APR_FOPEN_CREATE         create the file if not there\n * @li #APR_FOPEN_APPEND         file ptr is set to end prior to all writes\n * @li #APR_FOPEN_TRUNCATE       set length to zero if file exists\n * @li #APR_FOPEN_BINARY         not a text file\n * @li #APR_FOPEN_BUFFERED       buffer the data.  Default is non-buffered\n * @li #APR_FOPEN_EXCL           return error if #APR_FOPEN_CREATE and file exists\n * @li #APR_FOPEN_DELONCLOSE     delete the file after closing\n * @li #APR_FOPEN_XTHREAD        Platform dependent tag to open the file\n *                               for use across multiple threads\n * @li #APR_FOPEN_SHARELOCK      Platform dependent support for higher\n *                               level locked read/write access to support\n *                               writes across process/machines\n * @li #APR_FOPEN_NOCLEANUP      Do not register a cleanup with the pool \n *                               passed in on the @a pool argument (see below)\n * @li #APR_FOPEN_SENDFILE_ENABLED  Open with appropriate platform semantics\n *                               for sendfile operations.  Advisory only,\n *                               apr_socket_sendfile does not check this flag\n * @li #APR_FOPEN_LARGEFILE      Platform dependent flag to enable large file\n *                               support, see WARNING below \n * @li #APR_FOPEN_SPARSE         Platform dependent flag to enable sparse file\n *                               support, see WARNING below\n * @li #APR_FOPEN_NONBLOCK       Platform dependent flag to enable\n *                               non blocking file io\n * @param perm Access permissions for file.\n * @param pool The pool to use.\n * @remark If perm is #APR_FPROT_OS_DEFAULT and the file is being created,\n * appropriate default permissions will be used.\n * @remark By default, the returned file descriptor will not be\n * inherited by child processes created by apr_proc_create().  This\n * can be changed using apr_file_inherit_set().\n */\nAPR_DECLARE(apr_status_t) apr_file_open(apr_file_t **newf, const char *fname,\n                                        apr_int32_t flag, apr_fileperms_t perm,\n                                        apr_pool_t *pool);\n\n/**\n * Close the specified file.\n * @param file The file descriptor to close.\n */\nAPR_DECLARE(apr_status_t) apr_file_close(apr_file_t *file);\n\n/**\n * Delete the specified file.\n * @param path The full path to the file (using / on all systems)\n * @param pool The pool to use.\n * @remark If the file is open, it won't be removed until all\n * instances are closed.\n */\nAPR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *pool);\n\n/**\n * Rename the specified file.\n * @param from_path The full path to the original file (using / on all systems)\n * @param to_path The full path to the new file (using / on all systems)\n * @param pool The pool to use.\n * @warning If a file exists at the new location, then it will be\n * overwritten.  Moving files or directories across devices may not be\n * possible.\n */\nAPR_DECLARE(apr_status_t) apr_file_rename(const char *from_path, \n                                          const char *to_path,\n                                          apr_pool_t *pool);\n\n/**\n * Create a hard link to the specified file.\n * @param from_path The full path to the original file (using / on all systems)\n * @param to_path The full path to the new file (using / on all systems)\n * @remark Both files must reside on the same device.\n */\nAPR_DECLARE(apr_status_t) apr_file_link(const char *from_path, \n                                          const char *to_path);\n\n/**\n * Copy the specified file to another file.\n * @param from_path The full path to the original file (using / on all systems)\n * @param to_path The full path to the new file (using / on all systems)\n * @param perms Access permissions for the new file if it is created.\n *     In place of the usual or'd combination of file permissions, the\n *     value #APR_FPROT_FILE_SOURCE_PERMS may be given, in which case the source\n *     file's permissions are copied.\n * @param pool The pool to use.\n * @remark The new file does not need to exist, it will be created if required.\n * @warning If the new file already exists, its contents will be overwritten.\n */\nAPR_DECLARE(apr_status_t) apr_file_copy(const char *from_path, \n                                        const char *to_path,\n                                        apr_fileperms_t perms,\n                                        apr_pool_t *pool);\n\n/**\n * Append the specified file to another file.\n * @param from_path The full path to the source file (use / on all systems)\n * @param to_path The full path to the destination file (use / on all systems)\n * @param perms Access permissions for the destination file if it is created.\n *     In place of the usual or'd combination of file permissions, the\n *     value #APR_FPROT_FILE_SOURCE_PERMS may be given, in which case the source\n *     file's permissions are copied.\n * @param pool The pool to use.\n * @remark The new file does not need to exist, it will be created if required.\n */\nAPR_DECLARE(apr_status_t) apr_file_append(const char *from_path, \n                                          const char *to_path,\n                                          apr_fileperms_t perms,\n                                          apr_pool_t *pool);\n\n/**\n * Are we at the end of the file\n * @param fptr The apr file we are testing.\n * @remark Returns #APR_EOF if we are at the end of file, #APR_SUCCESS otherwise.\n */\nAPR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr);\n\n/**\n * Open standard error as an apr file pointer.\n * @param thefile The apr file to use as stderr.\n * @param pool The pool to allocate the file out of.\n * \n * @remark The only reason that the apr_file_open_std* functions exist\n * is that you may not always have a stderr/out/in on Windows.  This\n * is generally a problem with newer versions of Windows and services.\n * \n * @remark The other problem is that the C library functions generally work\n * differently on Windows and Unix.  So, by using apr_file_open_std*\n * functions, you can get a handle to an APR struct that works with\n * the APR functions which are supposed to work identically on all\n * platforms.\n */\nAPR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile,\n                                               apr_pool_t *pool);\n\n/**\n * open standard output as an apr file pointer.\n * @param thefile The apr file to use as stdout.\n * @param pool The pool to allocate the file out of.\n * \n * @remark See remarks for apr_file_open_stderr().\n */\nAPR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile,\n                                               apr_pool_t *pool);\n\n/**\n * open standard input as an apr file pointer.\n * @param thefile The apr file to use as stdin.\n * @param pool The pool to allocate the file out of.\n * \n * @remark See remarks for apr_file_open_stderr().\n */\nAPR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile,\n                                              apr_pool_t *pool);\n\n/**\n * open standard error as an apr file pointer, with flags.\n * @param thefile The apr file to use as stderr.\n * @param flags The flags to open the file with. Only the \n *              @li #APR_FOPEN_EXCL\n *              @li #APR_FOPEN_BUFFERED\n *              @li #APR_FOPEN_XTHREAD\n *              @li #APR_FOPEN_SHARELOCK \n *              @li #APR_FOPEN_SENDFILE_ENABLED\n *              @li #APR_FOPEN_LARGEFILE\n *\n *              flags should be used. The #APR_FOPEN_WRITE flag will\n *              be set unconditionally.\n * @param pool The pool to allocate the file out of.\n * \n * @remark See remarks for apr_file_open_stderr().\n */\nAPR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,\n                                                     apr_int32_t flags,\n                                                     apr_pool_t *pool);\n\n/**\n * open standard output as an apr file pointer, with flags.\n * @param thefile The apr file to use as stdout.\n * @param flags The flags to open the file with. Only the \n *              @li #APR_FOPEN_EXCL\n *              @li #APR_FOPEN_BUFFERED\n *              @li #APR_FOPEN_XTHREAD\n *              @li #APR_FOPEN_SHARELOCK \n *              @li #APR_FOPEN_SENDFILE_ENABLED\n *              @li #APR_FOPEN_LARGEFILE\n *\n *              flags should be used. The #APR_FOPEN_WRITE flag will\n *              be set unconditionally.\n * @param pool The pool to allocate the file out of.\n * \n * @remark See remarks for apr_file_open_stderr().\n */\nAPR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,\n                                                     apr_int32_t flags,\n                                                     apr_pool_t *pool);\n\n/**\n * open standard input as an apr file pointer, with flags.\n * @param thefile The apr file to use as stdin.\n * @param flags The flags to open the file with. Only the \n *              @li #APR_FOPEN_EXCL\n *              @li #APR_FOPEN_BUFFERED\n *              @li #APR_FOPEN_XTHREAD\n *              @li #APR_FOPEN_SHARELOCK \n *              @li #APR_FOPEN_SENDFILE_ENABLED\n *              @li #APR_FOPEN_LARGEFILE\n *\n *              flags should be used. The #APR_FOPEN_WRITE flag will\n *              be set unconditionally.\n * @param pool The pool to allocate the file out of.\n * \n * @remark See remarks for apr_file_open_stderr().\n */\nAPR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,\n                                                     apr_int32_t flags,\n                                                     apr_pool_t *pool);\n\n/**\n * Read data from the specified file.\n * @param thefile The file descriptor to read from.\n * @param buf The buffer to store the data to.\n * @param nbytes On entry, the number of bytes to read; on exit, the number\n * of bytes read.\n *\n * @remark apr_file_read() will read up to the specified number of\n * bytes, but never more.  If there isn't enough data to fill that\n * number of bytes, all of the available data is read.  The third\n * argument is modified to reflect the number of bytes read.  If a\n * char was put back into the stream via ungetc, it will be the first\n * character returned.\n *\n * @remark It is not possible for both bytes to be read and an #APR_EOF\n * or other error to be returned.  #APR_EINTR is never returned.\n */\nAPR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf,\n                                        apr_size_t *nbytes);\n\n/**\n * Write data to the specified file.\n * @param thefile The file descriptor to write to.\n * @param buf The buffer which contains the data.\n * @param nbytes On entry, the number of bytes to write; on exit, the number \n *               of bytes written.\n *\n * @remark apr_file_write() will write up to the specified number of\n * bytes, but never more.  If the OS cannot write that many bytes, it\n * will write as many as it can.  The third argument is modified to\n * reflect the * number of bytes written.\n *\n * @remark It is possible for both bytes to be written and an error to\n * be returned.  #APR_EINTR is never returned.\n */\nAPR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf,\n                                         apr_size_t *nbytes);\n\n/**\n * Write data from iovec array to the specified file.\n * @param thefile The file descriptor to write to.\n * @param vec The array from which to get the data to write to the file.\n * @param nvec The number of elements in the struct iovec array. This must \n *             be smaller than #APR_MAX_IOVEC_SIZE.  If it isn't, the function \n *             will fail with #APR_EINVAL.\n * @param nbytes The number of bytes written.\n *\n * @remark It is possible for both bytes to be written and an error to\n * be returned.  #APR_EINTR is never returned.\n *\n * @remark apr_file_writev() is available even if the underlying\n * operating system doesn't provide writev().\n */\nAPR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile,\n                                          const struct iovec *vec,\n                                          apr_size_t nvec, apr_size_t *nbytes);\n\n/**\n * Read data from the specified file, ensuring that the buffer is filled\n * before returning.\n * @param thefile The file descriptor to read from.\n * @param buf The buffer to store the data to.\n * @param nbytes The number of bytes to read.\n * @param bytes_read If non-NULL, this will contain the number of bytes read.\n *\n * @remark apr_file_read_full() will read up to the specified number of\n * bytes, but never more.  If there isn't enough data to fill that\n * number of bytes, then the process/thread will block until it is\n * available or EOF is reached.  If a char was put back into the\n * stream via ungetc, it will be the first character returned.\n *\n * @remark It is possible for both bytes to be read and an error to be\n * returned.  And if *bytes_read is less than nbytes, an accompanying\n * error is _always_ returned.\n *\n * @remark #APR_EINTR is never returned.\n */\nAPR_DECLARE(apr_status_t) apr_file_read_full(apr_file_t *thefile, void *buf,\n                                             apr_size_t nbytes,\n                                             apr_size_t *bytes_read);\n\n/**\n * Write data to the specified file, ensuring that all of the data is\n * written before returning.\n * @param thefile The file descriptor to write to.\n * @param buf The buffer which contains the data.\n * @param nbytes The number of bytes to write.\n * @param bytes_written If non-NULL, set to the number of bytes written.\n * \n * @remark apr_file_write_full() will write up to the specified number of\n * bytes, but never more.  If the OS cannot write that many bytes, the\n * process/thread will block until they can be written. Exceptional\n * error such as \"out of space\" or \"pipe closed\" will terminate with\n * an error.\n *\n * @remark It is possible for both bytes to be written and an error to\n * be returned.  And if *bytes_written is less than nbytes, an\n * accompanying error is _always_ returned.\n *\n * @remark #APR_EINTR is never returned.\n */\nAPR_DECLARE(apr_status_t) apr_file_write_full(apr_file_t *thefile, \n                                              const void *buf,\n                                              apr_size_t nbytes, \n                                              apr_size_t *bytes_written);\n\n\n/**\n * Write data from iovec array to the specified file, ensuring that all of the\n * data is written before returning.\n * @param thefile The file descriptor to write to.\n * @param vec The array from which to get the data to write to the file.\n * @param nvec The number of elements in the struct iovec array. This must \n *             be smaller than #APR_MAX_IOVEC_SIZE.  If it isn't, the function \n *             will fail with #APR_EINVAL.\n * @param nbytes The number of bytes written.\n *\n * @remark apr_file_writev_full() is available even if the underlying\n * operating system doesn't provide writev().\n */\nAPR_DECLARE(apr_status_t) apr_file_writev_full(apr_file_t *thefile,\n                                               const struct iovec *vec,\n                                               apr_size_t nvec,\n                                               apr_size_t *nbytes);\n/**\n * Write a character into the specified file.\n * @param ch The character to write.\n * @param thefile The file descriptor to write to\n */\nAPR_DECLARE(apr_status_t) apr_file_putc(char ch, apr_file_t *thefile);\n\n/**\n * Read a character from the specified file.\n * @param ch The character to read into\n * @param thefile The file descriptor to read from\n */\nAPR_DECLARE(apr_status_t) apr_file_getc(char *ch, apr_file_t *thefile);\n\n/**\n * Put a character back onto a specified stream.\n * @param ch The character to write.\n * @param thefile The file descriptor to write to\n */\nAPR_DECLARE(apr_status_t) apr_file_ungetc(char ch, apr_file_t *thefile);\n\n/**\n * Read a line from the specified file\n * @param str The buffer to store the string in. \n * @param len The length of the string\n * @param thefile The file descriptor to read from\n * @remark The buffer will be NUL-terminated if any characters are stored.\n *         The newline at the end of the line will not be stripped.\n */\nAPR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, \n                                        apr_file_t *thefile);\n\n/**\n * Write the string into the specified file.\n * @param str The string to write. \n * @param thefile The file descriptor to write to\n */\nAPR_DECLARE(apr_status_t) apr_file_puts(const char *str, apr_file_t *thefile);\n\n/**\n * Flush the file's buffer.\n * @param thefile The file descriptor to flush\n */\nAPR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile);\n\n/**\n * Transfer all file modified data and metadata to disk.\n * @param thefile The file descriptor to sync\n */\nAPR_DECLARE(apr_status_t) apr_file_sync(apr_file_t *thefile);\n\n/**\n * Transfer all file modified data to disk.\n * @param thefile The file descriptor to sync\n */\nAPR_DECLARE(apr_status_t) apr_file_datasync(apr_file_t *thefile);\n\n/**\n * Duplicate the specified file descriptor.\n * @param new_file The structure to duplicate into. \n * @param old_file The file to duplicate.\n * @param p The pool to use for the new file.\n * @remark *new_file must point to a valid apr_file_t, or point to NULL.\n */         \nAPR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,\n                                       apr_file_t *old_file,\n                                       apr_pool_t *p);\n\n/**\n * Duplicate the specified file descriptor and close the original\n * @param new_file The old file that is to be closed and reused\n * @param old_file The file to duplicate\n * @param p        The pool to use for the new file\n *\n * @remark new_file MUST point at a valid apr_file_t. It cannot be NULL.\n */\nAPR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file,\n                                        apr_file_t *old_file,\n                                        apr_pool_t *p);\n\n/**\n * Move the specified file descriptor to a new pool\n * @param new_file Pointer in which to return the new apr_file_t\n * @param old_file The file to move\n * @param p        The pool to which the descriptor is to be moved\n * @remark Unlike apr_file_dup2(), this function doesn't do an\n *         OS dup() operation on the underlying descriptor; it just\n *         moves the descriptor's apr_file_t wrapper to a new pool.\n * @remark The new pool need not be an ancestor of old_file's pool.\n * @remark After calling this function, old_file may not be used\n */\nAPR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file,\n                                            apr_file_t *old_file,\n                                            apr_pool_t *p);\n\n/**\n * Give the specified apr file handle a new buffer \n * @param thefile  The file handle that is to be modified\n * @param buffer   The buffer\n * @param bufsize  The size of the buffer\n * @remark It is possible to add a buffer to previously unbuffered\n *         file handles, the #APR_FOPEN_BUFFERED flag will be added to\n *         the file handle's flags. Likewise, with buffer=NULL and\n *         bufsize=0 arguments it is possible to make a previously\n *         buffered file handle unbuffered.\n */\nAPR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *thefile,\n                                              char * buffer,\n                                              apr_size_t bufsize);\n\n/**\n * Get the size of any buffer for the specified apr file handle \n * @param thefile  The file handle \n */\nAPR_DECLARE(apr_size_t) apr_file_buffer_size_get(apr_file_t *thefile);\n\n/**\n * Move the read/write file offset to a specified byte within a file.\n * @param thefile The file descriptor\n * @param where How to move the pointer, one of:\n *              @li #APR_SET  --  set the offset to offset\n *              @li #APR_CUR  --  add the offset to the current position \n *              @li #APR_END  --  add the offset to the current file size \n * @param offset The offset to move the pointer to.\n * @remark The third argument is modified to be the offset the pointer\n          was actually moved to.\n */\nAPR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, \n                                   apr_seek_where_t where,\n                                   apr_off_t *offset);\n\n/**\n * Create an anonymous pipe.\n * @param in The newly created pipe's file for reading.\n * @param out The newly created pipe's file for writing.\n * @param pool The pool to operate on.\n * @remark By default, the returned file descriptors will be inherited\n * by child processes created using apr_proc_create().  This can be\n * changed using apr_file_inherit_unset().\n * @bug  Some platforms cannot toggle between blocking and nonblocking,\n * and when passing a pipe as a standard handle to an application which\n * does not expect it, a non-blocking stream will fluxor the client app.\n * @deprecated @see apr_file_pipe_create_ex()\n */\nAPR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, \n                                               apr_file_t **out,\n                                               apr_pool_t *pool);\n\n/**\n * Create an anonymous pipe which portably supports async timeout options.\n * @param in The newly created pipe's file for reading.\n * @param out The newly created pipe's file for writing.\n * @param blocking one of these values defined in apr_thread_proc.h;\n *                 @li #APR_FULL_BLOCK\n *                 @li #APR_READ_BLOCK\n *                 @li #APR_WRITE_BLOCK\n *                 @li #APR_FULL_NONBLOCK\n * @param pool The pool to operate on.\n * @remark By default, the returned file descriptors will be inherited\n * by child processes created using apr_proc_create().  This can be\n * changed using apr_file_inherit_unset().\n * @remark Some platforms cannot toggle between blocking and nonblocking,\n * and when passing a pipe as a standard handle to an application which\n * does not expect it, a non-blocking stream will fluxor the client app.\n * Use this function rather than apr_file_pipe_create() to create pipes \n * where one or both ends require non-blocking semantics.\n */\nAPR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in, \n                                                  apr_file_t **out, \n                                                  apr_int32_t blocking, \n                                                  apr_pool_t *pool);\n\n/**\n * Create a named pipe.\n * @param filename The filename of the named pipe\n * @param perm The permissions for the newly created pipe.\n * @param pool The pool to operate on.\n */\nAPR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename, \n                                                    apr_fileperms_t perm, \n                                                    apr_pool_t *pool);\n\n/**\n * Get the timeout value for a pipe or manipulate the blocking state.\n * @param thepipe The pipe we are getting a timeout for.\n * @param timeout The current timeout value in microseconds. \n */\nAPR_DECLARE(apr_status_t) apr_file_pipe_timeout_get(apr_file_t *thepipe, \n                                               apr_interval_time_t *timeout);\n\n/**\n * Set the timeout value for a pipe or manipulate the blocking state.\n * @param thepipe The pipe we are setting a timeout on.\n * @param timeout The timeout value in microseconds.  Values < 0 mean wait \n *        forever, 0 means do not wait at all.\n */\nAPR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, \n                                                  apr_interval_time_t timeout);\n\n/** file (un)locking functions. */\n\n/**\n * Establish a lock on the specified, open file. The lock may be advisory\n * or mandatory, at the discretion of the platform. The lock applies to\n * the file as a whole, rather than a specific range. Locks are established\n * on a per-thread/process basis; a second lock by the same thread will not\n * block.\n * @param thefile The file to lock.\n * @param type The type of lock to establish on the file.\n */\nAPR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type);\n\n/**\n * Remove any outstanding locks on the file.\n * @param thefile The file to unlock.\n */\nAPR_DECLARE(apr_status_t) apr_file_unlock(apr_file_t *thefile);\n\n/**accessor and general file_io functions. */\n\n/**\n * return the file name of the current file.\n * @param new_path The path of the file.  \n * @param thefile The currently open file.\n */                     \nAPR_DECLARE(apr_status_t) apr_file_name_get(const char **new_path, \n                                            apr_file_t *thefile);\n    \n/**\n * Return the data associated with the current file.\n * @param data The user data associated with the file.  \n * @param key The key to use for retrieving data associated with this file.\n * @param file The currently open file.\n */                     \nAPR_DECLARE(apr_status_t) apr_file_data_get(void **data, const char *key, \n                                            apr_file_t *file);\n\n/**\n * Set the data associated with the current file.\n * @param file The currently open file.\n * @param data The user data to associate with the file.  \n * @param key The key to use for associating data with the file.\n * @param cleanup The cleanup routine to use when the file is destroyed.\n */                     \nAPR_DECLARE(apr_status_t) apr_file_data_set(apr_file_t *file, void *data,\n                                            const char *key,\n                                            apr_status_t (*cleanup)(void *));\n\n/**\n * Write a string to a file using a printf format.\n * @param fptr The file to write to.\n * @param format The format string\n * @param ... The values to substitute in the format string\n * @return The number of bytes written\n */ \nAPR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr, \n                                        const char *format, ...)\n        __attribute__((format(printf,2,3)));\n\n/**\n * set the specified file's permission bits.\n * @param fname The file (name) to apply the permissions to.\n * @param perms The permission bits to apply to the file.\n *\n * @warning Some platforms may not be able to apply all of the\n * available permission bits; #APR_INCOMPLETE will be returned if some\n * permissions are specified which could not be set.\n *\n * @warning Platforms which do not implement this feature will return\n * #APR_ENOTIMPL.\n */\nAPR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,\n                                             apr_fileperms_t perms);\n\n/**\n * Set attributes of the specified file.\n * @param fname The full path to the file (using / on all systems)\n * @param attributes Or'd combination of\n *            @li #APR_FILE_ATTR_READONLY   - make the file readonly\n *            @li #APR_FILE_ATTR_EXECUTABLE - make the file executable\n *            @li #APR_FILE_ATTR_HIDDEN     - make the file hidden\n * @param attr_mask Mask of valid bits in attributes.\n * @param pool the pool to use.\n * @remark This function should be used in preference to explicit manipulation\n *      of the file permissions, because the operations to provide these\n *      attributes are platform specific and may involve more than simply\n *      setting permission bits.\n * @warning Platforms which do not implement this feature will return\n *      #APR_ENOTIMPL.\n */\nAPR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname,\n                                             apr_fileattrs_t attributes,\n                                             apr_fileattrs_t attr_mask,\n                                             apr_pool_t *pool);\n\n/**\n * Set the mtime of the specified file.\n * @param fname The full path to the file (using / on all systems)\n * @param mtime The mtime to apply to the file.\n * @param pool The pool to use.\n * @warning Platforms which do not implement this feature will return\n *      #APR_ENOTIMPL.\n */\nAPR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,\n                                             apr_time_t mtime,\n                                             apr_pool_t *pool);\n\n/**\n * Create a new directory on the file system.\n * @param path the path for the directory to be created. (use / on all systems)\n * @param perm Permissions for the new directory.\n * @param pool the pool to use.\n */                        \nAPR_DECLARE(apr_status_t) apr_dir_make(const char *path, apr_fileperms_t perm, \n                                       apr_pool_t *pool);\n\n/** Creates a new directory on the file system, but behaves like\n * 'mkdir -p'. Creates intermediate directories as required. No error\n * will be reported if PATH already exists.\n * @param path the path for the directory to be created. (use / on all systems)\n * @param perm Permissions for the new directory.\n * @param pool the pool to use.\n */\nAPR_DECLARE(apr_status_t) apr_dir_make_recursive(const char *path,\n                                                 apr_fileperms_t perm,\n                                                 apr_pool_t *pool);\n\n/**\n * Remove directory from the file system.\n * @param path the path for the directory to be removed. (use / on all systems)\n * @param pool the pool to use.\n * @remark Removing a directory which is in-use (e.g., the current working\n * directory, or during apr_dir_read, or with an open file) is not portable.\n */                        \nAPR_DECLARE(apr_status_t) apr_dir_remove(const char *path, apr_pool_t *pool);\n\n/**\n * get the specified file's stats.\n * @param finfo Where to store the information about the file.\n * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_* values \n * @param thefile The file to get information about.\n */ \nAPR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, \n                                            apr_int32_t wanted,\n                                            apr_file_t *thefile);\n    \n\n/**\n * Truncate the file's length to the specified offset\n * @param fp The file to truncate\n * @param offset The offset to truncate to.\n * @remark The read/write file offset is repositioned to offset.\n */\nAPR_DECLARE(apr_status_t) apr_file_trunc(apr_file_t *fp, apr_off_t offset);\n\n/**\n * Retrieve the flags that were passed into apr_file_open()\n * when the file was opened.\n * @return apr_int32_t the flags\n */\nAPR_DECLARE(apr_int32_t) apr_file_flags_get(apr_file_t *f);\n\n/**\n * Get the pool used by the file.\n */\nAPR_POOL_DECLARE_ACCESSOR(file);\n\n/**\n * Set a file to be inherited by child processes.\n *\n */\nAPR_DECLARE_INHERIT_SET(file);\n\n/**\n * Unset a file from being inherited by child processes.\n */\nAPR_DECLARE_INHERIT_UNSET(file);\n\n/**\n * Open a temporary file\n * @param fp The apr file to use as a temporary file.\n * @param templ The template to use when creating a temp file.\n * @param flags The flags to open the file with. If this is zero,\n *              the file is opened with \n *              #APR_FOPEN_CREATE | #APR_FOPEN_READ | #APR_FOPEN_WRITE |\n *              #APR_FOPEN_EXCL | #APR_FOPEN_DELONCLOSE\n * @param p The pool to allocate the file out of.\n * @remark   \n * This function  generates  a unique temporary file name from template.  \n * The last six characters of template must be XXXXXX and these are replaced \n * with a string that makes the filename unique. Since it will  be  modified,\n * template must not be a string constant, but should be declared as a character\n * array.  \n *\n */\nAPR_DECLARE(apr_status_t) apr_file_mktemp(apr_file_t **fp, char *templ,\n                                          apr_int32_t flags, apr_pool_t *p);\n\n\n/**\n * Find an existing directory suitable as a temporary storage location.\n * @param temp_dir The temp directory.\n * @param p The pool to use for any necessary allocations.\n * @remark   \n * This function uses an algorithm to search for a directory that an\n * an application can use for temporary storage.\n *\n */\nAPR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir, \n                                           apr_pool_t *p);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_FILE_IO_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_fnmatch.h",
    "content": "/*\n * Copyright (c) 1992, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)fnmatch.h\t8.1 (Berkeley) 6/2/93\n */\n\n/* This file has been modified by the Apache Software Foundation. */\n#ifndef\t_APR_FNMATCH_H_\n#define\t_APR_FNMATCH_H_\n\n/**\n * @file apr_fnmatch.h\n * @brief APR FNMatch Functions\n */\n\n#include \"apr_errno.h\"\n#include \"apr_tables.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @defgroup apr_fnmatch Filename Matching Functions\n * @ingroup APR \n * @{\n */\n\n#define APR_FNM_NOMATCH     1     /**< Match failed. */\n \n#define APR_FNM_NOESCAPE    0x01  /**< Disable backslash escaping. */\n#define APR_FNM_PATHNAME    0x02  /**< Slash must be matched by slash. */\n#define APR_FNM_PERIOD      0x04  /**< Period must be matched by period. */\n#define APR_FNM_CASE_BLIND  0x08  /**< Compare characters case-insensitively. */\n\n/**\n * Try to match the string to the given pattern, return APR_SUCCESS if\n *    match, else return APR_FNM_NOMATCH.  Note that there is no such thing as\n *    an illegal pattern.\n *\n * With all flags unset, a pattern is interpreted as such:\n *\n * PATTERN: Backslash followed by any character, including another\n *          backslash.<br/>\n * MATCHES: That character exactly.\n * \n * <p>\n * PATTERN: ?<br/>\n * MATCHES: Any single character.\n * </p>\n * \n * <p>\n * PATTERN: *<br/>\n * MATCHES: Any sequence of zero or more characters. (Note that multiple\n *          *s in a row are equivalent to one.)\n * \n * PATTERN: Any character other than \\?*[ or a \\ at the end of the pattern<br/>\n * MATCHES: That character exactly. (Case sensitive.)\n * \n * PATTERN: [ followed by a class description followed by ]<br/>\n * MATCHES: A single character described by the class description.\n *          (Never matches, if the class description reaches until the\n *          end of the string without a ].) If the first character of\n *          the class description is ^ or !, the sense of the description\n *          is reversed.  The rest of the class description is a list of\n *          single characters or pairs of characters separated by -. Any\n *          of those characters can have a backslash in front of them,\n *          which is ignored; this lets you use the characters ] and -\n *          in the character class, as well as ^ and ! at the\n *          beginning.  The pattern matches a single character if it\n *          is one of the listed characters or falls into one of the\n *          listed ranges (inclusive, case sensitive).  Ranges with\n *          the first character larger than the second are legal but\n *          never match. Edge cases: [] never matches, and [^] and [!]\n *          always match without consuming a character.\n * \n * Note that these patterns attempt to match the entire string, not\n * just find a substring matching the pattern.\n *\n * @param pattern The pattern to match to\n * @param strings The string we are trying to match\n * @param flags flags to use in the match.  Bitwise OR of:\n * <pre>\n *              APR_FNM_NOESCAPE       Disable backslash escaping\n *              APR_FNM_PATHNAME       Slash must be matched by slash\n *              APR_FNM_PERIOD         Period must be matched by period\n *              APR_FNM_CASE_BLIND     Compare characters case-insensitively.\n * </pre>\n */\n\nAPR_DECLARE(apr_status_t) apr_fnmatch(const char *pattern, \n                                      const char *strings, int flags);\n\n/**\n * Determine if the given pattern is a regular expression.\n * @param pattern The pattern to search for glob characters.\n * @return non-zero if pattern has any glob characters in it\n */\nAPR_DECLARE(int) apr_fnmatch_test(const char *pattern);\n\n/**\n * Find all files that match a specified pattern in a directory.\n * @param dir_pattern The pattern to use for finding files, appended\n * to the search directory.  The pattern is anything following the\n * final forward or backward slash in the parameter.  If no slash\n * is found, the current directory is searched.\n * @param result Array to use when storing the results\n * @param p The pool to use.\n * @return APR_SUCCESS if no processing errors occurred, APR error\n * code otherwise\n * @remark The returned array may be empty even if APR_SUCCESS was\n * returned.\n */\nAPR_DECLARE(apr_status_t) apr_match_glob(const char *dir_pattern, \n                                         apr_array_header_t **result,\n                                         apr_pool_t *p);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* !_APR_FNMATCH_H_ */\n"
  },
  {
    "path": "third_party/include/apr/apr_general.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_GENERAL_H\n#define APR_GENERAL_H\n\n/**\n * @file apr_general.h\n * This is collection of oddballs that didn't fit anywhere else,\n * and might move to more appropriate headers with the release\n * of APR 1.0.\n * @brief APR Miscellaneous library routines\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n\n#if APR_HAVE_SIGNAL_H\n#include <signal.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_general Miscellaneous library routines\n * @ingroup APR \n * This is collection of oddballs that didn't fit anywhere else,\n * and might move to more appropriate headers with the release\n * of APR 1.0.\n * @{\n */\n\n/** FALSE */\n#ifndef FALSE\n#define FALSE 0\n#endif\n/** TRUE */\n#ifndef TRUE\n#define TRUE (!FALSE)\n#endif\n\n/** a space */\n#define APR_ASCII_BLANK  '\\040'\n/** a carrige return */\n#define APR_ASCII_CR     '\\015'\n/** a line feed */\n#define APR_ASCII_LF     '\\012'\n/** a tab */\n#define APR_ASCII_TAB    '\\011'\n\n/** signal numbers typedef */\ntypedef int               apr_signum_t;\n\n/**\n * Finding offsets of elements within structures.\n * Taken from the X code... they've sweated portability of this stuff\n * so we don't have to.  Sigh...\n * @param p_type pointer type name\n * @param field  data field within the structure pointed to\n * @return offset\n */\n\n#if defined(CRAY) || (defined(__arm) && !(defined(LINUX) || defined(__FreeBSD__)))\n#ifdef __STDC__\n#define APR_OFFSET(p_type,field) _Offsetof(p_type,field)\n#else\n#ifdef CRAY2\n#define APR_OFFSET(p_type,field) \\\n        (sizeof(int)*((unsigned int)&(((p_type)NULL)->field)))\n\n#else /* !CRAY2 */\n\n#define APR_OFFSET(p_type,field) ((unsigned int)&(((p_type)NULL)->field))\n\n#endif /* !CRAY2 */\n#endif /* __STDC__ */\n#else /* ! (CRAY || __arm) */\n\n#define APR_OFFSET(p_type,field) \\\n        ((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))\n\n#endif /* !CRAY */\n\n/**\n * Finding offsets of elements within structures.\n * @param s_type structure type name\n * @param field  data field within the structure\n * @return offset\n */\n#if defined(offsetof) && !defined(__cplusplus)\n#define APR_OFFSETOF(s_type,field) offsetof(s_type,field)\n#else\n#define APR_OFFSETOF(s_type,field) APR_OFFSET(s_type*,field)\n#endif\n\n#ifndef DOXYGEN\n\n/* A couple of prototypes for functions in case some platform doesn't \n * have it\n */\n#if (!APR_HAVE_STRCASECMP) && (APR_HAVE_STRICMP) \n#define strcasecmp(s1, s2) stricmp(s1, s2)\n#elif (!APR_HAVE_STRCASECMP)\nint strcasecmp(const char *a, const char *b);\n#endif\n\n#if (!APR_HAVE_STRNCASECMP) && (APR_HAVE_STRNICMP)\n#define strncasecmp(s1, s2, n) strnicmp(s1, s2, n)\n#elif (!APR_HAVE_STRNCASECMP)\nint strncasecmp(const char *a, const char *b, size_t n);\n#endif\n\n#endif\n\n/**\n * Alignment macros\n */\n\n/* APR_ALIGN() is only to be used to align on a power of 2 boundary */\n#define APR_ALIGN(size, boundary) \\\n    (((size) + ((boundary) - 1)) & ~((boundary) - 1))\n\n/** Default alignment */\n#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)\n\n\n/**\n * String and memory functions\n */\n\n/* APR_STRINGIFY is defined here, and also in apr_release.h, so wrap it */\n#ifndef APR_STRINGIFY\n/** Properly quote a value as a string in the C preprocessor */\n#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)\n/** Helper macro for APR_STRINGIFY */\n#define APR_STRINGIFY_HELPER(n) #n\n#endif\n\n#if (!APR_HAVE_MEMMOVE)\n#define memmove(a,b,c) bcopy(b,a,c)\n#endif\n\n#if (!APR_HAVE_MEMCHR)\nvoid *memchr(const void *s, int c, size_t n);\n#endif\n\n/** @} */\n\n/**\n * @defgroup apr_library Library initialization and termination\n * @{\n */\n\n/**\n * Setup any APR internal data structures.  This MUST be the first function \n * called for any APR library. It is safe to call apr_initialize several\n * times as long as apr_terminate is called the same number of times.\n * @remark See apr_app_initialize if this is an application, rather than\n * a library consumer of apr.\n */\nAPR_DECLARE(apr_status_t) apr_initialize(void);\n\n/**\n * Set up an application with normalized argc, argv (and optionally env) in\n * order to deal with platform-specific oddities, such as Win32 services,\n * code pages and signals.  This must be the first function called for any\n * APR program.\n * @param argc Pointer to the argc that may be corrected\n * @param argv Pointer to the argv that may be corrected\n * @param env Pointer to the env that may be corrected, may be NULL\n * @remark See apr_initialize if this is a library consumer of apr.\n * Otherwise, this call is identical to apr_initialize, and must be closed\n * with a call to apr_terminate at the end of program execution.\n */\nAPR_DECLARE(apr_status_t) apr_app_initialize(int *argc, \n                                             char const * const * *argv, \n                                             char const * const * *env);\n\n/**\n * Tear down any APR internal data structures which aren't torn down \n * automatically. apr_terminate must be called once for every call to\n * apr_initialize() or apr_app_initialize().\n * @remark An APR program must call this function at termination once it \n *         has stopped using APR services.  The APR developers suggest using\n *         atexit to ensure this is called.  When using APR from a language\n *         other than C that has problems with the calling convention, use\n *         apr_terminate2() instead.\n */\nAPR_DECLARE_NONSTD(void) apr_terminate(void);\n\n/**\n * Tear down any APR internal data structures which aren't torn down \n * automatically, same as apr_terminate\n * @remark An APR program must call either the apr_terminate or apr_terminate2 \n *         function once it it has finished using APR services.  The APR \n *         developers suggest using atexit(apr_terminate) to ensure this is done.\n *         apr_terminate2 exists to allow non-c language apps to tear down apr, \n *         while apr_terminate is recommended from c language applications.\n */\nAPR_DECLARE(void) apr_terminate2(void);\n\n/** @} */\n\n/**\n * @defgroup apr_random Random Functions\n * @{\n */\n\n#if APR_HAS_RANDOM || defined(DOXYGEN)\n\n/* TODO: I'm not sure this is the best place to put this prototype...*/\n/**\n * Generate random bytes.\n * @param buf Buffer to fill with random bytes\n * @param length Length of buffer in bytes\n */\nAPR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char * buf, \n                                                    apr_size_t length);\n\n#endif\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_GENERAL_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_getopt.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_GETOPT_H\n#define APR_GETOPT_H\n\n/**\n * @file apr_getopt.h\n * @brief APR Command Arguments (getopt)\n */\n\n#include \"apr_pools.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_getopt Command Argument Parsing\n * @ingroup APR \n * @{\n */\n\n/** \n * An @c apr_getopt_t error callback function.\n *\n * @a arg is this @c apr_getopt_t's @c errarg member.\n */\ntypedef void (apr_getopt_err_fn_t)(void *arg, const char *err, ...);\n\n/** @see apr_getopt_t */\ntypedef struct apr_getopt_t apr_getopt_t;\n\n/**\n * Structure to store command line argument information.\n */ \nstruct apr_getopt_t {\n    /** context for processing */\n    apr_pool_t *cont;\n    /** function to print error message (NULL == no messages) */\n    apr_getopt_err_fn_t *errfn;\n    /** user defined first arg to pass to error message  */\n    void *errarg;\n    /** index into parent argv vector */\n    int ind;\n    /** character checked for validity */\n    int opt;\n    /** reset getopt */\n    int reset;\n    /** count of arguments */\n    int argc;\n    /** array of pointers to arguments */\n    const char **argv;\n    /** argument associated with option */\n    char const* place;\n    /** set to nonzero to support interleaving options with regular args */\n    int interleave;\n    /** start of non-option arguments skipped for interleaving */\n    int skip_start;\n    /** end of non-option arguments skipped for interleaving */\n    int skip_end;\n};\n\n/** @see apr_getopt_option_t */\ntypedef struct apr_getopt_option_t apr_getopt_option_t;\n\n/**\n * Structure used to describe options that getopt should search for.\n */\nstruct apr_getopt_option_t {\n    /** long option name, or NULL if option has no long name */\n    const char *name;\n    /** option letter, or a value greater than 255 if option has no letter */\n    int optch;\n    /** nonzero if option takes an argument */\n    int has_arg;\n    /** a description of the option */\n    const char *description;\n};\n\n/**\n * Initialize the arguments for parsing by apr_getopt().\n * @param os   The options structure created for apr_getopt()\n * @param cont The pool to operate on\n * @param argc The number of arguments to parse\n * @param argv The array of arguments to parse\n * @remark Arguments 3 and 4 are most commonly argc and argv from main(argc, argv)\n * The (*os)->errfn is initialized to fprintf(stderr... but may be overridden.\n */\nAPR_DECLARE(apr_status_t) apr_getopt_init(apr_getopt_t **os, apr_pool_t *cont,\n                                      int argc, const char * const *argv);\n\n/**\n * Parse the options initialized by apr_getopt_init().\n * @param os     The apr_opt_t structure returned by apr_getopt_init()\n * @param opts   A string of characters that are acceptable options to the \n *               program.  Characters followed by \":\" are required to have an \n *               option associated\n * @param option_ch  The next option character parsed\n * @param option_arg The argument following the option character:\n * @return There are four potential status values on exit. They are:\n * <PRE>\n *             APR_EOF      --  No more options to parse\n *             APR_BADCH    --  Found a bad option character\n *             APR_BADARG   --  No argument followed the option flag\n *             APR_SUCCESS  --  The next option was found.\n * </PRE>\n */\nAPR_DECLARE(apr_status_t) apr_getopt(apr_getopt_t *os, const char *opts, \n                                     char *option_ch, const char **option_arg);\n\n/**\n * Parse the options initialized by apr_getopt_init(), accepting long\n * options beginning with \"--\" in addition to single-character\n * options beginning with \"-\".\n * @param os     The apr_getopt_t structure created by apr_getopt_init()\n * @param opts   A pointer to a list of apr_getopt_option_t structures, which\n *               can be initialized with { \"name\", optch, has_args }.  has_args\n *               is nonzero if the option requires an argument.  A structure\n *               with an optch value of 0 terminates the list.\n * @param option_ch  Receives the value of \"optch\" from the apr_getopt_option_t\n *                   structure corresponding to the next option matched.\n * @param option_arg Receives the argument following the option, if any.\n * @return There are four potential status values on exit.   They are:\n * <PRE>\n *             APR_EOF      --  No more options to parse\n *             APR_BADCH    --  Found a bad option character\n *             APR_BADARG   --  No argument followed the option flag\n *             APR_SUCCESS  --  The next option was found.\n * </PRE>\n * When APR_SUCCESS is returned, os->ind gives the index of the first\n * non-option argument.  On error, a message will be printed to stdout unless\n * os->err is set to 0.  If os->interleave is set to nonzero, options can come\n * after arguments, and os->argv will be permuted to leave non-option arguments\n * at the end (the original argv is unaffected).\n */\nAPR_DECLARE(apr_status_t) apr_getopt_long(apr_getopt_t *os,\n\t\t\t\t\t  const apr_getopt_option_t *opts,\n\t\t\t\t\t  int *option_ch,\n                                          const char **option_arg);\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_GETOPT_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_global_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_GLOBAL_MUTEX_H\n#define APR_GLOBAL_MUTEX_H\n\n/**\n * @file apr_global_mutex.h\n * @brief APR Global Locking Routines\n */\n\n#include \"apr.h\"\n#include \"apr_proc_mutex.h\"    /* only for apr_lockmech_e */\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n#if APR_PROC_MUTEX_IS_GLOBAL\n#include \"apr_proc_mutex.h\"\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup APR_GlobalMutex Global Locking Routines\n * @ingroup APR \n * @{\n */\n\n#if !APR_PROC_MUTEX_IS_GLOBAL || defined(DOXYGEN)\n\n/** Opaque global mutex structure. */\ntypedef struct apr_global_mutex_t apr_global_mutex_t;\n\n/*   Function definitions */\n\n/**\n * Create and initialize a mutex that can be used to synchronize both\n * processes and threads. Note: There is considerable overhead in using\n * this API if only cross-process or cross-thread mutual exclusion is\n * required. See apr_proc_mutex.h and apr_thread_mutex.h for more\n * specialized lock routines.\n * @param mutex the memory address where the newly created mutex will be\n *        stored.\n * @param fname A file name to use if the lock mechanism requires one.  This\n *        argument should always be provided.  The lock code itself will\n *        determine if it should be used.\n * @param mech The mechanism to use for the interprocess lock, if any; one of\n * <PRE>\n *            APR_LOCK_FCNTL\n *            APR_LOCK_FLOCK\n *            APR_LOCK_SYSVSEM\n *            APR_LOCK_POSIXSEM\n *            APR_LOCK_PROC_PTHREAD\n *            APR_LOCK_DEFAULT     pick the default mechanism for the platform\n * </PRE>\n * @param pool the pool from which to allocate the mutex.\n * @warning Check APR_HAS_foo_SERIALIZE defines to see if the platform supports\n *          APR_LOCK_foo.  Only APR_LOCK_DEFAULT is portable.\n */\nAPR_DECLARE(apr_status_t) apr_global_mutex_create(apr_global_mutex_t **mutex,\n                                                  const char *fname,\n                                                  apr_lockmech_e mech,\n                                                  apr_pool_t *pool);\n\n/**\n * Re-open a mutex in a child process.\n * @param mutex The newly re-opened mutex structure.\n * @param fname A file name to use if the mutex mechanism requires one.  This\n *              argument should always be provided.  The mutex code itself will\n *              determine if it should be used.  This filename should be the \n *              same one that was passed to apr_global_mutex_create().\n * @param pool The pool to operate on.\n * @remark This function must be called to maintain portability, even\n *         if the underlying lock mechanism does not require it.\n */\nAPR_DECLARE(apr_status_t) apr_global_mutex_child_init(\n                              apr_global_mutex_t **mutex,\n                              const char *fname,\n                              apr_pool_t *pool);\n\n/**\n * Acquire the lock for the given mutex. If the mutex is already locked,\n * the current thread will be put to sleep until the lock becomes available.\n * @param mutex the mutex on which to acquire the lock.\n */\nAPR_DECLARE(apr_status_t) apr_global_mutex_lock(apr_global_mutex_t *mutex);\n\n/**\n * Attempt to acquire the lock for the given mutex. If the mutex has already\n * been acquired, the call returns immediately with APR_EBUSY. Note: it\n * is important that the APR_STATUS_IS_EBUSY(s) macro be used to determine\n * if the return value was APR_EBUSY, for portability reasons.\n * @param mutex the mutex on which to attempt the lock acquiring.\n */\nAPR_DECLARE(apr_status_t) apr_global_mutex_trylock(apr_global_mutex_t *mutex);\n\n/**\n * Release the lock for the given mutex.\n * @param mutex the mutex from which to release the lock.\n */\nAPR_DECLARE(apr_status_t) apr_global_mutex_unlock(apr_global_mutex_t *mutex);\n\n/**\n * Destroy the mutex and free the memory associated with the lock.\n * @param mutex the mutex to destroy.\n */\nAPR_DECLARE(apr_status_t) apr_global_mutex_destroy(apr_global_mutex_t *mutex);\n\n/**\n * Return the name of the lockfile for the mutex, or NULL\n * if the mutex doesn't use a lock file\n */\nAPR_DECLARE(const char *) apr_global_mutex_lockfile(apr_global_mutex_t *mutex);\n\n/**\n * Display the name of the mutex, as it relates to the actual method used\n * for the underlying apr_proc_mutex_t, if any.  NULL is returned if\n * there is no underlying apr_proc_mutex_t.\n * @param mutex the name of the mutex\n */\nAPR_DECLARE(const char *) apr_global_mutex_name(apr_global_mutex_t *mutex);\n\n/**\n * Get the pool used by this global_mutex.\n * @return apr_pool_t the pool\n */\nAPR_POOL_DECLARE_ACCESSOR(global_mutex);\n\n#else /* APR_PROC_MUTEX_IS_GLOBAL */\n\n/* Some platforms [e.g. Win32] have cross process locks that are truly\n * global locks, since there isn't the concept of cross-process locks.\n * Define these platforms in terms of an apr_proc_mutex_t.\n */\n\n#define apr_global_mutex_t          apr_proc_mutex_t\n#define apr_global_mutex_create     apr_proc_mutex_create\n#define apr_global_mutex_child_init apr_proc_mutex_child_init\n#define apr_global_mutex_lock       apr_proc_mutex_lock\n#define apr_global_mutex_trylock    apr_proc_mutex_trylock\n#define apr_global_mutex_unlock     apr_proc_mutex_unlock\n#define apr_global_mutex_destroy    apr_proc_mutex_destroy\n#define apr_global_mutex_lockfile   apr_proc_mutex_lockfile\n#define apr_global_mutex_name       apr_proc_mutex_name\n#define apr_global_mutex_pool_get   apr_proc_mutex_pool_get\n\n#endif\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ndef APR_GLOBAL_MUTEX_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_hash.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_HASH_H\n#define APR_HASH_H\n\n/**\n * @file apr_hash.h\n * @brief APR Hash Tables\n */\n\n#include \"apr_pools.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @defgroup apr_hash Hash Tables\n * @ingroup APR \n * @{\n */\n\n/**\n * When passing a key to apr_hash_set or apr_hash_get, this value can be\n * passed to indicate a string-valued key, and have apr_hash compute the\n * length automatically.\n *\n * @remark apr_hash will use strlen(key) for the length. The NUL terminator\n *         is not included in the hash value (why throw a constant in?).\n *         Since the hash table merely references the provided key (rather\n *         than copying it), apr_hash_this() will return the NUL-term'd key.\n */\n#define APR_HASH_KEY_STRING     (-1)\n\n/**\n * Abstract type for hash tables.\n */\ntypedef struct apr_hash_t apr_hash_t;\n\n/**\n * Abstract type for scanning hash tables.\n */\ntypedef struct apr_hash_index_t apr_hash_index_t;\n\n/**\n * Callback functions for calculating hash values.\n * @param key The key.\n * @param klen The length of the key, or APR_HASH_KEY_STRING to use the string \n *             length. If APR_HASH_KEY_STRING then returns the actual key length.\n */\ntypedef unsigned int (*apr_hashfunc_t)(const char *key, apr_ssize_t *klen);\n\n/**\n * The default hash function.\n */\nAPR_DECLARE_NONSTD(unsigned int) apr_hashfunc_default(const char *key,\n                                                      apr_ssize_t *klen);\n\n/**\n * Create a hash table.\n * @param pool The pool to allocate the hash table out of\n * @return The hash table just created\n  */\nAPR_DECLARE(apr_hash_t *) apr_hash_make(apr_pool_t *pool);\n\n/**\n * Create a hash table with a custom hash function\n * @param pool The pool to allocate the hash table out of\n * @param hash_func A custom hash function.\n * @return The hash table just created\n  */\nAPR_DECLARE(apr_hash_t *) apr_hash_make_custom(apr_pool_t *pool, \n                                               apr_hashfunc_t hash_func);\n\n/**\n * Make a copy of a hash table\n * @param pool The pool from which to allocate the new hash table\n * @param h The hash table to clone\n * @return The hash table just created\n * @remark Makes a shallow copy\n */\nAPR_DECLARE(apr_hash_t *) apr_hash_copy(apr_pool_t *pool,\n                                        const apr_hash_t *h);\n\n/**\n * Associate a value with a key in a hash table.\n * @param ht The hash table\n * @param key Pointer to the key\n * @param klen Length of the key. Can be APR_HASH_KEY_STRING to use the string length.\n * @param val Value to associate with the key\n * @remark If the value is NULL the hash entry is deleted.\n */\nAPR_DECLARE(void) apr_hash_set(apr_hash_t *ht, const void *key,\n                               apr_ssize_t klen, const void *val);\n\n/**\n * Look up the value associated with a key in a hash table.\n * @param ht The hash table\n * @param key Pointer to the key\n * @param klen Length of the key. Can be APR_HASH_KEY_STRING to use the string length.\n * @return Returns NULL if the key is not present.\n */\nAPR_DECLARE(void *) apr_hash_get(apr_hash_t *ht, const void *key,\n                                 apr_ssize_t klen);\n\n/**\n * Start iterating over the entries in a hash table.\n * @param p The pool to allocate the apr_hash_index_t iterator. If this\n *          pool is NULL, then an internal, non-thread-safe iterator is used.\n * @param ht The hash table\n * @return The iteration state\n * @remark  There is no restriction on adding or deleting hash entries during\n * an iteration (although the results may be unpredictable unless all you do\n * is delete the current entry) and multiple iterations can be in\n * progress at the same time.\n *\n * @par Example:\n *\n * @code\n * int sum_values(apr_pool_t *p, apr_hash_t *ht)\n * {\n *     apr_hash_index_t *hi;\n *     void *val;\n *     int sum = 0;\n *     for (hi = apr_hash_first(p, ht); hi; hi = apr_hash_next(hi)) {\n *         apr_hash_this(hi, NULL, NULL, &val);\n *         sum += *(int *)val;\n *     }\n *     return sum;\n * }\n * @endcode\n */\nAPR_DECLARE(apr_hash_index_t *) apr_hash_first(apr_pool_t *p, apr_hash_t *ht);\n\n/**\n * Continue iterating over the entries in a hash table.\n * @param hi The iteration state\n * @return a pointer to the updated iteration state.  NULL if there are no more  \n *         entries.\n */\nAPR_DECLARE(apr_hash_index_t *) apr_hash_next(apr_hash_index_t *hi);\n\n/**\n * Get the current entry's details from the iteration state.\n * @param hi The iteration state\n * @param key Return pointer for the pointer to the key.\n * @param klen Return pointer for the key length.\n * @param val Return pointer for the associated value.\n * @remark The return pointers should point to a variable that will be set to the\n *         corresponding data, or they may be NULL if the data isn't interesting.\n */\nAPR_DECLARE(void) apr_hash_this(apr_hash_index_t *hi, const void **key, \n                                apr_ssize_t *klen, void **val);\n\n/**\n * Get the current entry's key from the iteration state.\n * @param hi The iteration state\n * @return The pointer to the key\n */\nAPR_DECLARE(const void*) apr_hash_this_key(apr_hash_index_t *hi);\n\n/**\n * Get the current entry's key length from the iteration state.\n * @param hi The iteration state\n * @return The key length\n */\nAPR_DECLARE(apr_ssize_t) apr_hash_this_key_len(apr_hash_index_t *hi);\n\n/**\n * Get the current entry's value from the iteration state.\n * @param hi The iteration state\n * @return The pointer to the value\n */\nAPR_DECLARE(void*) apr_hash_this_val(apr_hash_index_t *hi);\n\n/**\n * Get the number of key/value pairs in the hash table.\n * @param ht The hash table\n * @return The number of key/value pairs in the hash table.\n */\nAPR_DECLARE(unsigned int) apr_hash_count(apr_hash_t *ht);\n\n/**\n * Clear any key/value pairs in the hash table.\n * @param ht The hash table\n */\nAPR_DECLARE(void) apr_hash_clear(apr_hash_t *ht);\n\n/**\n * Merge two hash tables into one new hash table. The values of the overlay\n * hash override the values of the base if both have the same key.  Both\n * hash tables must use the same hash function.\n * @param p The pool to use for the new hash table\n * @param overlay The table to add to the initial table\n * @param base The table that represents the initial values of the new table\n * @return A new hash table containing all of the data from the two passed in\n */\nAPR_DECLARE(apr_hash_t *) apr_hash_overlay(apr_pool_t *p,\n                                           const apr_hash_t *overlay, \n                                           const apr_hash_t *base);\n\n/**\n * Merge two hash tables into one new hash table. If the same key\n * is present in both tables, call the supplied merge function to\n * produce a merged value for the key in the new table.  Both\n * hash tables must use the same hash function.\n * @param p The pool to use for the new hash table\n * @param h1 The first of the tables to merge\n * @param h2 The second of the tables to merge\n * @param merger A callback function to merge values, or NULL to\n *  make values from h1 override values from h2 (same semantics as\n *  apr_hash_overlay())\n * @param data Client data to pass to the merger function\n * @return A new hash table containing all of the data from the two passed in\n */\nAPR_DECLARE(apr_hash_t *) apr_hash_merge(apr_pool_t *p,\n                                         const apr_hash_t *h1,\n                                         const apr_hash_t *h2,\n                                         void * (*merger)(apr_pool_t *p,\n                                                     const void *key,\n                                                     apr_ssize_t klen,\n                                                     const void *h1_val,\n                                                     const void *h2_val,\n                                                     const void *data),\n                                         const void *data);\n\n/**\n * Declaration prototype for the iterator callback function of apr_hash_do().\n *\n * @param rec The data passed as the first argument to apr_hash_[v]do()\n * @param key The key from this iteration of the hash table\n * @param klen The key length from this iteration of the hash table\n * @param value The value from this iteration of the hash table\n * @remark Iteration continues while this callback function returns non-zero.\n * To export the callback function for apr_hash_do() it must be declared \n * in the _NONSTD convention.\n */\ntypedef int (apr_hash_do_callback_fn_t)(void *rec, const void *key,\n                                                   apr_ssize_t klen,\n                                                   const void *value);\n\n/** \n * Iterate over a hash table running the provided function once for every\n * element in the hash table. The @param comp function will be invoked for\n * every element in the hash table.\n *\n * @param comp The function to run\n * @param rec The data to pass as the first argument to the function\n * @param ht The hash table to iterate over\n * @return FALSE if one of the comp() iterations returned zero; TRUE if all\n *            iterations returned non-zero\n * @see apr_hash_do_callback_fn_t\n */\nAPR_DECLARE(int) apr_hash_do(apr_hash_do_callback_fn_t *comp,\n                             void *rec, const apr_hash_t *ht);\n\n/**\n * Get a pointer to the pool which the hash table was created in\n */\nAPR_POOL_DECLARE_ACCESSOR(hash);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\t/* !APR_HASH_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_inherit.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_INHERIT_H\n#define APR_INHERIT_H\n\n/**\n * @file apr_inherit.h \n * @brief APR File Handle Inheritance Helpers\n * @remark This internal header includes internal declaration helpers \n * for other headers to declare apr_foo_inherit_[un]set functions.\n */\n\n/**\n * Prototype for type-specific declarations of apr_foo_inherit_set \n * functions.  \n * @remark Doxygen unwraps this macro (via doxygen.conf) to provide \n * actual help for each specific occurrence of apr_foo_inherit_set.\n * @remark the linkage is specified for APR. It would be possible to expand\n *       the macros to support other linkages.\n */\n#define APR_DECLARE_INHERIT_SET(type) \\\n    APR_DECLARE(apr_status_t) apr_##type##_inherit_set( \\\n                                          apr_##type##_t *the##type)\n\n/**\n * Prototype for type-specific declarations of apr_foo_inherit_unset \n * functions.  \n * @remark Doxygen unwraps this macro (via doxygen.conf) to provide \n * actual help for each specific occurrence of apr_foo_inherit_unset.\n * @remark the linkage is specified for APR. It would be possible to expand\n *       the macros to support other linkages.\n */\n#define APR_DECLARE_INHERIT_UNSET(type) \\\n    APR_DECLARE(apr_status_t) apr_##type##_inherit_unset( \\\n                                          apr_##type##_t *the##type)\n\n#endif\t/* ! APR_INHERIT_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_lib.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_LIB_H\n#define APR_LIB_H\n\n/**\n * @file apr_lib.h\n * This is collection of oddballs that didn't fit anywhere else,\n * and might move to more appropriate headers with the release\n * of APR 1.0.\n * @brief APR general purpose library routines\n */\n\n#include \"apr.h\"\n#include \"apr_errno.h\"\n\n#if APR_HAVE_CTYPE_H\n#include <ctype.h>\n#endif\n#if APR_HAVE_STDARG_H\n#include <stdarg.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_lib General Purpose Library Routines\n * @ingroup APR \n * This is collection of oddballs that didn't fit anywhere else,\n * and might move to more appropriate headers with the release\n * of APR 1.0.\n * @{\n */\n\n/** A constant representing a 'large' string. */\n#define HUGE_STRING_LEN 8192\n\n/*\n * Define the structures used by the APR general-purpose library.\n */\n\n/** @see apr_vformatter_buff_t */\ntypedef struct apr_vformatter_buff_t apr_vformatter_buff_t;\n\n/**\n * Structure used by the variable-formatter routines.\n */\nstruct apr_vformatter_buff_t {\n    /** The current position */\n    char *curpos;\n    /** The end position of the format string */\n    char *endpos;\n};\n\n/**\n * return the final element of the pathname\n * @param pathname The path to get the final element of\n * @return the final element of the path\n * @remark\n * <PRE>\n * For example:\n *                 \"/foo/bar/gum\"    -> \"gum\"\n *                 \"/foo/bar/gum/\"   -> \"\"\n *                 \"gum\"             -> \"gum\"\n *                 \"bs\\\\path\\\\stuff\" -> \"stuff\"\n * </PRE>\n */\nAPR_DECLARE(const char *) apr_filepath_name_get(const char *pathname);\n\n/**\n * apr_killpg\n * Small utility macros to make things easier to read.  Not usually a\n * goal, to be sure..\n */\n\n#ifdef WIN32\n#define apr_killpg(x, y)\n#else /* WIN32 */\n#ifdef NO_KILLPG\n#define apr_killpg(x, y)        (kill (-(x), (y)))\n#else /* NO_KILLPG */\n#define apr_killpg(x, y)        (killpg ((x), (y)))\n#endif /* NO_KILLPG */\n#endif /* WIN32 */\n\n/**\n * apr_vformatter() is a generic printf-style formatting routine\n * with some extensions.\n * @param flush_func The function to call when the buffer is full\n * @param c The buffer to write to\n * @param fmt The format string\n * @param ap The arguments to use to fill out the format string.\n *\n * @remark\n * <PRE>\n * The extensions are:\n *\n * - %%pA takes a struct in_addr *, and prints it as a.b.c.d\n * - %%pI takes an apr_sockaddr_t * and prints it as a.b.c.d:port or\n * \\[ipv6-address\\]:port\n * - %%pT takes an apr_os_thread_t * and prints it in decimal\n * ('0' is printed if !APR_HAS_THREADS)\n * - %%pt takes an apr_os_thread_t * and prints it in hexadecimal\n * ('0' is printed if !APR_HAS_THREADS)\n * - %%pm takes an apr_status_t * and prints the appropriate error\n * string (from apr_strerror) corresponding to that error code.\n * - %%pp takes a void * and outputs it in hex\n * - %%pB takes a apr_uint32_t * as bytes and outputs it's apr_strfsize\n * - %%pF same as above, but takes a apr_off_t *\n * - %%pS same as above, but takes a apr_size_t *\n *\n * %%pA, %%pI, %%pT, %%pp are available from APR 1.0.0 onwards (and in 0.9.x).\n * %%pt is only available from APR 1.2.0 onwards.\n * %%pm, %%pB, %%pF and %%pS are only available from APR 1.3.0 onwards.\n *\n * The %%p hacks are to force gcc's printf warning code to skip\n * over a pointer argument without complaining.  This does\n * mean that the ANSI-style %%p (output a void * in hex format) won't\n * work as expected at all, but that seems to be a fair trade-off\n * for the increased robustness of having printf-warnings work.\n *\n * Additionally, apr_vformatter allows for arbitrary output methods\n * using the apr_vformatter_buff and flush_func.\n *\n * The apr_vformatter_buff has two elements curpos and endpos.\n * curpos is where apr_vformatter will write the next byte of output.\n * It proceeds writing output to curpos, and updating curpos, until\n * either the end of output is reached, or curpos == endpos (i.e. the\n * buffer is full).\n *\n * If the end of output is reached, apr_vformatter returns the\n * number of bytes written.\n *\n * When the buffer is full, the flush_func is called.  The flush_func\n * can return -1 to indicate that no further output should be attempted,\n * and apr_vformatter will return immediately with -1.  Otherwise\n * the flush_func should flush the buffer in whatever manner is\n * appropriate, re apr_pool_t nitialize curpos and endpos, and return 0.\n *\n * Note that flush_func is only invoked as a result of attempting to\n * write another byte at curpos when curpos >= endpos.  So for\n * example, it's possible when the output exactly matches the buffer\n * space available that curpos == endpos will be true when\n * apr_vformatter returns.\n *\n * apr_vformatter does not call out to any other code, it is entirely\n * self-contained.  This allows the callers to do things which are\n * otherwise \"unsafe\".  For example, apr_psprintf uses the \"scratch\"\n * space at the unallocated end of a block, and doesn't actually\n * complete the allocation until apr_vformatter returns.  apr_psprintf\n * would be completely broken if apr_vformatter were to call anything\n * that used this same pool.  Similarly http_bprintf() uses the \"scratch\"\n * space at the end of its output buffer, and doesn't actually note\n * that the space is in use until it either has to flush the buffer\n * or until apr_vformatter returns.\n * </PRE>\n */\nAPR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *b),\n\t\t\t        apr_vformatter_buff_t *c, const char *fmt,\n\t\t\t        va_list ap);\n\n/**\n * Display a prompt and read in the password from stdin.\n * @param prompt The prompt to display\n * @param pwbuf Buffer to store the password\n * @param bufsize The length of the password buffer.\n * @remark If the password entered must be truncated to fit in\n * the provided buffer, APR_ENAMETOOLONG will be returned.\n * Note that the bufsize paramater is passed by reference for no\n * reason; its value will never be modified by the apr_password_get()\n * function.\n */\nAPR_DECLARE(apr_status_t) apr_password_get(const char *prompt, char *pwbuf, \n                                           apr_size_t *bufsize);\n\n/** @} */\n\n/**\n * @defgroup apr_ctype ctype functions\n * These macros allow correct support of 8-bit characters on systems which\n * support 8-bit characters.  Pretty dumb how the cast is required, but\n * that's legacy libc for ya.  These new macros do not support EOF like\n * the standard macros do.  Tough.\n * @{\n */\n/** @see isalnum */\n#define apr_isalnum(c) (isalnum(((unsigned char)(c))))\n/** @see isalpha */\n#define apr_isalpha(c) (isalpha(((unsigned char)(c))))\n/** @see iscntrl */\n#define apr_iscntrl(c) (iscntrl(((unsigned char)(c))))\n/** @see isdigit */\n#define apr_isdigit(c) (isdigit(((unsigned char)(c))))\n/** @see isgraph */\n#define apr_isgraph(c) (isgraph(((unsigned char)(c))))\n/** @see islower*/\n#define apr_islower(c) (islower(((unsigned char)(c))))\n/** @see isascii */\n#ifdef isascii\n#define apr_isascii(c) (isascii(((unsigned char)(c))))\n#else\n#define apr_isascii(c) (((c) & ~0x7f)==0)\n#endif\n/** @see isprint */\n#define apr_isprint(c) (isprint(((unsigned char)(c))))\n/** @see ispunct */\n#define apr_ispunct(c) (ispunct(((unsigned char)(c))))\n/** @see isspace */\n#define apr_isspace(c) (isspace(((unsigned char)(c))))\n/** @see isupper */\n#define apr_isupper(c) (isupper(((unsigned char)(c))))\n/** @see isxdigit */\n#define apr_isxdigit(c) (isxdigit(((unsigned char)(c))))\n/** @see tolower */\n#define apr_tolower(c) (tolower(((unsigned char)(c))))\n/** @see toupper */\n#define apr_toupper(c) (toupper(((unsigned char)(c))))\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\t/* ! APR_LIB_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_mmap.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_MMAP_H\n#define APR_MMAP_H\n\n/**\n * @file apr_mmap.h\n * @brief APR MMAP routines\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n#include \"apr_ring.h\"\n#include \"apr_file_io.h\"        /* for apr_file_t */\n\n#ifdef BEOS\n#include <kernel/OS.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_mmap MMAP (Memory Map) Routines\n * @ingroup APR \n * @{\n */\n\n/** MMap opened for reading */\n#define APR_MMAP_READ    1\n/** MMap opened for writing */\n#define APR_MMAP_WRITE   2\n\n/** @see apr_mmap_t */\ntypedef struct apr_mmap_t            apr_mmap_t;\n\n/**\n * @remark\n * As far as I can tell the only really sane way to store an MMAP is as a\n * void * and a length.  BeOS requires this area_id, but that's just a little\n * something extra.  I am exposing this type, because it doesn't make much\n * sense to keep it private, and opening it up makes some stuff easier in\n * Apache.\n */\n/** The MMAP structure */\nstruct apr_mmap_t {\n    /** The pool the mmap structure was allocated out of. */\n    apr_pool_t *cntxt;\n#ifdef BEOS\n    /** An area ID.  Only valid on BeOS */\n    area_id area;\n#endif\n#ifdef WIN32\n    /** The handle of the file mapping */\n    HANDLE mhandle;\n    /** The start of the real memory page area (mapped view) */\n    void *mv;\n    /** The physical start, size and offset */\n    apr_off_t  pstart;\n    apr_size_t psize;\n    apr_off_t  poffset;\n#endif\n    /** The start of the memory mapped area */\n    void *mm;\n    /** The amount of data in the mmap */\n    apr_size_t size;\n    /** ring of apr_mmap_t's that reference the same\n     * mmap'ed region; acts in place of a reference count */\n    APR_RING_ENTRY(apr_mmap_t) link;\n};\n\n#if APR_HAS_MMAP || defined(DOXYGEN)\n\n/** @def APR_MMAP_THRESHOLD \n * Files have to be at least this big before they're mmap()d.  This is to deal\n * with systems where the expense of doing an mmap() and an munmap() outweighs\n * the benefit for small files.  It shouldn't be set lower than 1.\n */\n#ifdef MMAP_THRESHOLD\n#  define APR_MMAP_THRESHOLD              MMAP_THRESHOLD\n#else\n#  ifdef SUNOS4\n#    define APR_MMAP_THRESHOLD            (8*1024)\n#  else\n#    define APR_MMAP_THRESHOLD            1\n#  endif /* SUNOS4 */\n#endif /* MMAP_THRESHOLD */\n\n/** @def APR_MMAP_LIMIT\n * Maximum size of MMap region\n */\n#ifdef MMAP_LIMIT\n#  define APR_MMAP_LIMIT                  MMAP_LIMIT\n#else\n#  define APR_MMAP_LIMIT                  (4*1024*1024)\n#endif /* MMAP_LIMIT */\n\n/** Can this file be MMaped */\n#define APR_MMAP_CANDIDATE(filelength) \\\n    ((filelength >= APR_MMAP_THRESHOLD) && (filelength < APR_MMAP_LIMIT))\n\n/*   Function definitions */\n\n/** \n * Create a new mmap'ed file out of an existing APR file.\n * @param newmmap The newly created mmap'ed file.\n * @param file The file to turn into an mmap.\n * @param offset The offset into the file to start the data pointer at.\n * @param size The size of the file\n * @param flag bit-wise or of:\n * <PRE>\n *          APR_MMAP_READ       MMap opened for reading\n *          APR_MMAP_WRITE      MMap opened for writing\n * </PRE>\n * @param cntxt The pool to use when creating the mmap.\n */\nAPR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **newmmap, \n                                          apr_file_t *file, apr_off_t offset,\n                                          apr_size_t size, apr_int32_t flag,\n                                          apr_pool_t *cntxt);\n\n/**\n * Duplicate the specified MMAP.\n * @param new_mmap The structure to duplicate into. \n * @param old_mmap The mmap to duplicate.\n * @param p The pool to use for new_mmap.\n */         \nAPR_DECLARE(apr_status_t) apr_mmap_dup(apr_mmap_t **new_mmap,\n                                       apr_mmap_t *old_mmap,\n                                       apr_pool_t *p);\n\n/**\n * Remove a mmap'ed.\n * @param mm The mmap'ed file.\n */\nAPR_DECLARE(apr_status_t) apr_mmap_delete(apr_mmap_t *mm);\n\n/** \n * Move the pointer into the mmap'ed file to the specified offset.\n * @param addr The pointer to the offset specified.\n * @param mm The mmap'ed file.\n * @param offset The offset to move to.\n */\nAPR_DECLARE(apr_status_t) apr_mmap_offset(void **addr, apr_mmap_t *mm, \n                                          apr_off_t offset);\n\n#endif /* APR_HAS_MMAP */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_MMAP_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_network_io.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_NETWORK_IO_H\n#define APR_NETWORK_IO_H\n/**\n * @file apr_network_io.h\n * @brief APR Network library\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_file_io.h\"\n#include \"apr_errno.h\"\n#include \"apr_inherit.h\" \n\n#if APR_HAVE_NETINET_IN_H\n#include <netinet/in.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_network_io Network Routines\n * @ingroup APR \n * @{\n */\n\n#ifndef APR_MAX_SECS_TO_LINGER\n/** Maximum seconds to linger */\n#define APR_MAX_SECS_TO_LINGER 30\n#endif\n\n#ifndef APRMAXHOSTLEN\n/** Maximum hostname length */\n#define APRMAXHOSTLEN 256\n#endif\n\n#ifndef APR_ANYADDR\n/** Default 'any' address */\n#define APR_ANYADDR \"0.0.0.0\"\n#endif\n\n/**\n * @defgroup apr_sockopt Socket option definitions\n * @{\n */\n#define APR_SO_LINGER        1    /**< Linger */\n#define APR_SO_KEEPALIVE     2    /**< Keepalive */\n#define APR_SO_DEBUG         4    /**< Debug */\n#define APR_SO_NONBLOCK      8    /**< Non-blocking IO */\n#define APR_SO_REUSEADDR     16   /**< Reuse addresses */\n#define APR_SO_SNDBUF        64   /**< Send buffer */\n#define APR_SO_RCVBUF        128  /**< Receive buffer */\n#define APR_SO_DISCONNECTED  256  /**< Disconnected */\n#define APR_TCP_NODELAY      512  /**< For SCTP sockets, this is mapped\n                                   * to STCP_NODELAY internally.\n                                   */\n#define APR_TCP_NOPUSH       1024 /**< No push */\n#define APR_RESET_NODELAY    2048 /**< This flag is ONLY set internally\n                                   * when we set APR_TCP_NOPUSH with\n                                   * APR_TCP_NODELAY set to tell us that\n                                   * APR_TCP_NODELAY should be turned on\n                                   * again when NOPUSH is turned off\n                                   */\n#define APR_INCOMPLETE_READ 4096  /**< Set on non-blocking sockets\n\t\t\t\t   * (timeout != 0) on which the\n\t\t\t\t   * previous read() did not fill a buffer\n\t\t\t\t   * completely.  the next apr_socket_recv() \n                                   * will first call select()/poll() rather than\n\t\t\t\t   * going straight into read().  (Can also\n\t\t\t\t   * be set by an application to force a\n\t\t\t\t   * select()/poll() call before the next\n\t\t\t\t   * read, in cases where the app expects\n\t\t\t\t   * that an immediate read would fail.)\n\t\t\t\t   */\n#define APR_INCOMPLETE_WRITE 8192 /**< like APR_INCOMPLETE_READ, but for write\n                                   * @see APR_INCOMPLETE_READ\n                                   */\n#define APR_IPV6_V6ONLY     16384 /**< Don't accept IPv4 connections on an\n                                   * IPv6 listening socket.\n                                   */\n#define APR_TCP_DEFER_ACCEPT 32768 /**< Delay accepting of new connections \n                                    * until data is available.\n                                    * @see apr_socket_accept_filter\n                                    */\n#define APR_SO_BROADCAST     65536 /**< Allow broadcast\n                                    */\n\n/** @} */\n\n/** Define what type of socket shutdown should occur. */\ntypedef enum {\n    APR_SHUTDOWN_READ,          /**< no longer allow read request */\n    APR_SHUTDOWN_WRITE,         /**< no longer allow write requests */\n    APR_SHUTDOWN_READWRITE      /**< no longer allow read or write requests */\n} apr_shutdown_how_e;\n\n#define APR_IPV4_ADDR_OK  0x01  /**< @see apr_sockaddr_info_get() */\n#define APR_IPV6_ADDR_OK  0x02  /**< @see apr_sockaddr_info_get() */\n\n#if (!APR_HAVE_IN_ADDR)\n/**\n * We need to make sure we always have an in_addr type, so APR will just\n * define it ourselves, if the platform doesn't provide it.\n */\nstruct in_addr {\n    apr_uint32_t  s_addr; /**< storage to hold the IP# */\n};\n#endif\n\n/** @def APR_INADDR_NONE\n * Not all platforms have a real INADDR_NONE.  This macro replaces\n * INADDR_NONE on all platforms.\n */\n#ifdef INADDR_NONE\n#define APR_INADDR_NONE INADDR_NONE\n#else\n#define APR_INADDR_NONE ((unsigned int) 0xffffffff)\n#endif\n\n/**\n * @def APR_INET\n * Not all platforms have these defined, so we'll define them here\n * The default values come from FreeBSD 4.1.1\n */\n#define APR_INET     AF_INET\n/** @def APR_UNSPEC\n * Let the system decide which address family to use\n */\n#ifdef AF_UNSPEC\n#define APR_UNSPEC   AF_UNSPEC\n#else\n#define APR_UNSPEC   0\n#endif\n#if APR_HAVE_IPV6\n/** @def APR_INET6\n* IPv6 Address Family. Not all platforms may have this defined.\n*/\n\n#define APR_INET6    AF_INET6\n#endif\n\n/**\n * @defgroup IP_Proto IP Protocol Definitions for use when creating sockets\n * @{\n */\n#define APR_PROTO_TCP       6   /**< TCP  */\n#define APR_PROTO_UDP      17   /**< UDP  */\n#define APR_PROTO_SCTP    132   /**< SCTP */\n/** @} */\n\n/**\n * Enum used to denote either the local and remote endpoint of a\n * connection.\n */\ntypedef enum {\n    APR_LOCAL,   /**< Socket information for local end of connection */\n    APR_REMOTE   /**< Socket information for remote end of connection */\n} apr_interface_e;\n\n/**\n * The specific declaration of inet_addr's ... some platforms fall back\n * inet_network (this is not good, but necessary)\n */\n\n#if APR_HAVE_INET_ADDR\n#define apr_inet_addr    inet_addr\n#elif APR_HAVE_INET_NETWORK        /* only DGUX, as far as I know */\n/**\n * @warning\n * not generally safe... inet_network() and inet_addr() perform\n * different functions */\n#define apr_inet_addr    inet_network\n#endif\n\n/** A structure to represent sockets */\ntypedef struct apr_socket_t     apr_socket_t;\n/**\n * A structure to encapsulate headers and trailers for apr_socket_sendfile\n */\ntypedef struct apr_hdtr_t       apr_hdtr_t;\n/** A structure to represent in_addr */\ntypedef struct in_addr          apr_in_addr_t;\n/** A structure to represent an IP subnet */\ntypedef struct apr_ipsubnet_t apr_ipsubnet_t;\n\n/** @remark use apr_uint16_t just in case some system has a short that isn't 16 bits... */\ntypedef apr_uint16_t            apr_port_t;\n\n/** @remark It's defined here as I think it should all be platform safe...\n * @see apr_sockaddr_t\n */\ntypedef struct apr_sockaddr_t apr_sockaddr_t;\n/**\n * APRs socket address type, used to ensure protocol independence\n */\nstruct apr_sockaddr_t {\n    /** The pool to use... */\n    apr_pool_t *pool;\n    /** The hostname */\n    char *hostname;\n    /** Either a string of the port number or the service name for the port */\n    char *servname;\n    /** The numeric port */\n    apr_port_t port;\n    /** The family */\n    apr_int32_t family;\n    /** How big is the sockaddr we're using? */\n    apr_socklen_t salen;\n    /** How big is the ip address structure we're using? */\n    int ipaddr_len;\n    /** How big should the address buffer be?  16 for v4 or 46 for v6\n     *  used in inet_ntop... */\n    int addr_str_len;\n    /** This points to the IP address structure within the appropriate\n     *  sockaddr structure.  */\n    void *ipaddr_ptr;\n    /** If multiple addresses were found by apr_sockaddr_info_get(), this \n     *  points to a representation of the next address. */\n    apr_sockaddr_t *next;\n    /** Union of either IPv4 or IPv6 sockaddr. */\n    union {\n        /** IPv4 sockaddr structure */\n        struct sockaddr_in sin;\n#if APR_HAVE_IPV6\n        /** IPv6 sockaddr structure */\n        struct sockaddr_in6 sin6;\n#endif\n#if APR_HAVE_SA_STORAGE\n        /** Placeholder to ensure that the size of this union is not\n         * dependent on whether APR_HAVE_IPV6 is defined. */\n        struct sockaddr_storage sas;\n#endif\n    } sa;\n};\n\n#if APR_HAS_SENDFILE\n/** \n * Support reusing the socket on platforms which support it (from disconnect,\n * specifically Win32.\n * @remark Optional flag passed into apr_socket_sendfile() \n */\n#define APR_SENDFILE_DISCONNECT_SOCKET      1\n#endif\n\n/** A structure to encapsulate headers and trailers for apr_socket_sendfile */\nstruct apr_hdtr_t {\n    /** An iovec to store the headers sent before the file. */\n    struct iovec* headers;\n    /** number of headers in the iovec */\n    int numheaders;\n    /** An iovec to store the trailers sent after the file. */\n    struct iovec* trailers;\n    /** number of trailers in the iovec */\n    int numtrailers;\n};\n\n/* function definitions */\n\n/**\n * Create a socket.\n * @param new_sock The new socket that has been set up.\n * @param family The address family of the socket (e.g., APR_INET).\n * @param type The type of the socket (e.g., SOCK_STREAM).\n * @param protocol The protocol of the socket (e.g., APR_PROTO_TCP).\n * @param cont The pool for the apr_socket_t and associated storage.\n * @note The pool will be used by various functions that operate on the\n *       socket. The caller must ensure that it is not used by other threads\n *       at the same time.\n */\nAPR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new_sock, \n                                            int family, int type,\n                                            int protocol,\n                                            apr_pool_t *cont);\n\n/**\n * Shutdown either reading, writing, or both sides of a socket.\n * @param thesocket The socket to close \n * @param how How to shutdown the socket.  One of:\n * <PRE>\n *            APR_SHUTDOWN_READ         no longer allow read requests\n *            APR_SHUTDOWN_WRITE        no longer allow write requests\n *            APR_SHUTDOWN_READWRITE    no longer allow read or write requests \n * </PRE>\n * @see apr_shutdown_how_e\n * @remark This does not actually close the socket descriptor, it just\n *      controls which calls are still valid on the socket.\n */\nAPR_DECLARE(apr_status_t) apr_socket_shutdown(apr_socket_t *thesocket,\n                                              apr_shutdown_how_e how);\n\n/**\n * Close a socket.\n * @param thesocket The socket to close \n */\nAPR_DECLARE(apr_status_t) apr_socket_close(apr_socket_t *thesocket);\n\n/**\n * Bind the socket to its associated port\n * @param sock The socket to bind \n * @param sa The socket address to bind to\n * @remark This may be where we will find out if there is any other process\n *      using the selected port.\n */\nAPR_DECLARE(apr_status_t) apr_socket_bind(apr_socket_t *sock, \n                                          apr_sockaddr_t *sa);\n\n/**\n * Listen to a bound socket for connections.\n * @param sock The socket to listen on \n * @param backlog The number of outstanding connections allowed in the sockets\n *                listen queue.  If this value is less than zero, the listen\n *                queue size is set to zero.  \n */\nAPR_DECLARE(apr_status_t) apr_socket_listen(apr_socket_t *sock, \n                                            apr_int32_t backlog);\n\n/**\n * Accept a new connection request\n * @param new_sock A copy of the socket that is connected to the socket that\n *                 made the connection request.  This is the socket which should\n *                 be used for all future communication.\n * @param sock The socket we are listening on.\n * @param connection_pool The pool for the new socket.\n * @note The pool will be used by various functions that operate on the\n *       socket. The caller must ensure that it is not used by other threads\n *       at the same time.\n */\nAPR_DECLARE(apr_status_t) apr_socket_accept(apr_socket_t **new_sock, \n                                            apr_socket_t *sock,\n                                            apr_pool_t *connection_pool);\n\n/**\n * Issue a connection request to a socket either on the same machine \n * or a different one.\n * @param sock The socket we wish to use for our side of the connection \n * @param sa The address of the machine we wish to connect to.\n */\nAPR_DECLARE(apr_status_t) apr_socket_connect(apr_socket_t *sock,\n                                             apr_sockaddr_t *sa);\n\n/**\n * Determine whether the receive part of the socket has been closed by\n * the peer (such that a subsequent call to apr_socket_read would\n * return APR_EOF), if the socket's receive buffer is empty.  This\n * function does not block waiting for I/O.\n *\n * @param sock The socket to check\n * @param atreadeof If APR_SUCCESS is returned, *atreadeof is set to\n *                  non-zero if a subsequent read would return APR_EOF\n * @return an error is returned if it was not possible to determine the\n *         status, in which case *atreadeof is not changed.\n */\nAPR_DECLARE(apr_status_t) apr_socket_atreadeof(apr_socket_t *sock,\n                                               int *atreadeof);\n\n/**\n * Create apr_sockaddr_t from hostname, address family, and port.\n * @param sa The new apr_sockaddr_t.\n * @param hostname The hostname or numeric address string to resolve/parse, or\n *               NULL to build an address that corresponds to 0.0.0.0 or ::\n * @param family The address family to use, or APR_UNSPEC if the system should \n *               decide.\n * @param port The port number.\n * @param flags Special processing flags:\n * <PRE>\n *       APR_IPV4_ADDR_OK          first query for IPv4 addresses; only look\n *                                 for IPv6 addresses if the first query failed;\n *                                 only valid if family is APR_UNSPEC and hostname\n *                                 isn't NULL; mutually exclusive with\n *                                 APR_IPV6_ADDR_OK\n *       APR_IPV6_ADDR_OK          first query for IPv6 addresses; only look\n *                                 for IPv4 addresses if the first query failed;\n *                                 only valid if family is APR_UNSPEC and hostname\n *                                 isn't NULL and APR_HAVE_IPV6; mutually exclusive\n *                                 with APR_IPV4_ADDR_OK\n * </PRE>\n * @param p The pool for the apr_sockaddr_t and associated storage.\n */\nAPR_DECLARE(apr_status_t) apr_sockaddr_info_get(apr_sockaddr_t **sa,\n                                          const char *hostname,\n                                          apr_int32_t family,\n                                          apr_port_t port,\n                                          apr_int32_t flags,\n                                          apr_pool_t *p);\n\n/**\n * Look up the host name from an apr_sockaddr_t.\n * @param hostname The hostname.\n * @param sa The apr_sockaddr_t.\n * @param flags Special processing flags.\n * @remark Results can vary significantly between platforms\n * when processing wildcard socket addresses.\n */\nAPR_DECLARE(apr_status_t) apr_getnameinfo(char **hostname,\n                                          apr_sockaddr_t *sa,\n                                          apr_int32_t flags);\n\n/**\n * Parse hostname/IP address with scope id and port.\n *\n * Any of the following strings are accepted:\n *   8080                  (just the port number)\n *   www.apache.org        (just the hostname)\n *   www.apache.org:8080   (hostname and port number)\n *   [fe80::1]:80          (IPv6 numeric address string only)\n *   [fe80::1%eth0]        (IPv6 numeric address string and scope id)\n *\n * Invalid strings:\n *                         (empty string)\n *   [abc]                 (not valid IPv6 numeric address string)\n *   abc:65536             (invalid port number)\n *\n * @param addr The new buffer containing just the hostname.  On output, *addr \n *             will be NULL if no hostname/IP address was specfied.\n * @param scope_id The new buffer containing just the scope id.  On output, \n *                 *scope_id will be NULL if no scope id was specified.\n * @param port The port number.  On output, *port will be 0 if no port was \n *             specified.\n *             ### FIXME: 0 is a legal port (per RFC 1700). this should\n *             ### return something besides zero if the port is missing.\n * @param str The input string to be parsed.\n * @param p The pool from which *addr and *scope_id are allocated.\n * @remark If scope id shouldn't be allowed, check for scope_id != NULL in \n *         addition to checking the return code.  If addr/hostname should be \n *         required, check for addr == NULL in addition to checking the \n *         return code.\n */\nAPR_DECLARE(apr_status_t) apr_parse_addr_port(char **addr,\n                                              char **scope_id,\n                                              apr_port_t *port,\n                                              const char *str,\n                                              apr_pool_t *p);\n\n/**\n * Get name of the current machine\n * @param buf A buffer to store the hostname in.\n * @param len The maximum length of the hostname that can be stored in the\n *            buffer provided.  The suggested length is APRMAXHOSTLEN + 1.\n * @param cont The pool to use.\n * @remark If the buffer was not large enough, an error will be returned.\n */\nAPR_DECLARE(apr_status_t) apr_gethostname(char *buf, int len, apr_pool_t *cont);\n\n/**\n * Return the data associated with the current socket\n * @param data The user data associated with the socket.\n * @param key The key to associate with the user data.\n * @param sock The currently open socket.\n */\nAPR_DECLARE(apr_status_t) apr_socket_data_get(void **data, const char *key,\n                                              apr_socket_t *sock);\n\n/**\n * Set the data associated with the current socket.\n * @param sock The currently open socket.\n * @param data The user data to associate with the socket.\n * @param key The key to associate with the data.\n * @param cleanup The cleanup to call when the socket is destroyed.\n */\nAPR_DECLARE(apr_status_t) apr_socket_data_set(apr_socket_t *sock, void *data,\n                                              const char *key,\n                                              apr_status_t (*cleanup)(void*));\n\n/**\n * Send data over a network.\n * @param sock The socket to send the data over.\n * @param buf The buffer which contains the data to be sent. \n * @param len On entry, the number of bytes to send; on exit, the number\n *            of bytes sent.\n * @remark\n * <PRE>\n * This functions acts like a blocking write by default.  To change \n * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK\n * socket option.\n *\n * It is possible for both bytes to be sent and an error to be returned.\n *\n * APR_EINTR is never returned.\n * </PRE>\n */\nAPR_DECLARE(apr_status_t) apr_socket_send(apr_socket_t *sock, const char *buf, \n                                          apr_size_t *len);\n\n/**\n * Send multiple buffers over a network.\n * @param sock The socket to send the data over.\n * @param vec The array of iovec structs containing the data to send \n * @param nvec The number of iovec structs in the array\n * @param len Receives the number of bytes actually written\n * @remark\n * <PRE>\n * This functions acts like a blocking write by default.  To change \n * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK\n * socket option.\n * The number of bytes actually sent is stored in argument 4.\n *\n * It is possible for both bytes to be sent and an error to be returned.\n *\n * APR_EINTR is never returned.\n * </PRE>\n */\nAPR_DECLARE(apr_status_t) apr_socket_sendv(apr_socket_t *sock, \n                                           const struct iovec *vec,\n                                           apr_int32_t nvec, apr_size_t *len);\n\n/**\n * @param sock The socket to send from\n * @param where The apr_sockaddr_t describing where to send the data\n * @param flags The flags to use\n * @param buf  The data to send\n * @param len  The length of the data to send\n */\nAPR_DECLARE(apr_status_t) apr_socket_sendto(apr_socket_t *sock, \n                                            apr_sockaddr_t *where,\n                                            apr_int32_t flags, const char *buf, \n                                            apr_size_t *len);\n\n/**\n * Read data from a socket.  On success, the address of the peer from\n * which the data was sent is copied into the @a from parameter, and the\n * @a len parameter is updated to give the number of bytes written to\n * @a buf.\n *\n * @param from Updated with the address from which the data was received\n * @param sock The socket to use\n * @param flags The flags to use\n * @param buf  The buffer to use\n * @param len  The length of the available buffer\n */\n\nAPR_DECLARE(apr_status_t) apr_socket_recvfrom(apr_sockaddr_t *from, \n                                              apr_socket_t *sock,\n                                              apr_int32_t flags, char *buf, \n                                              apr_size_t *len);\n \n#if APR_HAS_SENDFILE || defined(DOXYGEN)\n\n/**\n * Send a file from an open file descriptor to a socket, along with \n * optional headers and trailers\n * @param sock The socket to which we're writing\n * @param file The open file from which to read\n * @param hdtr A structure containing the headers and trailers to send\n * @param offset Offset into the file where we should begin writing\n * @param len (input)  - Number of bytes to send from the file \n *            (output) - Number of bytes actually sent, \n *                       including headers, file, and trailers\n * @param flags APR flags that are mapped to OS specific flags\n * @remark This functions acts like a blocking write by default.  To change \n *         this behavior, use apr_socket_timeout_set() or the\n *         APR_SO_NONBLOCK socket option.\n * The number of bytes actually sent is stored in the len parameter.\n * The offset parameter is passed by reference for no reason; its\n * value will never be modified by the apr_socket_sendfile() function.\n */\nAPR_DECLARE(apr_status_t) apr_socket_sendfile(apr_socket_t *sock, \n                                              apr_file_t *file,\n                                              apr_hdtr_t *hdtr,\n                                              apr_off_t *offset,\n                                              apr_size_t *len,\n                                              apr_int32_t flags);\n\n#endif /* APR_HAS_SENDFILE */\n\n/**\n * Read data from a network.\n * @param sock The socket to read the data from.\n * @param buf The buffer to store the data in. \n * @param len On entry, the number of bytes to receive; on exit, the number\n *            of bytes received.\n * @remark\n * <PRE>\n * This functions acts like a blocking read by default.  To change \n * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK\n * socket option.\n * The number of bytes actually received is stored in argument 3.\n *\n * It is possible for both bytes to be received and an APR_EOF or\n * other error to be returned.\n *\n * APR_EINTR is never returned.\n * </PRE>\n */\nAPR_DECLARE(apr_status_t) apr_socket_recv(apr_socket_t *sock, \n                                   char *buf, apr_size_t *len);\n\n/**\n * Setup socket options for the specified socket\n * @param sock The socket to set up.\n * @param opt The option we would like to configure.  One of:\n * <PRE>\n *            APR_SO_DEBUG      --  turn on debugging information \n *            APR_SO_KEEPALIVE  --  keep connections active\n *            APR_SO_LINGER     --  lingers on close if data is present\n *            APR_SO_NONBLOCK   --  Turns blocking on/off for socket\n *                                  When this option is enabled, use\n *                                  the APR_STATUS_IS_EAGAIN() macro to\n *                                  see if a send or receive function\n *                                  could not transfer data without\n *                                  blocking.\n *            APR_SO_REUSEADDR  --  The rules used in validating addresses\n *                                  supplied to bind should allow reuse\n *                                  of local addresses.\n *            APR_SO_SNDBUF     --  Set the SendBufferSize\n *            APR_SO_RCVBUF     --  Set the ReceiveBufferSize\n * </PRE>\n * @param on Value for the option.\n */\nAPR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,\n                                             apr_int32_t opt, apr_int32_t on);\n\n/**\n * Setup socket timeout for the specified socket\n * @param sock The socket to set up.\n * @param t Value for the timeout.\n * <PRE>\n *   t > 0  -- read and write calls return APR_TIMEUP if specified time\n *             elapsess with no data read or written\n *   t == 0 -- read and write calls never block\n *   t < 0  -- read and write calls block\n * </PRE>\n */\nAPR_DECLARE(apr_status_t) apr_socket_timeout_set(apr_socket_t *sock,\n                                                 apr_interval_time_t t);\n\n/**\n * Query socket options for the specified socket\n * @param sock The socket to query\n * @param opt The option we would like to query.  One of:\n * <PRE>\n *            APR_SO_DEBUG      --  turn on debugging information \n *            APR_SO_KEEPALIVE  --  keep connections active\n *            APR_SO_LINGER     --  lingers on close if data is present\n *            APR_SO_NONBLOCK   --  Turns blocking on/off for socket\n *            APR_SO_REUSEADDR  --  The rules used in validating addresses\n *                                  supplied to bind should allow reuse\n *                                  of local addresses.\n *            APR_SO_SNDBUF     --  Set the SendBufferSize\n *            APR_SO_RCVBUF     --  Set the ReceiveBufferSize\n *            APR_SO_DISCONNECTED -- Query the disconnected state of the socket.\n *                                  (Currently only used on Windows)\n * </PRE>\n * @param on Socket option returned on the call.\n */\nAPR_DECLARE(apr_status_t) apr_socket_opt_get(apr_socket_t *sock, \n                                             apr_int32_t opt, apr_int32_t *on);\n\n/**\n * Query socket timeout for the specified socket\n * @param sock The socket to query\n * @param t Socket timeout returned from the query.\n */\nAPR_DECLARE(apr_status_t) apr_socket_timeout_get(apr_socket_t *sock, \n                                                 apr_interval_time_t *t);\n\n/**\n * Query the specified socket if at the OOB/Urgent data mark\n * @param sock The socket to query\n * @param atmark Is set to true if socket is at the OOB/urgent mark,\n *               otherwise is set to false.\n */\nAPR_DECLARE(apr_status_t) apr_socket_atmark(apr_socket_t *sock, \n                                            int *atmark);\n\n/**\n * Return an address associated with a socket; either the address to\n * which the socket is bound locally or the address of the peer\n * to which the socket is connected.\n * @param sa The returned apr_sockaddr_t.\n * @param which Whether to retrieve the local or remote address\n * @param sock The socket to use\n */\nAPR_DECLARE(apr_status_t) apr_socket_addr_get(apr_sockaddr_t **sa,\n                                              apr_interface_e which,\n                                              apr_socket_t *sock);\n \n/**\n * Return the IP address (in numeric address string format) in\n * an APR socket address.  APR will allocate storage for the IP address \n * string from the pool of the apr_sockaddr_t.\n * @param addr The IP address.\n * @param sockaddr The socket address to reference.\n */\nAPR_DECLARE(apr_status_t) apr_sockaddr_ip_get(char **addr, \n                                              apr_sockaddr_t *sockaddr);\n\n/**\n * Write the IP address (in numeric address string format) of the APR\n * socket address @a sockaddr into the buffer @a buf (of size @a buflen).\n * @param sockaddr The socket address to reference.\n */\nAPR_DECLARE(apr_status_t) apr_sockaddr_ip_getbuf(char *buf, apr_size_t buflen,\n                                                 apr_sockaddr_t *sockaddr);\n\n/**\n * See if the IP addresses in two APR socket addresses are\n * equivalent.  Appropriate logic is present for comparing\n * IPv4-mapped IPv6 addresses with IPv4 addresses.\n *\n * @param addr1 One of the APR socket addresses.\n * @param addr2 The other APR socket address.\n * @remark The return value will be non-zero if the addresses\n * are equivalent.\n */\nAPR_DECLARE(int) apr_sockaddr_equal(const apr_sockaddr_t *addr1,\n                                    const apr_sockaddr_t *addr2);\n\n/**\n * See if the IP address in an APR socket address refers to the wildcard\n * address for the protocol family (e.g., INADDR_ANY for IPv4).\n *\n * @param addr The APR socket address to examine.\n * @remark The return value will be non-zero if the address is\n * initialized and is the wildcard address.\n */\nAPR_DECLARE(int) apr_sockaddr_is_wildcard(const apr_sockaddr_t *addr);\n\n/**\n* Return the type of the socket.\n* @param sock The socket to query.\n* @param type The returned type (e.g., SOCK_STREAM).\n*/\nAPR_DECLARE(apr_status_t) apr_socket_type_get(apr_socket_t *sock,\n                                              int *type);\n \n/**\n * Given an apr_sockaddr_t and a service name, set the port for the service\n * @param sockaddr The apr_sockaddr_t that will have its port set\n * @param servname The name of the service you wish to use\n */\nAPR_DECLARE(apr_status_t) apr_getservbyname(apr_sockaddr_t *sockaddr, \n                                            const char *servname);\n/**\n * Build an ip-subnet representation from an IP address and optional netmask or\n * number-of-bits.\n * @param ipsub The new ip-subnet representation\n * @param ipstr The input IP address string\n * @param mask_or_numbits The input netmask or number-of-bits string, or NULL\n * @param p The pool to allocate from\n */\nAPR_DECLARE(apr_status_t) apr_ipsubnet_create(apr_ipsubnet_t **ipsub, \n                                              const char *ipstr, \n                                              const char *mask_or_numbits, \n                                              apr_pool_t *p);\n\n/**\n * Test the IP address in an apr_sockaddr_t against a pre-built ip-subnet\n * representation.\n * @param ipsub The ip-subnet representation\n * @param sa The socket address to test\n * @return non-zero if the socket address is within the subnet, 0 otherwise\n */\nAPR_DECLARE(int) apr_ipsubnet_test(apr_ipsubnet_t *ipsub, apr_sockaddr_t *sa);\n\n#if APR_HAS_SO_ACCEPTFILTER || defined(DOXYGEN)\n/**\n * Set an OS level accept filter.\n * @param sock The socket to put the accept filter on.\n * @param name The accept filter\n * @param args Any extra args to the accept filter.  Passing NULL here removes\n *             the accept filter. \n * @bug name and args should have been declared as const char *, as they are in\n * APR 2.0\n */\napr_status_t apr_socket_accept_filter(apr_socket_t *sock, char *name,\n                                      char *args);\n#endif\n\n/**\n * Return the protocol of the socket.\n * @param sock The socket to query.\n * @param protocol The returned protocol (e.g., APR_PROTO_TCP).\n */\nAPR_DECLARE(apr_status_t) apr_socket_protocol_get(apr_socket_t *sock,\n                                                  int *protocol);\n\n/**\n * Get the pool used by the socket.\n */\nAPR_POOL_DECLARE_ACCESSOR(socket);\n\n/**\n * Set a socket to be inherited by child processes.\n */\nAPR_DECLARE_INHERIT_SET(socket);\n\n/**\n * Unset a socket from being inherited by child processes.\n */\nAPR_DECLARE_INHERIT_UNSET(socket);\n\n/**\n * @defgroup apr_mcast IP Multicast\n * @{\n */\n\n/**\n * Join a Multicast Group\n * @param sock The socket to join a multicast group\n * @param join The address of the multicast group to join\n * @param iface Address of the interface to use.  If NULL is passed, the \n *              default multicast interface will be used. (OS Dependent)\n * @param source Source Address to accept transmissions from (non-NULL \n *               implies Source-Specific Multicast)\n */\nAPR_DECLARE(apr_status_t) apr_mcast_join(apr_socket_t *sock,\n                                         apr_sockaddr_t *join,\n                                         apr_sockaddr_t *iface,\n                                         apr_sockaddr_t *source);\n\n/**\n * Leave a Multicast Group.  All arguments must be the same as\n * apr_mcast_join.\n * @param sock The socket to leave a multicast group\n * @param addr The address of the multicast group to leave\n * @param iface Address of the interface to use.  If NULL is passed, the \n *              default multicast interface will be used. (OS Dependent)\n * @param source Source Address to accept transmissions from (non-NULL \n *               implies Source-Specific Multicast)\n */\nAPR_DECLARE(apr_status_t) apr_mcast_leave(apr_socket_t *sock,\n                                          apr_sockaddr_t *addr,\n                                          apr_sockaddr_t *iface,\n                                          apr_sockaddr_t *source);\n\n/**\n * Set the Multicast Time to Live (ttl) for a multicast transmission.\n * @param sock The socket to set the multicast ttl\n * @param ttl Time to live to Assign. 0-255, default=1\n * @remark If the TTL is 0, packets will only be seen by sockets on \n * the local machine, and only when multicast loopback is enabled.\n */\nAPR_DECLARE(apr_status_t) apr_mcast_hops(apr_socket_t *sock,\n                                         apr_byte_t ttl);\n\n/**\n * Toggle IP Multicast Loopback\n * @param sock The socket to set multicast loopback\n * @param opt 0=disable, 1=enable\n */\nAPR_DECLARE(apr_status_t) apr_mcast_loopback(apr_socket_t *sock,\n                                             apr_byte_t opt);\n\n\n/**\n * Set the Interface to be used for outgoing Multicast Transmissions.\n * @param sock The socket to set the multicast interface on\n * @param iface Address of the interface to use for Multicast\n */\nAPR_DECLARE(apr_status_t) apr_mcast_interface(apr_socket_t *sock,\n                                              apr_sockaddr_t *iface);\n\n/** @} */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_NETWORK_IO_H */\n\n"
  },
  {
    "path": "third_party/include/apr/apr_poll.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_POLL_H\n#define APR_POLL_H\n/**\n * @file apr_poll.h\n * @brief APR Poll interface\n */\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n#include \"apr_inherit.h\" \n#include \"apr_file_io.h\" \n#include \"apr_network_io.h\" \n\n#if APR_HAVE_NETINET_IN_H\n#include <netinet/in.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_poll Poll Routines\n * @ingroup APR \n * @{\n */\n\n/**\n * @defgroup pollopts Poll options\n * @ingroup apr_poll\n * @{\n */\n#define APR_POLLIN    0x001     /**< Can read without blocking */\n#define APR_POLLPRI   0x002     /**< Priority data available */\n#define APR_POLLOUT   0x004     /**< Can write without blocking */\n#define APR_POLLERR   0x010     /**< Pending error */\n#define APR_POLLHUP   0x020     /**< Hangup occurred */\n#define APR_POLLNVAL  0x040     /**< Descriptor invalid */\n/** @} */\n\n/**\n * @defgroup pollflags Pollset Flags\n * @ingroup apr_poll\n * @{\n */\n#define APR_POLLSET_THREADSAFE 0x001 /**< Adding or removing a descriptor is\n                                      * thread-safe\n                                      */\n#define APR_POLLSET_NOCOPY     0x002 /**< Descriptors passed to apr_pollset_add()\n                                      * are not copied\n                                      */\n#define APR_POLLSET_WAKEABLE   0x004 /**< Poll operations are interruptable by\n                                      * apr_pollset_wakeup()\n                                      */\n#define APR_POLLSET_NODEFAULT  0x010 /**< Do not try to use the default method if\n                                      * the specified non-default method cannot be\n                                      * used\n                                      */\n/** @} */\n\n/**\n * Pollset Methods\n */\ntypedef enum {\n    APR_POLLSET_DEFAULT,        /**< Platform default poll method */\n    APR_POLLSET_SELECT,         /**< Poll uses select method */\n    APR_POLLSET_KQUEUE,         /**< Poll uses kqueue method */\n    APR_POLLSET_PORT,           /**< Poll uses Solaris event port method */\n    APR_POLLSET_EPOLL,          /**< Poll uses epoll method */\n    APR_POLLSET_POLL,           /**< Poll uses poll method */\n    APR_POLLSET_AIO_MSGQ        /**< Poll uses z/OS asio method */\n} apr_pollset_method_e;\n\n/** Used in apr_pollfd_t to determine what the apr_descriptor is */\ntypedef enum { \n    APR_NO_DESC,                /**< nothing here */\n    APR_POLL_SOCKET,            /**< descriptor refers to a socket */\n    APR_POLL_FILE,              /**< descriptor refers to a file */\n    APR_POLL_LASTDESC           /**< @deprecated descriptor is the last one in the list */\n} apr_datatype_e ;\n\n/** Union of either an APR file or socket. */\ntypedef union {\n    apr_file_t *f;              /**< file */\n    apr_socket_t *s;            /**< socket */\n} apr_descriptor;\n\n/** @see apr_pollfd_t */\ntypedef struct apr_pollfd_t apr_pollfd_t;\n\n/** Poll descriptor set. */\nstruct apr_pollfd_t {\n    apr_pool_t *p;              /**< associated pool */\n    apr_datatype_e desc_type;   /**< descriptor type */\n    apr_int16_t reqevents;      /**< requested events */\n    apr_int16_t rtnevents;      /**< returned events */\n    apr_descriptor desc;        /**< @see apr_descriptor */\n    void *client_data;          /**< allows app to associate context */\n};\n\n\n/* General-purpose poll API for arbitrarily large numbers of\n * file descriptors\n */\n\n/** Opaque structure used for pollset API */\ntypedef struct apr_pollset_t apr_pollset_t;\n\n/**\n * Set up a pollset object\n * @param pollset  The pointer in which to return the newly created object \n * @param size The maximum number of descriptors that this pollset can hold\n * @param p The pool from which to allocate the pollset\n * @param flags Optional flags to modify the operation of the pollset.\n *\n * @remark If flags contains APR_POLLSET_THREADSAFE, then a pollset is\n *         created on which it is safe to make concurrent calls to\n *         apr_pollset_add(), apr_pollset_remove() and apr_pollset_poll()\n *         from separate threads.  This feature is only supported on some\n *         platforms; the apr_pollset_create() call will fail with\n *         APR_ENOTIMPL on platforms where it is not supported.\n * @remark If flags contains APR_POLLSET_WAKEABLE, then a pollset is\n *         created with an additional internal pipe object used for the\n *         apr_pollset_wakeup() call. The actual size of pollset is\n *         in that case @a size + 1. This feature is only supported on some\n *         platforms; the apr_pollset_create() call will fail with\n *         APR_ENOTIMPL on platforms where it is not supported.\n * @remark If flags contains APR_POLLSET_NOCOPY, then the apr_pollfd_t\n *         structures passed to apr_pollset_add() are not copied and\n *         must have a lifetime at least as long as the pollset.\n * @remark Some poll methods (including APR_POLLSET_KQUEUE,\n *         APR_POLLSET_PORT, and APR_POLLSET_EPOLL) do not have a\n *         fixed limit on the size of the pollset. For these methods,\n *         the size parameter controls the maximum number of\n *         descriptors that will be returned by a single call to\n *         apr_pollset_poll().\n */\nAPR_DECLARE(apr_status_t) apr_pollset_create(apr_pollset_t **pollset,\n                                             apr_uint32_t size,\n                                             apr_pool_t *p,\n                                             apr_uint32_t flags);\n\n/**\n * Set up a pollset object\n * @param pollset  The pointer in which to return the newly created object \n * @param size The maximum number of descriptors that this pollset can hold\n * @param p The pool from which to allocate the pollset\n * @param flags Optional flags to modify the operation of the pollset.\n * @param method Poll method to use. See #apr_pollset_method_e.  If this\n *         method cannot be used, the default method will be used unless the\n *         APR_POLLSET_NODEFAULT flag has been specified.\n *\n * @remark If flags contains APR_POLLSET_THREADSAFE, then a pollset is\n *         created on which it is safe to make concurrent calls to\n *         apr_pollset_add(), apr_pollset_remove() and apr_pollset_poll()\n *         from separate threads.  This feature is only supported on some\n *         platforms; the apr_pollset_create_ex() call will fail with\n *         APR_ENOTIMPL on platforms where it is not supported.\n * @remark If flags contains APR_POLLSET_WAKEABLE, then a pollset is\n *         created with additional internal pipe object used for the\n *         apr_pollset_wakeup() call. The actual size of pollset is\n *         in that case size + 1. This feature is only supported on some\n *         platforms; the apr_pollset_create_ex() call will fail with\n *         APR_ENOTIMPL on platforms where it is not supported.\n * @remark If flags contains APR_POLLSET_NOCOPY, then the apr_pollfd_t\n *         structures passed to apr_pollset_add() are not copied and\n *         must have a lifetime at least as long as the pollset.\n * @remark Some poll methods (including APR_POLLSET_KQUEUE,\n *         APR_POLLSET_PORT, and APR_POLLSET_EPOLL) do not have a\n *         fixed limit on the size of the pollset. For these methods,\n *         the size parameter controls the maximum number of\n *         descriptors that will be returned by a single call to\n *         apr_pollset_poll().\n */\nAPR_DECLARE(apr_status_t) apr_pollset_create_ex(apr_pollset_t **pollset,\n                                                apr_uint32_t size,\n                                                apr_pool_t *p,\n                                                apr_uint32_t flags,\n                                                apr_pollset_method_e method);\n\n/**\n * Destroy a pollset object\n * @param pollset The pollset to destroy\n */\nAPR_DECLARE(apr_status_t) apr_pollset_destroy(apr_pollset_t *pollset);\n\n/**\n * Add a socket or file descriptor to a pollset\n * @param pollset The pollset to which to add the descriptor\n * @param descriptor The descriptor to add\n * @remark If you set client_data in the descriptor, that value\n *         will be returned in the client_data field whenever this\n *         descriptor is signalled in apr_pollset_poll().\n * @remark If the pollset has been created with APR_POLLSET_THREADSAFE\n *         and thread T1 is blocked in a call to apr_pollset_poll() for\n *         this same pollset that is being modified via apr_pollset_add()\n *         in thread T2, the currently executing apr_pollset_poll() call in\n *         T1 will either: (1) automatically include the newly added descriptor\n *         in the set of descriptors it is watching or (2) return immediately\n *         with APR_EINTR.  Option (1) is recommended, but option (2) is\n *         allowed for implementations where option (1) is impossible\n *         or impractical.\n * @remark If the pollset has been created with APR_POLLSET_NOCOPY, the \n *         apr_pollfd_t structure referenced by descriptor will not be copied\n *         and must have a lifetime at least as long as the pollset.\n * @remark Do not add the same socket or file descriptor to the same pollset\n *         multiple times, even if the requested events differ for the \n *         different calls to apr_pollset_add().  If the events of interest\n *         for a descriptor change, you must first remove the descriptor \n *         from the pollset with apr_pollset_remove(), then add it again \n *         specifying all requested events.\n */\nAPR_DECLARE(apr_status_t) apr_pollset_add(apr_pollset_t *pollset,\n                                          const apr_pollfd_t *descriptor);\n\n/**\n * Remove a descriptor from a pollset\n * @param pollset The pollset from which to remove the descriptor\n * @param descriptor The descriptor to remove\n * @remark If the descriptor is not found, APR_NOTFOUND is returned.\n * @remark If the pollset has been created with APR_POLLSET_THREADSAFE\n *         and thread T1 is blocked in a call to apr_pollset_poll() for\n *         this same pollset that is being modified via apr_pollset_remove()\n *         in thread T2, the currently executing apr_pollset_poll() call in\n *         T1 will either: (1) automatically exclude the newly added descriptor\n *         in the set of descriptors it is watching or (2) return immediately\n *         with APR_EINTR.  Option (1) is recommended, but option (2) is\n *         allowed for implementations where option (1) is impossible\n *         or impractical.\n * @remark apr_pollset_remove() cannot be used to remove a subset of requested\n *         events for a descriptor.  The reqevents field in the apr_pollfd_t\n *         parameter must contain the same value when removing as when adding.\n */\nAPR_DECLARE(apr_status_t) apr_pollset_remove(apr_pollset_t *pollset,\n                                             const apr_pollfd_t *descriptor);\n\n/**\n * Block for activity on the descriptor(s) in a pollset\n * @param pollset The pollset to use\n * @param timeout The amount of time in microseconds to wait.  This is a\n *                maximum, not a minimum.  If a descriptor is signalled, the\n *                function will return before this time.  If timeout is\n *                negative, the function will block until a descriptor is\n *                signalled or until apr_pollset_wakeup() has been called.\n * @param num Number of signalled descriptors (output parameter)\n * @param descriptors Array of signalled descriptors (output parameter)\n * @remark APR_EINTR will be returned if the pollset has been created with\n *         APR_POLLSET_WAKEABLE, apr_pollset_wakeup() has been called while\n *         waiting for activity, and there were no signalled descriptors at the\n *         time of the wakeup call.\n * @remark Multiple signalled conditions for the same descriptor may be reported\n *         in one or more returned apr_pollfd_t structures, depending on the\n *         implementation.\n */\nAPR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset,\n                                           apr_interval_time_t timeout,\n                                           apr_int32_t *num,\n                                           const apr_pollfd_t **descriptors);\n\n/**\n * Interrupt the blocked apr_pollset_poll() call.\n * @param pollset The pollset to use\n * @remark If the pollset was not created with APR_POLLSET_WAKEABLE the\n *         return value is APR_EINIT.\n */\nAPR_DECLARE(apr_status_t) apr_pollset_wakeup(apr_pollset_t *pollset);\n\n/**\n * Poll the descriptors in the poll structure\n * @param aprset The poll structure we will be using. \n * @param numsock The number of descriptors we are polling\n * @param nsds The number of descriptors signalled (output parameter)\n * @param timeout The amount of time in microseconds to wait.  This is a\n *                maximum, not a minimum.  If a descriptor is signalled, the\n *                function will return before this time.  If timeout is\n *                negative, the function will block until a descriptor is\n *                signalled or until apr_pollset_wakeup() has been called.\n * @remark The number of descriptors signalled is returned in the third argument. \n *         This is a blocking call, and it will not return until either a \n *         descriptor has been signalled or the timeout has expired. \n * @remark The rtnevents field in the apr_pollfd_t array will only be filled-\n *         in if the return value is APR_SUCCESS.\n */\nAPR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, apr_int32_t numsock,\n                                   apr_int32_t *nsds, \n                                   apr_interval_time_t timeout);\n\n/**\n * Return a printable representation of the pollset method.\n * @param pollset The pollset to use\n */\nAPR_DECLARE(const char *) apr_pollset_method_name(apr_pollset_t *pollset);\n\n/**\n * Return a printable representation of the default pollset method\n * (APR_POLLSET_DEFAULT).\n */\nAPR_DECLARE(const char *) apr_poll_method_defname(void);\n\n/** Opaque structure used for pollcb API */\ntypedef struct apr_pollcb_t apr_pollcb_t;\n\n/**\n * Set up a pollcb object\n * @param pollcb  The pointer in which to return the newly created object \n * @param size The maximum number of descriptors that a single _poll can return.\n * @param p The pool from which to allocate the pollcb\n * @param flags Optional flags to modify the operation of the pollcb.\n *\n * @remark Pollcb is only supported on some platforms; the apr_pollcb_create()\n * call will fail with APR_ENOTIMPL on platforms where it is not supported.\n */\nAPR_DECLARE(apr_status_t) apr_pollcb_create(apr_pollcb_t **pollcb,\n                                            apr_uint32_t size,\n                                            apr_pool_t *p,\n                                            apr_uint32_t flags);\n\n/**\n * Set up a pollcb object\n * @param pollcb  The pointer in which to return the newly created object \n * @param size The maximum number of descriptors that a single _poll can return.\n * @param p The pool from which to allocate the pollcb\n * @param flags Optional flags to modify the operation of the pollcb.\n * @param method Poll method to use. See #apr_pollset_method_e.  If this\n *         method cannot be used, the default method will be used unless the\n *         APR_POLLSET_NODEFAULT flag has been specified.\n *\n * @remark Pollcb is only supported on some platforms; the apr_pollcb_create_ex()\n * call will fail with APR_ENOTIMPL on platforms where it is not supported.\n */\nAPR_DECLARE(apr_status_t) apr_pollcb_create_ex(apr_pollcb_t **pollcb,\n                                               apr_uint32_t size,\n                                               apr_pool_t *p,\n                                               apr_uint32_t flags,\n                                               apr_pollset_method_e method);\n\n/**\n * Add a socket or file descriptor to a pollcb\n * @param pollcb The pollcb to which to add the descriptor\n * @param descriptor The descriptor to add\n * @remark If you set client_data in the descriptor, that value will be\n *         returned in the client_data field whenever this descriptor is\n *         signalled in apr_pollcb_poll().\n * @remark Unlike the apr_pollset API, the descriptor is not copied, and users \n *         must retain the memory used by descriptor, as the same pointer will\n *         be returned to them from apr_pollcb_poll.\n * @remark Do not add the same socket or file descriptor to the same pollcb\n *         multiple times, even if the requested events differ for the \n *         different calls to apr_pollcb_add().  If the events of interest\n *         for a descriptor change, you must first remove the descriptor \n *         from the pollcb with apr_pollcb_remove(), then add it again \n *         specifying all requested events.\n */\nAPR_DECLARE(apr_status_t) apr_pollcb_add(apr_pollcb_t *pollcb,\n                                         apr_pollfd_t *descriptor);\n/**\n * Remove a descriptor from a pollcb\n * @param pollcb The pollcb from which to remove the descriptor\n * @param descriptor The descriptor to remove\n * @remark apr_pollcb_remove() cannot be used to remove a subset of requested\n *         events for a descriptor.  The reqevents field in the apr_pollfd_t\n *         parameter must contain the same value when removing as when adding.\n */\nAPR_DECLARE(apr_status_t) apr_pollcb_remove(apr_pollcb_t *pollcb,\n                                            apr_pollfd_t *descriptor);\n\n/** Function prototype for pollcb handlers \n * @param baton Opaque baton passed into apr_pollcb_poll()\n * @param descriptor Contains the notification for an active descriptor, \n *                   the rtnevents member contains what events were triggered\n *                   for this descriptor.\n */\ntypedef apr_status_t (*apr_pollcb_cb_t)(void *baton, apr_pollfd_t *descriptor);\n\n/**\n * Block for activity on the descriptor(s) in a pollcb\n * @param pollcb The pollcb to use\n * @param timeout The amount of time in microseconds to wait.  This is a\n *                maximum, not a minimum.  If a descriptor is signalled, the\n *                function will return before this time.  If timeout is\n *                negative, the function will block until a descriptor is\n *                signalled.\n * @param func Callback function to call for each active descriptor.\n * @param baton Opaque baton passed to the callback function.\n * @remark Multiple signalled conditions for the same descriptor may be reported\n *         in one or more calls to the callback function, depending on the\n *         implementation.\n */\nAPR_DECLARE(apr_status_t) apr_pollcb_poll(apr_pollcb_t *pollcb,\n                                          apr_interval_time_t timeout,\n                                          apr_pollcb_cb_t func,\n                                          void *baton); \n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_POLL_H */\n\n"
  },
  {
    "path": "third_party/include/apr/apr_pools.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_POOLS_H\n#define APR_POOLS_H\n\n/**\n * @file apr_pools.h\n * @brief APR memory allocation\n *\n * Resource allocation routines...\n *\n * designed so that we don't have to keep track of EVERYTHING so that\n * it can be explicitly freed later (a fundamentally unsound strategy ---\n * particularly in the presence of die()).\n *\n * Instead, we maintain pools, and allocate items (both memory and I/O\n * handlers) from the pools --- currently there are two, one for\n * per-transaction info, and one for config info.  When a transaction is\n * over, we can delete everything in the per-transaction apr_pool_t without\n * fear, and without thinking too hard about it either.\n *\n * Note that most operations on pools are not thread-safe: a single pool\n * should only be accessed by a single thread at any given time. The one\n * exception to this rule is creating a subpool of a given pool: one or more\n * threads can safely create subpools at the same time that another thread\n * accesses the parent pool.\n */\n\n#include \"apr.h\"\n#include \"apr_errno.h\"\n#include \"apr_general.h\" /* for APR_STRINGIFY */\n#define APR_WANT_MEMFUNC /**< for no good reason? */\n#include \"apr_want.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @defgroup apr_pools Memory Pool Functions\n * @ingroup APR \n * @{\n */\n\n/** The fundamental pool type */\ntypedef struct apr_pool_t apr_pool_t;\n\n\n/**\n * Declaration helper macro to construct apr_foo_pool_get()s.\n *\n * This standardized macro is used by opaque (APR) data types to return\n * the apr_pool_t that is associated with the data type.\n *\n * APR_POOL_DECLARE_ACCESSOR() is used in a header file to declare the\n * accessor function. A typical usage and result would be:\n * <pre>\n *    APR_POOL_DECLARE_ACCESSOR(file);\n * becomes:\n *    APR_DECLARE(apr_pool_t *) apr_file_pool_get(const apr_file_t *thefile);\n * </pre>\n * @remark Doxygen unwraps this macro (via doxygen.conf) to provide \n * actual help for each specific occurrence of apr_foo_pool_get.\n * @remark the linkage is specified for APR. It would be possible to expand\n *       the macros to support other linkages.\n */\n#define APR_POOL_DECLARE_ACCESSOR(type) \\\n    APR_DECLARE(apr_pool_t *) apr_##type##_pool_get \\\n        (const apr_##type##_t *the##type)\n\n/** \n * Implementation helper macro to provide apr_foo_pool_get()s.\n *\n * In the implementation, the APR_POOL_IMPLEMENT_ACCESSOR() is used to\n * actually define the function. It assumes the field is named \"pool\".\n */\n#define APR_POOL_IMPLEMENT_ACCESSOR(type) \\\n    APR_DECLARE(apr_pool_t *) apr_##type##_pool_get \\\n            (const apr_##type##_t *the##type) \\\n        { return the##type->pool; }\n\n\n/**\n * Pool debug levels\n *\n * <pre>\n * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |\n * ---------------------------------\n * |   |   |   |   |   |   |   | x |  General debug code enabled (useful in\n *                                    combination with --with-efence).\n *\n * |   |   |   |   |   |   | x |   |  Verbose output on stderr (report\n *                                    CREATE, CLEAR, DESTROY).\n *\n * |   |   |   | x |   |   |   |   |  Verbose output on stderr (report\n *                                    PALLOC, PCALLOC).\n *\n * |   |   |   |   |   | x |   |   |  Lifetime checking. On each use of a\n *                                    pool, check its lifetime.  If the pool\n *                                    is out of scope, abort().\n *                                    In combination with the verbose flag\n *                                    above, it will output LIFE in such an\n *                                    event prior to aborting.\n *\n * |   |   |   |   | x |   |   |   |  Pool owner checking.  On each use of a\n *                                    pool, check if the current thread is the\n *                                    pool's owner.  If not, abort().  In\n *                                    combination with the verbose flag above,\n *                                    it will output OWNER in such an event\n *                                    prior to aborting.  Use the debug\n *                                    function apr_pool_owner_set() to switch\n *                                    a pool's ownership.\n *\n * When no debug level was specified, assume general debug mode.\n * If level 0 was specified, debugging is switched off.\n * </pre>\n */\n#if defined(APR_POOL_DEBUG)\n/* If APR_POOL_DEBUG is blank, we get 1; if it is a number, we get -1. */\n#if (APR_POOL_DEBUG - APR_POOL_DEBUG -1 == 1)\n#undef APR_POOL_DEBUG\n#define APR_POOL_DEBUG 1\n#endif\n#else\n#define APR_POOL_DEBUG 0\n#endif\n\n/** the place in the code where the particular function was called */\n#define APR_POOL__FILE_LINE__ __FILE__ \":\" APR_STRINGIFY(__LINE__)\n\n\n\n/** A function that is called when allocation fails. */\ntypedef int (*apr_abortfunc_t)(int retcode);\n\n/*\n * APR memory structure manipulators (pools, tables, and arrays).\n */\n\n/*\n * Initialization\n */\n\n/**\n * Setup all of the internal structures required to use pools\n * @remark Programs do NOT need to call this directly.  APR will call this\n *      automatically from apr_initialize.\n * @internal\n */\nAPR_DECLARE(apr_status_t) apr_pool_initialize(void);\n\n/**\n * Tear down all of the internal structures required to use pools\n * @remark Programs do NOT need to call this directly.  APR will call this\n *      automatically from apr_terminate.\n * @internal\n */\nAPR_DECLARE(void) apr_pool_terminate(void);\n\n\n/*\n * Pool creation/destruction\n */\n\n#include \"apr_allocator.h\"\n\n/**\n * Create a new pool.\n * @param newpool The pool we have just created.\n * @param parent The parent pool.  If this is NULL, the new pool is a root\n *        pool.  If it is non-NULL, the new pool will inherit all\n *        of its parent pool's attributes, except the apr_pool_t will\n *        be a sub-pool.\n * @param abort_fn A function to use if the pool cannot allocate more memory.\n * @param allocator The allocator to use with the new pool.  If NULL the\n *        allocator of the parent pool will be used.\n * @remark This function is thread-safe, in the sense that multiple threads\n *         can safely create subpools of the same parent pool concurrently.\n *         Similarly, a subpool can be created by one thread at the same\n *         time that another thread accesses the parent pool.\n */\nAPR_DECLARE(apr_status_t) apr_pool_create_ex(apr_pool_t **newpool,\n                                             apr_pool_t *parent,\n                                             apr_abortfunc_t abort_fn,\n                                             apr_allocator_t *allocator)\n                          __attribute__((nonnull(1)));\n\n/**\n * Create a new pool.\n * @deprecated @see apr_pool_create_unmanaged_ex.\n */\nAPR_DECLARE(apr_status_t) apr_pool_create_core_ex(apr_pool_t **newpool,\n                                                  apr_abortfunc_t abort_fn,\n                                                  apr_allocator_t *allocator);\n\n/**\n * Create a new unmanaged pool.\n * @param newpool The pool we have just created.\n * @param abort_fn A function to use if the pool cannot allocate more memory.\n * @param allocator The allocator to use with the new pool.  If NULL a\n *        new allocator will be created with the new pool as owner.\n * @remark An unmanaged pool is a special pool without a parent; it will\n *         NOT be destroyed upon apr_terminate.  It must be explicitly\n *         destroyed by calling apr_pool_destroy, to prevent memory leaks.\n *         Use of this function is discouraged, think twice about whether\n *         you really really need it.\n * @warning Any child cleanups registered against the new pool, or\n *         against sub-pools thereof, will not be executed during an\n *         invocation of apr_proc_create(), so resources created in an\n *         \"unmanaged\" pool hierarchy will leak to child processes.\n */\nAPR_DECLARE(apr_status_t) apr_pool_create_unmanaged_ex(apr_pool_t **newpool,\n                                                   apr_abortfunc_t abort_fn,\n                                                   apr_allocator_t *allocator)\n                          __attribute__((nonnull(1)));\n\n/**\n * Debug version of apr_pool_create_ex.\n * @param newpool @see apr_pool_create.\n * @param parent @see apr_pool_create.\n * @param abort_fn @see apr_pool_create.\n * @param allocator @see apr_pool_create.\n * @param file_line Where the function is called from.\n *        This is usually APR_POOL__FILE_LINE__.\n * @remark Only available when APR_POOL_DEBUG is defined.\n *         Call this directly if you have your apr_pool_create_ex\n *         calls in a wrapper function and wish to override\n *         the file_line argument to reflect the caller of\n *         your wrapper function.  If you do not have\n *         apr_pool_create_ex in a wrapper, trust the macro\n *         and don't call apr_pool_create_ex_debug directly.\n */\nAPR_DECLARE(apr_status_t) apr_pool_create_ex_debug(apr_pool_t **newpool,\n                                                   apr_pool_t *parent,\n                                                   apr_abortfunc_t abort_fn,\n                                                   apr_allocator_t *allocator,\n                                                   const char *file_line)\n                          __attribute__((nonnull(1)));\n\n#if APR_POOL_DEBUG\n#define apr_pool_create_ex(newpool, parent, abort_fn, allocator)  \\\n    apr_pool_create_ex_debug(newpool, parent, abort_fn, allocator, \\\n                             APR_POOL__FILE_LINE__)\n#endif\n\n/**\n * Debug version of apr_pool_create_core_ex.\n * @deprecated @see apr_pool_create_unmanaged_ex_debug.\n */\nAPR_DECLARE(apr_status_t) apr_pool_create_core_ex_debug(apr_pool_t **newpool,\n                                                   apr_abortfunc_t abort_fn,\n                                                   apr_allocator_t *allocator,\n                                                   const char *file_line);\n\n/**\n * Debug version of apr_pool_create_unmanaged_ex.\n * @param newpool @see apr_pool_create_unmanaged.\n * @param abort_fn @see apr_pool_create_unmanaged.\n * @param allocator @see apr_pool_create_unmanaged.\n * @param file_line Where the function is called from.\n *        This is usually APR_POOL__FILE_LINE__.\n * @remark Only available when APR_POOL_DEBUG is defined.\n *         Call this directly if you have your apr_pool_create_unmanaged_ex\n *         calls in a wrapper function and wish to override\n *         the file_line argument to reflect the caller of\n *         your wrapper function.  If you do not have\n *         apr_pool_create_core_ex in a wrapper, trust the macro\n *         and don't call apr_pool_create_core_ex_debug directly.\n */\nAPR_DECLARE(apr_status_t) apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpool,\n                                                   apr_abortfunc_t abort_fn,\n                                                   apr_allocator_t *allocator,\n                                                   const char *file_line)\n                          __attribute__((nonnull(1)));\n\n#if APR_POOL_DEBUG\n#define apr_pool_create_core_ex(newpool, abort_fn, allocator)  \\\n    apr_pool_create_unmanaged_ex_debug(newpool, abort_fn, allocator, \\\n                                  APR_POOL__FILE_LINE__)\n\n#define apr_pool_create_unmanaged_ex(newpool, abort_fn, allocator)  \\\n    apr_pool_create_unmanaged_ex_debug(newpool, abort_fn, allocator, \\\n                                  APR_POOL__FILE_LINE__)\n\n#endif\n\n/**\n * Create a new pool.\n * @param newpool The pool we have just created.\n * @param parent The parent pool.  If this is NULL, the new pool is a root\n *        pool.  If it is non-NULL, the new pool will inherit all\n *        of its parent pool's attributes, except the apr_pool_t will\n *        be a sub-pool.\n * @remark This function is thread-safe, in the sense that multiple threads\n *         can safely create subpools of the same parent pool concurrently.\n *         Similarly, a subpool can be created by one thread at the same\n *         time that another thread accesses the parent pool.\n */\n#if defined(DOXYGEN)\nAPR_DECLARE(apr_status_t) apr_pool_create(apr_pool_t **newpool,\n                                          apr_pool_t *parent);\n#else\n#if APR_POOL_DEBUG\n#define apr_pool_create(newpool, parent) \\\n    apr_pool_create_ex_debug(newpool, parent, NULL, NULL, \\\n                             APR_POOL__FILE_LINE__)\n#else\n#define apr_pool_create(newpool, parent) \\\n    apr_pool_create_ex(newpool, parent, NULL, NULL)\n#endif\n#endif\n\n/**\n * Create a new unmanaged pool.\n * @param newpool The pool we have just created.\n */\n#if defined(DOXYGEN)\nAPR_DECLARE(apr_status_t) apr_pool_create_core(apr_pool_t **newpool);\nAPR_DECLARE(apr_status_t) apr_pool_create_unmanaged(apr_pool_t **newpool);\n#else\n#if APR_POOL_DEBUG\n#define apr_pool_create_core(newpool) \\\n    apr_pool_create_unmanaged_ex_debug(newpool, NULL, NULL, \\\n                                  APR_POOL__FILE_LINE__)\n#define apr_pool_create_unmanaged(newpool) \\\n    apr_pool_create_unmanaged_ex_debug(newpool, NULL, NULL, \\\n                                  APR_POOL__FILE_LINE__)\n#else\n#define apr_pool_create_core(newpool) \\\n    apr_pool_create_unmanaged_ex(newpool, NULL, NULL)\n#define apr_pool_create_unmanaged(newpool) \\\n    apr_pool_create_unmanaged_ex(newpool, NULL, NULL)\n#endif\n#endif\n\n/**\n * Find the pool's allocator\n * @param pool The pool to get the allocator from.\n */\nAPR_DECLARE(apr_allocator_t *) apr_pool_allocator_get(apr_pool_t *pool)\n                               __attribute__((nonnull(1)));\n\n/**\n * Clear all memory in the pool and run all the cleanups. This also destroys all\n * subpools.\n * @param p The pool to clear\n * @remark This does not actually free the memory, it just allows the pool\n *         to re-use this memory for the next allocation.\n * @see apr_pool_destroy()\n */\nAPR_DECLARE(void) apr_pool_clear(apr_pool_t *p) __attribute__((nonnull(1)));\n\n/**\n * Debug version of apr_pool_clear.\n * @param p See: apr_pool_clear.\n * @param file_line Where the function is called from.\n *        This is usually APR_POOL__FILE_LINE__.\n * @remark Only available when APR_POOL_DEBUG is defined.\n *         Call this directly if you have your apr_pool_clear\n *         calls in a wrapper function and wish to override\n *         the file_line argument to reflect the caller of\n *         your wrapper function.  If you do not have\n *         apr_pool_clear in a wrapper, trust the macro\n *         and don't call apr_pool_destroy_clear directly.\n */\nAPR_DECLARE(void) apr_pool_clear_debug(apr_pool_t *p,\n                                       const char *file_line)\n                  __attribute__((nonnull(1)));\n\n#if APR_POOL_DEBUG\n#define apr_pool_clear(p) \\\n    apr_pool_clear_debug(p, APR_POOL__FILE_LINE__)\n#endif\n\n/**\n * Destroy the pool. This takes similar action as apr_pool_clear() and then\n * frees all the memory.\n * @param p The pool to destroy\n * @remark This will actually free the memory\n */\nAPR_DECLARE(void) apr_pool_destroy(apr_pool_t *p) __attribute__((nonnull(1)));\n\n/**\n * Debug version of apr_pool_destroy.\n * @param p See: apr_pool_destroy.\n * @param file_line Where the function is called from.\n *        This is usually APR_POOL__FILE_LINE__.\n * @remark Only available when APR_POOL_DEBUG is defined.\n *         Call this directly if you have your apr_pool_destroy\n *         calls in a wrapper function and wish to override\n *         the file_line argument to reflect the caller of\n *         your wrapper function.  If you do not have\n *         apr_pool_destroy in a wrapper, trust the macro\n *         and don't call apr_pool_destroy_debug directly.\n */\nAPR_DECLARE(void) apr_pool_destroy_debug(apr_pool_t *p,\n                                         const char *file_line)\n                  __attribute__((nonnull(1)));\n\n#if APR_POOL_DEBUG\n#define apr_pool_destroy(p) \\\n    apr_pool_destroy_debug(p, APR_POOL__FILE_LINE__)\n#endif\n\n\n/*\n * Memory allocation\n */\n\n/**\n * Allocate a block of memory from a pool\n * @param p The pool to allocate from\n * @param size The amount of memory to allocate\n * @return The allocated memory\n */\nAPR_DECLARE(void *) apr_palloc(apr_pool_t *p, apr_size_t size)\n#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))\n                    __attribute__((alloc_size(2)))\n#endif\n                    __attribute__((nonnull(1)));\n\n/**\n * Debug version of apr_palloc\n * @param p See: apr_palloc\n * @param size See: apr_palloc\n * @param file_line Where the function is called from.\n *        This is usually APR_POOL__FILE_LINE__.\n * @return See: apr_palloc\n */\nAPR_DECLARE(void *) apr_palloc_debug(apr_pool_t *p, apr_size_t size,\n                                     const char *file_line)\n#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))\n                    __attribute__((alloc_size(2)))\n#endif\n                    __attribute__((nonnull(1)));\n\n#if APR_POOL_DEBUG\n#define apr_palloc(p, size) \\\n    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)\n#endif\n\n/**\n * Allocate a block of memory from a pool and set all of the memory to 0\n * @param p The pool to allocate from\n * @param size The amount of memory to allocate\n * @return The allocated memory\n */\n#if defined(DOXYGEN)\nAPR_DECLARE(void *) apr_pcalloc(apr_pool_t *p, apr_size_t size);\n#elif !APR_POOL_DEBUG\n#define apr_pcalloc(p, size) memset(apr_palloc(p, size), 0, size)\n#endif\n\n/**\n * Debug version of apr_pcalloc\n * @param p See: apr_pcalloc\n * @param size See: apr_pcalloc\n * @param file_line Where the function is called from.\n *        This is usually APR_POOL__FILE_LINE__.\n * @return See: apr_pcalloc\n */\nAPR_DECLARE(void *) apr_pcalloc_debug(apr_pool_t *p, apr_size_t size,\n                                      const char *file_line)\n                    __attribute__((nonnull(1)));\n\n#if APR_POOL_DEBUG\n#define apr_pcalloc(p, size) \\\n    apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)\n#endif\n\n\n/*\n * Pool Properties\n */\n\n/**\n * Set the function to be called when an allocation failure occurs.\n * @remark If the program wants APR to exit on a memory allocation error,\n *      then this function can be called to set the callback to use (for\n *      performing cleanup and then exiting). If this function is not called,\n *      then APR will return an error and expect the calling program to\n *      deal with the error accordingly.\n */\nAPR_DECLARE(void) apr_pool_abort_set(apr_abortfunc_t abortfunc,\n                                     apr_pool_t *pool)\n                  __attribute__((nonnull(2)));\n\n/**\n * Get the abort function associated with the specified pool.\n * @param pool The pool for retrieving the abort function.\n * @return The abort function for the given pool.\n */\nAPR_DECLARE(apr_abortfunc_t) apr_pool_abort_get(apr_pool_t *pool)\n                             __attribute__((nonnull(1)));\n\n/**\n * Get the parent pool of the specified pool.\n * @param pool The pool for retrieving the parent pool.\n * @return The parent of the given pool.\n */\nAPR_DECLARE(apr_pool_t *) apr_pool_parent_get(apr_pool_t *pool)\n                          __attribute__((nonnull(1)));\n\n/**\n * Determine if pool a is an ancestor of pool b.\n * @param a The pool to search\n * @param b The pool to search for\n * @return True if a is an ancestor of b, NULL is considered an ancestor\n *         of all pools.\n * @remark if compiled with APR_POOL_DEBUG, this function will also\n * return true if A is a pool which has been guaranteed by the caller\n * (using apr_pool_join) to have a lifetime at least as long as some\n * ancestor of pool B.\n */\nAPR_DECLARE(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b);\n\n/**\n * Tag a pool (give it a name)\n * @param pool The pool to tag\n * @param tag  The tag\n */\nAPR_DECLARE(void) apr_pool_tag(apr_pool_t *pool, const char *tag)\n                  __attribute__((nonnull(1)));\n\n\n/*\n * User data management\n */\n\n/**\n * Set the data associated with the current pool\n * @param data The user data associated with the pool.\n * @param key The key to use for association\n * @param cleanup The cleanup program to use to cleanup the data (NULL if none)\n * @param pool The current pool\n * @warning The data to be attached to the pool should have a life span\n *          at least as long as the pool it is being attached to.\n *\n *      Users of APR must take EXTREME care when choosing a key to\n *      use for their data.  It is possible to accidentally overwrite\n *      data by choosing a key that another part of the program is using.\n *      Therefore it is advised that steps are taken to ensure that unique\n *      keys are used for all of the userdata objects in a particular pool\n *      (the same key in two different pools or a pool and one of its\n *      subpools is okay) at all times.  Careful namespace prefixing of\n *      key names is a typical way to help ensure this uniqueness.\n *\n */\nAPR_DECLARE(apr_status_t) apr_pool_userdata_set(const void *data,\n                                                const char *key,\n                                                apr_status_t (*cleanup)(void *),\n                                                apr_pool_t *pool)\n                          __attribute__((nonnull(2,4)));\n\n/**\n * Set the data associated with the current pool\n * @param data The user data associated with the pool.\n * @param key The key to use for association\n * @param cleanup The cleanup program to use to cleanup the data (NULL if none)\n * @param pool The current pool\n * @note same as apr_pool_userdata_set(), except that this version doesn't\n *       make a copy of the key (this function is useful, for example, when\n *       the key is a string literal)\n * @warning This should NOT be used if the key could change addresses by\n *       any means between the apr_pool_userdata_setn() call and a\n *       subsequent apr_pool_userdata_get() on that key, such as if a\n *       static string is used as a userdata key in a DSO and the DSO could\n *       be unloaded and reloaded between the _setn() and the _get().  You\n *       MUST use apr_pool_userdata_set() in such cases.\n * @warning More generally, the key and the data to be attached to the\n *       pool should have a life span at least as long as the pool itself.\n *\n */\nAPR_DECLARE(apr_status_t) apr_pool_userdata_setn(\n                                const void *data, const char *key,\n                                apr_status_t (*cleanup)(void *),\n                                apr_pool_t *pool)\n                          __attribute__((nonnull(2,4)));\n\n/**\n * Return the data associated with the current pool.\n * @param data The user data associated with the pool.\n * @param key The key for the data to retrieve\n * @param pool The current pool.\n */\nAPR_DECLARE(apr_status_t) apr_pool_userdata_get(void **data, const char *key,\n                                                apr_pool_t *pool)\n                          __attribute__((nonnull(1,2,3)));\n\n\n/**\n * @defgroup PoolCleanup  Pool Cleanup Functions\n *\n * Cleanups are performed in the reverse order they were registered.  That is:\n * Last In, First Out.  A cleanup function can safely allocate memory from\n * the pool that is being cleaned up. It can also safely register additional\n * cleanups which will be run LIFO, directly after the current cleanup\n * terminates.  Cleanups have to take caution in calling functions that\n * create subpools. Subpools, created during cleanup will NOT automatically\n * be cleaned up.  In other words, cleanups are to clean up after themselves.\n *\n * @{\n */\n\n/**\n * Register a function to be called when a pool is cleared or destroyed\n * @param p The pool to register the cleanup with\n * @param data The data to pass to the cleanup function.\n * @param plain_cleanup The function to call when the pool is cleared\n *                      or destroyed\n * @param child_cleanup The function to call when a child process is about\n *                      to exec - this function is called in the child, obviously!\n */\nAPR_DECLARE(void) apr_pool_cleanup_register(\n                            apr_pool_t *p, const void *data,\n                            apr_status_t (*plain_cleanup)(void *),\n                            apr_status_t (*child_cleanup)(void *))\n                  __attribute__((nonnull(3,4)));\n\n/**\n * Register a function to be called when a pool is cleared or destroyed.\n *\n * Unlike apr_pool_cleanup_register which registers a cleanup\n * that is called AFTER all subpools are destroyed, this function registers\n * a function that will be called before any of the subpools are destroyed.\n *\n * @param p The pool to register the cleanup with\n * @param data The data to pass to the cleanup function.\n * @param plain_cleanup The function to call when the pool is cleared\n *                      or destroyed\n */\nAPR_DECLARE(void) apr_pool_pre_cleanup_register(\n                            apr_pool_t *p, const void *data,\n                            apr_status_t (*plain_cleanup)(void *))\n                  __attribute__((nonnull(3)));\n\n/**\n * Remove a previously registered cleanup function.\n * \n * The cleanup most recently registered with @a p having the same values of\n * @a data and @a cleanup will be removed.\n *\n * @param p The pool to remove the cleanup from\n * @param data The data of the registered cleanup\n * @param cleanup The function to remove from cleanup\n * @remarks For some strange reason only the plain_cleanup is handled by this\n *          function\n */\nAPR_DECLARE(void) apr_pool_cleanup_kill(apr_pool_t *p, const void *data,\n                                        apr_status_t (*cleanup)(void *))\n                  __attribute__((nonnull(3)));\n\n/**\n * Replace the child cleanup function of a previously registered cleanup.\n * \n * The cleanup most recently registered with @a p having the same values of\n * @a data and @a plain_cleanup will have the registered child cleanup\n * function replaced with @a child_cleanup.\n *\n * @param p The pool of the registered cleanup\n * @param data The data of the registered cleanup\n * @param plain_cleanup The plain cleanup function of the registered cleanup\n * @param child_cleanup The function to register as the child cleanup\n */\nAPR_DECLARE(void) apr_pool_child_cleanup_set(\n                        apr_pool_t *p, const void *data,\n                        apr_status_t (*plain_cleanup)(void *),\n                        apr_status_t (*child_cleanup)(void *))\n                  __attribute__((nonnull(3,4)));\n\n/**\n * Run the specified cleanup function immediately and unregister it.\n *\n * The cleanup most recently registered with @a p having the same values of\n * @a data and @a cleanup will be removed and @a cleanup will be called\n * with @a data as the argument.\n *\n * @param p The pool to remove the cleanup from\n * @param data The data to remove from cleanup\n * @param cleanup The function to remove from cleanup\n */\nAPR_DECLARE(apr_status_t) apr_pool_cleanup_run(apr_pool_t *p, void *data,\n                                               apr_status_t (*cleanup)(void *))\n                          __attribute__((nonnull(3)));\n\n/**\n * An empty cleanup function.\n * \n * Passed to apr_pool_cleanup_register() when no cleanup is required.\n *\n * @param data The data to cleanup, will not be used by this function.\n */\nAPR_DECLARE_NONSTD(apr_status_t) apr_pool_cleanup_null(void *data);\n\n/**\n * Run all registered child cleanups, in preparation for an exec()\n * call in a forked child -- close files, etc., but *don't* flush I/O\n * buffers, *don't* wait for subprocesses, and *don't* free any\n * memory.\n */\nAPR_DECLARE(void) apr_pool_cleanup_for_exec(void);\n\n/** @} */\n\n/**\n * @defgroup PoolDebug Pool Debugging functions.\n *\n * pools have nested lifetimes -- sub_pools are destroyed when the\n * parent pool is cleared.  We allow certain liberties with operations\n * on things such as tables (and on other structures in a more general\n * sense) where we allow the caller to insert values into a table which\n * were not allocated from the table's pool.  The table's data will\n * remain valid as long as all the pools from which its values are\n * allocated remain valid.\n *\n * For example, if B is a sub pool of A, and you build a table T in\n * pool B, then it's safe to insert data allocated in A or B into T\n * (because B lives at most as long as A does, and T is destroyed when\n * B is cleared/destroyed).  On the other hand, if S is a table in\n * pool A, it is safe to insert data allocated in A into S, but it\n * is *not safe* to insert data allocated from B into S... because\n * B can be cleared/destroyed before A is (which would leave dangling\n * pointers in T's data structures).\n *\n * In general we say that it is safe to insert data into a table T\n * if the data is allocated in any ancestor of T's pool.  This is the\n * basis on which the APR_POOL_DEBUG code works -- it tests these ancestor\n * relationships for all data inserted into tables.  APR_POOL_DEBUG also\n * provides tools (apr_pool_find, and apr_pool_is_ancestor) for other\n * folks to implement similar restrictions for their own data\n * structures.\n *\n * However, sometimes this ancestor requirement is inconvenient --\n * sometimes it's necessary to create a sub pool where the sub pool is\n * guaranteed to have the same lifetime as the parent pool.  This is a\n * guarantee implemented by the *caller*, not by the pool code.  That\n * is, the caller guarantees they won't destroy the sub pool\n * individually prior to destroying the parent pool.\n *\n * In this case the caller must call apr_pool_join() to indicate this\n * guarantee to the APR_POOL_DEBUG code.\n *\n * These functions are only implemented when #APR_POOL_DEBUG is set.\n *\n * @{\n */\n#if APR_POOL_DEBUG || defined(DOXYGEN)\n/**\n * Guarantee that a subpool has the same lifetime as the parent.\n * @param p The parent pool\n * @param sub The subpool\n */\nAPR_DECLARE(void) apr_pool_join(apr_pool_t *p, apr_pool_t *sub)\n                  __attribute__((nonnull(2)));\n\n/**\n * Find a pool from something allocated in it.\n * @param mem The thing allocated in the pool\n * @return The pool it is allocated in\n */\nAPR_DECLARE(apr_pool_t *) apr_pool_find(const void *mem);\n\n/**\n * Report the number of bytes currently in the pool\n * @param p The pool to inspect\n * @param recurse Recurse/include the subpools' sizes\n * @return The number of bytes\n */\nAPR_DECLARE(apr_size_t) apr_pool_num_bytes(apr_pool_t *p, int recurse)\n                        __attribute__((nonnull(1)));\n\n/**\n * Lock a pool\n * @param pool The pool to lock\n * @param flag  The flag\n */\nAPR_DECLARE(void) apr_pool_lock(apr_pool_t *pool, int flag);\n\n/* @} */\n\n#else /* APR_POOL_DEBUG or DOXYGEN */\n\n#ifdef apr_pool_join\n#undef apr_pool_join\n#endif\n#define apr_pool_join(a,b)\n\n#ifdef apr_pool_lock\n#undef apr_pool_lock\n#endif\n#define apr_pool_lock(pool, lock)\n\n#endif /* APR_POOL_DEBUG or DOXYGEN */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* !APR_POOLS_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_portable.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* This header file is where you should put ANY platform specific information.\n * This should be the only header file that programs need to include that \n * actually has platform dependent code which refers to the .\n */\n#ifndef APR_PORTABLE_H\n#define APR_PORTABLE_H\n/**\n * @file apr_portable.h\n * @brief APR Portability Routines\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_thread_proc.h\"\n#include \"apr_file_io.h\"\n#include \"apr_network_io.h\"\n#include \"apr_errno.h\"\n#include \"apr_global_mutex.h\"\n#include \"apr_proc_mutex.h\"\n#include \"apr_time.h\"\n#include \"apr_dso.h\"\n#include \"apr_shm.h\"\n\n#if APR_HAVE_DIRENT_H\n#include <dirent.h>\n#endif\n#if APR_HAVE_FCNTL_H\n#include <fcntl.h>\n#endif\n#if APR_HAVE_PTHREAD_H\n#include <pthread.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_portabile Portability Routines\n * @ingroup APR \n * @{\n */\n\n#ifdef WIN32\n/* The primitives for Windows types */\ntypedef HANDLE                apr_os_file_t;\ntypedef HANDLE                apr_os_dir_t;\ntypedef SOCKET                apr_os_sock_t;\ntypedef HANDLE                apr_os_proc_mutex_t;\ntypedef HANDLE                apr_os_thread_t;\ntypedef HANDLE                apr_os_proc_t;\ntypedef DWORD                 apr_os_threadkey_t; \ntypedef FILETIME              apr_os_imp_time_t;\ntypedef SYSTEMTIME            apr_os_exp_time_t;\ntypedef HANDLE                apr_os_dso_handle_t;\ntypedef HANDLE                apr_os_shm_t;\n\n#elif defined(OS2)\ntypedef HFILE                 apr_os_file_t;\ntypedef HDIR                  apr_os_dir_t;\ntypedef int                   apr_os_sock_t;\ntypedef HMTX                  apr_os_proc_mutex_t;\ntypedef TID                   apr_os_thread_t;\ntypedef PID                   apr_os_proc_t;\ntypedef PULONG                apr_os_threadkey_t; \ntypedef struct timeval        apr_os_imp_time_t;\ntypedef struct tm             apr_os_exp_time_t;\ntypedef HMODULE               apr_os_dso_handle_t;\ntypedef void*                 apr_os_shm_t;\n\n#elif defined(__BEOS__)\n#include <kernel/OS.h>\n#include <kernel/image.h>\n\nstruct apr_os_proc_mutex_t {\n\tsem_id sem;\n\tint32  ben;\n};\n\ntypedef int                   apr_os_file_t;\ntypedef DIR                   apr_os_dir_t;\ntypedef int                   apr_os_sock_t;\ntypedef struct apr_os_proc_mutex_t  apr_os_proc_mutex_t;\ntypedef thread_id             apr_os_thread_t;\ntypedef thread_id             apr_os_proc_t;\ntypedef int                   apr_os_threadkey_t;\ntypedef struct timeval        apr_os_imp_time_t;\ntypedef struct tm             apr_os_exp_time_t;\ntypedef image_id              apr_os_dso_handle_t;\ntypedef void*                 apr_os_shm_t;\n\n#elif defined(NETWARE)\ntypedef int                   apr_os_file_t;\ntypedef DIR                   apr_os_dir_t;\ntypedef int                   apr_os_sock_t;\ntypedef NXMutex_t             apr_os_proc_mutex_t;\ntypedef NXThreadId_t          apr_os_thread_t;\ntypedef long                  apr_os_proc_t;\ntypedef NXKey_t               apr_os_threadkey_t; \ntypedef struct timeval        apr_os_imp_time_t;\ntypedef struct tm             apr_os_exp_time_t;\ntypedef void *                apr_os_dso_handle_t;\ntypedef void*                 apr_os_shm_t;\n\n#else\n/* Any other OS should go above this one.  This is the lowest common\n * denominator typedefs for  all UNIX-like systems.  :)\n */\n\n/** Basic OS process mutex structure. */\nstruct apr_os_proc_mutex_t {\n#if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE\n    /** Value used for SYS V Semaphore, FCNTL and FLOCK serialization */\n    int crossproc;\n#endif\n#if APR_HAS_PROC_PTHREAD_SERIALIZE\n    /** Value used for PTHREAD serialization */\n    pthread_mutex_t *pthread_interproc;\n#endif\n#if APR_HAS_THREADS\n    /* If no threads, no need for thread locks */\n#if APR_USE_PTHREAD_SERIALIZE\n    /** This value is currently unused within APR and Apache */ \n    pthread_mutex_t *intraproc;\n#endif\n#endif\n};\n\ntypedef int                   apr_os_file_t;        /**< native file */\ntypedef DIR                   apr_os_dir_t;         /**< native dir */\ntypedef int                   apr_os_sock_t;        /**< native dir */\ntypedef struct apr_os_proc_mutex_t  apr_os_proc_mutex_t; /**< native process\n                                                          *   mutex\n                                                          */\n#if APR_HAS_THREADS && APR_HAVE_PTHREAD_H \ntypedef pthread_t             apr_os_thread_t;      /**< native thread */\ntypedef pthread_key_t         apr_os_threadkey_t;   /**< native thread address\n                                                     *   space */\n#endif\ntypedef pid_t                 apr_os_proc_t;        /**< native pid */\ntypedef struct timeval        apr_os_imp_time_t;    /**< native timeval */\ntypedef struct tm             apr_os_exp_time_t;    /**< native tm */\n/** @var apr_os_dso_handle_t\n * native dso types\n */\n#if defined(HPUX) || defined(HPUX10) || defined(HPUX11)\n#include <dl.h>\ntypedef shl_t                 apr_os_dso_handle_t;\n#elif defined(DARWIN)\n#include <mach-o/dyld.h>\ntypedef NSModule              apr_os_dso_handle_t;\n#else\ntypedef void *                apr_os_dso_handle_t;\n#endif\ntypedef void*                 apr_os_shm_t;         /**< native SHM */\n\n#endif\n\n/**\n * @typedef apr_os_sock_info_t\n * @brief alias for local OS socket\n */\n/**\n * everything APR needs to know about an active socket to construct\n * an APR socket from it; currently, this is platform-independent\n */\nstruct apr_os_sock_info_t {\n    apr_os_sock_t *os_sock; /**< always required */\n    struct sockaddr *local; /**< NULL if not yet bound */\n    struct sockaddr *remote; /**< NULL if not connected */\n    int family;             /**< always required (APR_INET, APR_INET6, etc.) */\n    int type;               /**< always required (SOCK_STREAM, SOCK_DGRAM, etc.) */\n    int protocol;           /**< 0 or actual protocol (APR_PROTO_SCTP, APR_PROTO_TCP, etc.) */\n};\n\ntypedef struct apr_os_sock_info_t apr_os_sock_info_t;\n\n#if APR_PROC_MUTEX_IS_GLOBAL || defined(DOXYGEN)\n/** Opaque global mutex type */\n#define apr_os_global_mutex_t apr_os_proc_mutex_t\n/** @return apr_os_global_mutex */\n#define apr_os_global_mutex_get apr_os_proc_mutex_get\n#else\n    /** Thread and process mutex for those platforms where process mutexes\n     *  are not held in threads.\n     */\n    struct apr_os_global_mutex_t {\n        apr_pool_t *pool;\n        apr_proc_mutex_t *proc_mutex;\n#if APR_HAS_THREADS\n        apr_thread_mutex_t *thread_mutex;\n#endif /* APR_HAS_THREADS */\n    };\n    typedef struct apr_os_global_mutex_t apr_os_global_mutex_t;\n\nAPR_DECLARE(apr_status_t) apr_os_global_mutex_get(apr_os_global_mutex_t *ospmutex, \n                                                apr_global_mutex_t *pmutex);\n#endif\n\n\n/**\n * convert the file from apr type to os specific type.\n * @param thefile The os specific file we are converting to\n * @param file The apr file to convert.\n * @remark On Unix, it is only possible to get a file descriptor from \n *         an apr file type.\n */\nAPR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile,\n                                          apr_file_t *file);\n\n/**\n * convert the dir from apr type to os specific type.\n * @param thedir The os specific dir we are converting to\n * @param dir The apr dir to convert.\n */   \nAPR_DECLARE(apr_status_t) apr_os_dir_get(apr_os_dir_t **thedir, \n                                         apr_dir_t *dir);\n\n/**\n * Convert the socket from an apr type to an OS specific socket\n * @param thesock The socket to convert.\n * @param sock The os specific equivalent of the apr socket..\n */\nAPR_DECLARE(apr_status_t) apr_os_sock_get(apr_os_sock_t *thesock,\n                                          apr_socket_t *sock);\n\n/**\n * Convert the proc mutex from os specific type to apr type\n * @param ospmutex The os specific proc mutex we are converting to.\n * @param pmutex The apr proc mutex to convert.\n */\nAPR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex, \n                                                apr_proc_mutex_t *pmutex);\n\n/**\n * Get the exploded time in the platforms native format.\n * @param ostime the native time format\n * @param aprtime the time to convert\n */\nAPR_DECLARE(apr_status_t) apr_os_exp_time_get(apr_os_exp_time_t **ostime,\n                                 apr_time_exp_t *aprtime);\n\n/**\n * Get the imploded time in the platforms native format.\n * @param ostime  the native time format\n * @param aprtime the time to convert\n */\nAPR_DECLARE(apr_status_t) apr_os_imp_time_get(apr_os_imp_time_t **ostime, \n                                              apr_time_t *aprtime);\n\n/**\n * convert the shm from apr type to os specific type.\n * @param osshm The os specific shm representation\n * @param shm The apr shm to convert.\n */   \nAPR_DECLARE(apr_status_t) apr_os_shm_get(apr_os_shm_t *osshm,\n                                         apr_shm_t *shm);\n\n#if APR_HAS_THREADS || defined(DOXYGEN)\n/** \n * @defgroup apr_os_thread Thread portability Routines\n * @{ \n */\n/**\n * convert the thread to os specific type from apr type.\n * @param thethd The apr thread to convert\n * @param thd The os specific thread we are converting to\n */\nAPR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd, \n                                            apr_thread_t *thd);\n\n/**\n * convert the thread private memory key to os specific type from an apr type.\n * @param thekey The apr handle we are converting from.\n * @param key The os specific handle we are converting to.\n */\nAPR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey,\n                                               apr_threadkey_t *key);\n\n/**\n * convert the thread from os specific type to apr type.\n * @param thd The apr thread we are converting to.\n * @param thethd The os specific thread to convert\n * @param cont The pool to use if it is needed.\n */\nAPR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd,\n                                            apr_os_thread_t *thethd,\n                                            apr_pool_t *cont);\n\n/**\n * convert the thread private memory key from os specific type to apr type.\n * @param key The apr handle we are converting to.\n * @param thekey The os specific handle to convert\n * @param cont The pool to use if it is needed.\n */\nAPR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key,\n                                               apr_os_threadkey_t *thekey,\n                                               apr_pool_t *cont);\n/**\n * Get the thread ID\n */\nAPR_DECLARE(apr_os_thread_t) apr_os_thread_current(void);\n\n/**\n * Compare two thread id's\n * @param tid1 1st Thread ID to compare\n * @param tid2 2nd Thread ID to compare\n * @return non-zero if the two threads are equal, zero otherwise\n */ \nAPR_DECLARE(int) apr_os_thread_equal(apr_os_thread_t tid1, \n                                     apr_os_thread_t tid2);\n\n/** @} */\n#endif /* APR_HAS_THREADS */\n\n/**\n * convert the file from os specific type to apr type.\n * @param file The apr file we are converting to.\n * @param thefile The os specific file to convert\n * @param flags The flags that were used to open this file.\n * @param cont The pool to use if it is needed.\n * @remark On Unix, it is only possible to put a file descriptor into\n *         an apr file type.\n */\nAPR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,\n                                          apr_os_file_t *thefile,\n                                          apr_int32_t flags, apr_pool_t *cont); \n\n/**\n * convert the file from os specific type to apr type.\n * @param file The apr file we are converting to.\n * @param thefile The os specific pipe to convert\n * @param cont The pool to use if it is needed.\n * @remark On Unix, it is only possible to put a file descriptor into\n *         an apr file type.\n */\nAPR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,\n                                          apr_os_file_t *thefile,\n                                          apr_pool_t *cont);\n\n/**\n * convert the file from os specific type to apr type.\n * @param file The apr file we are converting to.\n * @param thefile The os specific pipe to convert\n * @param register_cleanup A cleanup will be registered on the apr_file_t\n *   to issue apr_file_close().\n * @param cont The pool to use if it is needed.\n * @remark On Unix, it is only possible to put a file descriptor into\n *         an apr file type.\n */\nAPR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,\n                                             apr_os_file_t *thefile,\n                                             int register_cleanup,\n                                             apr_pool_t *cont);\n\n/**\n * convert the dir from os specific type to apr type.\n * @param dir The apr dir we are converting to.\n * @param thedir The os specific dir to convert\n * @param cont The pool to use when creating to apr directory.\n */\nAPR_DECLARE(apr_status_t) apr_os_dir_put(apr_dir_t **dir,\n                                         apr_os_dir_t *thedir,\n                                         apr_pool_t *cont); \n\n/**\n * Convert a socket from the os specific type to the apr type\n * @param sock The pool to use.\n * @param thesock The socket to convert to.\n * @param cont The socket we are converting to an apr type.\n * @remark If it is a true socket, it is best to call apr_os_sock_make()\n *         and provide APR with more information about the socket.\n */\nAPR_DECLARE(apr_status_t) apr_os_sock_put(apr_socket_t **sock, \n                                          apr_os_sock_t *thesock, \n                                          apr_pool_t *cont);\n\n/**\n * Create a socket from an existing descriptor and local and remote\n * socket addresses.\n * @param apr_sock The new socket that has been set up\n * @param os_sock_info The os representation of the socket handle and\n *        other characteristics of the socket\n * @param cont The pool to use\n * @remark If you only know the descriptor/handle or if it isn't really\n *         a true socket, use apr_os_sock_put() instead.\n */\nAPR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,\n                                           apr_os_sock_info_t *os_sock_info,\n                                           apr_pool_t *cont);\n\n/**\n * Convert the proc mutex from os specific type to apr type\n * @param pmutex The apr proc mutex we are converting to.\n * @param ospmutex The os specific proc mutex to convert.\n * @param cont The pool to use if it is needed.\n */\nAPR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,\n                                                apr_os_proc_mutex_t *ospmutex,\n                                                apr_pool_t *cont); \n\n/**\n * Put the imploded time in the APR format.\n * @param aprtime the APR time format\n * @param ostime the time to convert\n * @param cont the pool to use if necessary\n */\nAPR_DECLARE(apr_status_t) apr_os_imp_time_put(apr_time_t *aprtime,\n                                              apr_os_imp_time_t **ostime,\n                                              apr_pool_t *cont); \n\n/**\n * Put the exploded time in the APR format.\n * @param aprtime the APR time format\n * @param ostime the time to convert\n * @param cont the pool to use if necessary\n */\nAPR_DECLARE(apr_status_t) apr_os_exp_time_put(apr_time_exp_t *aprtime,\n                                              apr_os_exp_time_t **ostime,\n                                              apr_pool_t *cont); \n\n/**\n * convert the shared memory from os specific type to apr type.\n * @param shm The apr shm representation of osshm\n * @param osshm The os specific shm identity\n * @param cont The pool to use if it is needed.\n * @remark On fork()ed architectures, this is typically nothing more than\n * the memory block mapped.  On non-fork architectures, this is typically\n * some internal handle to pass the mapping from process to process.\n */\nAPR_DECLARE(apr_status_t) apr_os_shm_put(apr_shm_t **shm,\n                                         apr_os_shm_t *osshm,\n                                         apr_pool_t *cont); \n\n\n#if APR_HAS_DSO || defined(DOXYGEN)\n/** \n * @defgroup apr_os_dso DSO (Dynamic Loading) Portability Routines\n * @{\n */\n/**\n * convert the dso handle from os specific to apr\n * @param dso The apr handle we are converting to\n * @param thedso the os specific handle to convert\n * @param pool the pool to use if it is needed\n */\nAPR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **dso,\n                                                apr_os_dso_handle_t thedso,\n                                                apr_pool_t *pool);\n\n/**\n * convert the apr dso handle into an os specific one\n * @param aprdso The apr dso handle to convert\n * @param dso The os specific dso to return\n */\nAPR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *dso,\n                                                apr_dso_handle_t *aprdso);\n\n/** @} */\n#endif /* APR_HAS_DSO */\n\n\n#if APR_HAS_OS_UUID\n/**\n * Private: apr-util's apr_uuid module when supported by the platform\n */\nAPR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data);\n#endif\n\n\n/**\n * Get the name of the system default character set.\n * @param pool the pool to allocate the name from, if needed\n */\nAPR_DECLARE(const char*) apr_os_default_encoding(apr_pool_t *pool);\n\n\n/**\n * Get the name of the current locale character set.\n * @param pool the pool to allocate the name from, if needed\n * @remark Defers to apr_os_default_encoding if the current locale's\n * data can't be retrieved on this system.\n */\nAPR_DECLARE(const char*) apr_os_locale_encoding(apr_pool_t *pool);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_PORTABLE_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_proc_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_PROC_MUTEX_H\n#define APR_PROC_MUTEX_H\n\n/**\n * @file apr_proc_mutex.h\n * @brief APR Process Locking Routines\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_proc_mutex Process Locking Routines\n * @ingroup APR \n * @{\n */\n\n/** \n * Enumerated potential types for APR process locking methods\n * @warning Check APR_HAS_foo_SERIALIZE defines to see if the platform supports\n *          APR_LOCK_foo.  Only APR_LOCK_DEFAULT is portable.\n */\ntypedef enum {\n    APR_LOCK_FCNTL,         /**< fcntl() */\n    APR_LOCK_FLOCK,         /**< flock() */\n    APR_LOCK_SYSVSEM,       /**< System V Semaphores */\n    APR_LOCK_PROC_PTHREAD,  /**< POSIX pthread process-based locking */\n    APR_LOCK_POSIXSEM,      /**< POSIX semaphore process-based locking */\n    APR_LOCK_DEFAULT        /**< Use the default process lock */\n} apr_lockmech_e;\n\n/** Opaque structure representing a process mutex. */\ntypedef struct apr_proc_mutex_t apr_proc_mutex_t;\n\n/*   Function definitions */\n\n/**\n * Create and initialize a mutex that can be used to synchronize processes.\n * @param mutex the memory address where the newly created mutex will be\n *        stored.\n * @param fname A file name to use if the lock mechanism requires one.  This\n *        argument should always be provided.  The lock code itself will\n *        determine if it should be used.\n * @param mech The mechanism to use for the interprocess lock, if any; one of\n * <PRE>\n *            APR_LOCK_FCNTL\n *            APR_LOCK_FLOCK\n *            APR_LOCK_SYSVSEM\n *            APR_LOCK_POSIXSEM\n *            APR_LOCK_PROC_PTHREAD\n *            APR_LOCK_DEFAULT     pick the default mechanism for the platform\n * </PRE>\n * @param pool the pool from which to allocate the mutex.\n * @see apr_lockmech_e\n * @warning Check APR_HAS_foo_SERIALIZE defines to see if the platform supports\n *          APR_LOCK_foo.  Only APR_LOCK_DEFAULT is portable.\n */\nAPR_DECLARE(apr_status_t) apr_proc_mutex_create(apr_proc_mutex_t **mutex,\n                                                const char *fname,\n                                                apr_lockmech_e mech,\n                                                apr_pool_t *pool);\n\n/**\n * Re-open a mutex in a child process.\n * @param mutex The newly re-opened mutex structure.\n * @param fname A file name to use if the mutex mechanism requires one.  This\n *              argument should always be provided.  The mutex code itself will\n *              determine if it should be used.  This filename should be the \n *              same one that was passed to apr_proc_mutex_create().\n * @param pool The pool to operate on.\n * @remark This function must be called to maintain portability, even\n *         if the underlying lock mechanism does not require it.\n */\nAPR_DECLARE(apr_status_t) apr_proc_mutex_child_init(apr_proc_mutex_t **mutex,\n                                                    const char *fname,\n                                                    apr_pool_t *pool);\n\n/**\n * Acquire the lock for the given mutex. If the mutex is already locked,\n * the current thread will be put to sleep until the lock becomes available.\n * @param mutex the mutex on which to acquire the lock.\n */\nAPR_DECLARE(apr_status_t) apr_proc_mutex_lock(apr_proc_mutex_t *mutex);\n\n/**\n * Attempt to acquire the lock for the given mutex. If the mutex has already\n * been acquired, the call returns immediately with APR_EBUSY. Note: it\n * is important that the APR_STATUS_IS_EBUSY(s) macro be used to determine\n * if the return value was APR_EBUSY, for portability reasons.\n * @param mutex the mutex on which to attempt the lock acquiring.\n */\nAPR_DECLARE(apr_status_t) apr_proc_mutex_trylock(apr_proc_mutex_t *mutex);\n\n/**\n * Release the lock for the given mutex.\n * @param mutex the mutex from which to release the lock.\n */\nAPR_DECLARE(apr_status_t) apr_proc_mutex_unlock(apr_proc_mutex_t *mutex);\n\n/**\n * Destroy the mutex and free the memory associated with the lock.\n * @param mutex the mutex to destroy.\n */\nAPR_DECLARE(apr_status_t) apr_proc_mutex_destroy(apr_proc_mutex_t *mutex);\n\n/**\n * Destroy the mutex and free the memory associated with the lock.\n * @param mutex the mutex to destroy.\n * @note This function is generally used to kill a cleanup on an already\n *       created mutex\n */\nAPR_DECLARE(apr_status_t) apr_proc_mutex_cleanup(void *mutex);\n\n/**\n * Return the name of the lockfile for the mutex, or NULL\n * if the mutex doesn't use a lock file\n */\n\nAPR_DECLARE(const char *) apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex);\n\n/**\n * Display the name of the mutex, as it relates to the actual method used.\n * This matches the valid options for Apache's AcceptMutex directive\n * @param mutex the name of the mutex\n */\nAPR_DECLARE(const char *) apr_proc_mutex_name(apr_proc_mutex_t *mutex);\n\n/**\n * Display the name of the default mutex: APR_LOCK_DEFAULT\n */\nAPR_DECLARE(const char *) apr_proc_mutex_defname(void);\n\n/**\n * Get the pool used by this proc_mutex.\n * @return apr_pool_t the pool\n */\nAPR_POOL_DECLARE_ACCESSOR(proc_mutex);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_PROC_MUTEX_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_random.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_RANDOM_H\n#define APR_RANDOM_H\n\n/**\n * @file apr_random.h\n * @brief APR PRNG routines\n */\n\n#include \"apr_pools.h\"\n#include \"apr_thread_proc.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_random PRNG Routines\n * @ingroup APR\n * @{\n */\n\ntypedef struct apr_crypto_hash_t apr_crypto_hash_t;\n\ntypedef void apr_crypto_hash_init_t(apr_crypto_hash_t *hash);\ntypedef void apr_crypto_hash_add_t(apr_crypto_hash_t *hash, const void *data,\n                                   apr_size_t bytes);\ntypedef void apr_crypto_hash_finish_t(apr_crypto_hash_t *hash,\n                                      unsigned char *result);\n\n\n/* FIXME: make this opaque */\nstruct apr_crypto_hash_t {\n    apr_crypto_hash_init_t *init;\n    apr_crypto_hash_add_t *add;\n    apr_crypto_hash_finish_t *finish;\n    apr_size_t size;\n    void *data;\n};\n\n/**\n * Allocate and initialize the SHA-256 context\n * @param p The pool to allocate from\n */\nAPR_DECLARE(apr_crypto_hash_t *) apr_crypto_sha256_new(apr_pool_t *p);\n\n/** Opaque PRNG structure. */\ntypedef struct apr_random_t apr_random_t;\n\n/**\n * Initialize a PRNG state\n * @param g The PRNG state\n * @param p The pool to allocate from\n * @param pool_hash Pool hash functions\n * @param key_hash Key hash functions\n * @param prng_hash PRNG hash functions\n */\nAPR_DECLARE(void) apr_random_init(apr_random_t *g, apr_pool_t *p,\n                                  apr_crypto_hash_t *pool_hash,\n                                  apr_crypto_hash_t *key_hash,\n                                  apr_crypto_hash_t *prng_hash);\n/**\n * Allocate and initialize (apr_crypto_sha256_new) a new PRNG state.\n * @param p The pool to allocate from\n */\nAPR_DECLARE(apr_random_t *) apr_random_standard_new(apr_pool_t *p);\n\n/**\n * Mix the randomness pools.\n * @param g The PRNG state\n * @param entropy_ Entropy buffer\n * @param bytes Length of entropy_ in bytes\n */\nAPR_DECLARE(void) apr_random_add_entropy(apr_random_t *g,\n                                         const void *entropy_,\n                                         apr_size_t bytes);\n/**\n * Generate cryptographically insecure random bytes.\n * @param g The RNG state\n * @param random Buffer to fill with random bytes\n * @param bytes Length of buffer in bytes\n */\nAPR_DECLARE(apr_status_t) apr_random_insecure_bytes(apr_random_t *g,\n                                                    void *random,\n                                                    apr_size_t bytes);\n\n/**\n * Generate cryptographically secure random bytes.\n * @param g The RNG state\n * @param random Buffer to fill with random bytes\n * @param bytes Length of buffer in bytes\n */\nAPR_DECLARE(apr_status_t) apr_random_secure_bytes(apr_random_t *g,\n                                                  void *random,\n                                                  apr_size_t bytes);\n/**\n * Ensures that E bits of conditional entropy are mixed into the PRNG\n * before any further randomness is extracted.\n * @param g The RNG state\n */\nAPR_DECLARE(void) apr_random_barrier(apr_random_t *g);\n\n/**\n * Return APR_SUCCESS if the cryptographic PRNG has been seeded with\n * enough data, APR_ENOTENOUGHENTROPY otherwise.\n * @param r The RNG state\n */\nAPR_DECLARE(apr_status_t) apr_random_secure_ready(apr_random_t *r);\n\n/**\n * Return APR_SUCCESS if the PRNG has been seeded with enough data,\n * APR_ENOTENOUGHENTROPY otherwise.\n * @param r The PRNG state\n */\nAPR_DECLARE(apr_status_t) apr_random_insecure_ready(apr_random_t *r);\n\n/**\n * Mix the randomness pools after forking.\n * @param proc The resulting process handle from apr_proc_fork()\n * @remark Call this in the child after forking to mix the randomness\n * pools. Note that its generally a bad idea to fork a process with a\n * real PRNG in it - better to have the PRNG externally and get the\n * randomness from there. However, if you really must do it, then you\n * should supply all your entropy to all the PRNGs - don't worry, they\n * won't produce the same output.\n * @remark Note that apr_proc_fork() calls this for you, so only weird\n * applications need ever call it themselves.\n * @internal\n */\nAPR_DECLARE(void) apr_random_after_fork(apr_proc_t *proc);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* !APR_RANDOM_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_ring.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * This code draws heavily from the 4.4BSD <sys/queue.h> macros\n * and Dean Gaudet's \"splim/ring.h\".\n * <http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/queue.h>\n * <http://www.arctic.org/~dean/splim/>\n *\n * We'd use Dean's code directly if we could guarantee the\n * availability of inline functions.\n */\n\n#ifndef APR_RING_H\n#define APR_RING_H\n\n/**\n * @file apr_ring.h\n * @brief APR Rings\n */\n\n/*\n * for offsetof()\n */\n#include \"apr_general.h\"\n\n/**\n * @defgroup apr_ring Ring Macro Implementations\n * @ingroup APR \n * A ring is a kind of doubly-linked list that can be manipulated\n * without knowing where its head is.\n * @{\n */\n\n/**\n * The Ring Element\n *\n * A ring element struct is linked to the other elements in the ring\n * through its ring entry field, e.g.\n * <pre>\n *      struct my_element_t {\n *          APR_RING_ENTRY(my_element_t) link;\n *          int foo;\n *          char *bar;\n *      };\n * </pre>\n *\n * An element struct may be put on more than one ring if it has more\n * than one APR_RING_ENTRY field. Each APR_RING_ENTRY has a corresponding\n * APR_RING_HEAD declaration.\n *\n * @warning For strict C standards compliance you should put the APR_RING_ENTRY\n * first in the element struct unless the head is always part of a larger\n * object with enough earlier fields to accommodate the offsetof() used\n * to compute the ring sentinel below. You can usually ignore this caveat.\n */\n#define APR_RING_ENTRY(elem)\t\t\t\t\t\t\\\n    struct {\t\t\t\t\t\t\t\t\\\n\tstruct elem * volatile next;\t\t\t\t\t\\\n\tstruct elem * volatile prev;\t\t\t\t\t\\\n    }\n\n/**\n * The Ring Head\n *\n * Each ring is managed via its head, which is a struct declared like this:\n * <pre>\n *      APR_RING_HEAD(my_ring_t, my_element_t);\n *      struct my_ring_t ring, *ringp;\n * </pre>\n *\n * This struct looks just like the element link struct so that we can\n * be sure that the typecasting games will work as expected.\n *\n * The first element in the ring is next after the head, and the last\n * element is just before the head.\n */\n#define APR_RING_HEAD(head, elem)\t\t\t\t\t\\\n    struct head {\t\t\t\t\t\t\t\\\n\tstruct elem * volatile next;\t\t\t\t\t\\\n\tstruct elem * volatile prev;\t\t\t\t\t\\\n    }\n\n/**\n * The Ring Sentinel\n *\n * This is the magic pointer value that occurs before the first and\n * after the last elements in the ring, computed from the address of\n * the ring's head.  The head itself isn't an element, but in order to\n * get rid of all the special cases when dealing with the ends of the\n * ring, we play typecasting games to make it look like one.\n *\n * Here is a diagram to illustrate the arrangements of the next and\n * prev pointers of each element in a single ring. Note that they point\n * to the start of each element, not to the APR_RING_ENTRY structure.\n *\n * <pre>\n *     +->+------+<-+  +->+------+<-+  +->+------+<-+\n *     |  |struct|  |  |  |struct|  |  |  |struct|  |\n *    /   | elem |   \\/   | elem |   \\/   | elem |  \\\n * ...    |      |   /\\   |      |   /\\   |      |   ...\n *        +------+  |  |  +------+  |  |  +------+\n *   ...--|prev  |  |  +--|ring  |  |  +--|prev  |\n *        |  next|--+     | entry|--+     |  next|--...\n *        +------+        +------+        +------+\n *        | etc. |        | etc. |        | etc. |\n *        :      :        :      :        :      :\n * </pre>\n *\n * The APR_RING_HEAD is nothing but a bare APR_RING_ENTRY. The prev\n * and next pointers in the first and last elements don't actually\n * point to the head, they point to a phantom place called the\n * sentinel. Its value is such that last->next->next == first because\n * the offset from the sentinel to the head's next pointer is the same\n * as the offset from the start of an element to its next pointer.\n * This also works in the opposite direction.\n *\n * <pre>\n *        last                            first\n *     +->+------+<-+  +->sentinel<-+  +->+------+<-+\n *     |  |struct|  |  |            |  |  |struct|  |\n *    /   | elem |   \\/              \\/   | elem |  \\\n * ...    |      |   /\\              /\\   |      |   ...\n *        +------+  |  |  +------+  |  |  +------+\n *   ...--|prev  |  |  +--|ring  |  |  +--|prev  |\n *        |  next|--+     |  head|--+     |  next|--...\n *        +------+        +------+        +------+\n *        | etc. |                        | etc. |\n *        :      :                        :      :\n * </pre>\n *\n * Note that the offset mentioned above is different for each kind of\n * ring that the element may be on, and each kind of ring has a unique\n * name for its APR_RING_ENTRY in each element, and has its own type\n * for its APR_RING_HEAD.\n *\n * Note also that if the offset is non-zero (which is required if an\n * element has more than one APR_RING_ENTRY), the unreality of the\n * sentinel may have bad implications on very perverse implementations\n * of C -- see the warning in APR_RING_ENTRY.\n *\n * @param hp   The head of the ring\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_SENTINEL(hp, elem, link)\t\t\t\t\\\n    (struct elem *)((char *)(&(hp)->next) - APR_OFFSETOF(struct elem, link))\n\n/**\n * The first element of the ring\n * @param hp   The head of the ring\n */\n#define APR_RING_FIRST(hp)\t(hp)->next\n/**\n * The last element of the ring\n * @param hp   The head of the ring\n */\n#define APR_RING_LAST(hp)\t(hp)->prev\n/**\n * The next element in the ring\n * @param ep   The current element\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_NEXT(ep, link)\t(ep)->link.next\n/**\n * The previous element in the ring\n * @param ep   The current element\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_PREV(ep, link)\t(ep)->link.prev\n\n\n/**\n * Initialize a ring\n * @param hp   The head of the ring\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_INIT(hp, elem, link) do {\t\t\t\t\\\n\tAPR_RING_FIRST((hp)) = APR_RING_SENTINEL((hp), elem, link);\t\\\n\tAPR_RING_LAST((hp))  = APR_RING_SENTINEL((hp), elem, link);\t\\\n    } while (0)\n\n/**\n * Determine if a ring is empty\n * @param hp   The head of the ring\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n * @return true or false\n */\n#define APR_RING_EMPTY(hp, elem, link)\t\t\t\t\t\\\n    (APR_RING_FIRST((hp)) == APR_RING_SENTINEL((hp), elem, link))\n\n/**\n * Initialize a singleton element\n * @param ep   The element\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_ELEM_INIT(ep, link) do {\t\t\t\t\\\n\tAPR_RING_NEXT((ep), link) = (ep);\t\t\t\t\\\n\tAPR_RING_PREV((ep), link) = (ep);\t\t\t\t\\\n    } while (0)\n\n\n/**\n * Splice the sequence ep1..epN into the ring before element lep\n *   (..lep.. becomes ..ep1..epN..lep..)\n * @warning This doesn't work for splicing before the first element or on\n *   empty rings... see APR_RING_SPLICE_HEAD for one that does\n * @param lep  Element in the ring to splice before\n * @param ep1  First element in the sequence to splice in\n * @param epN  Last element in the sequence to splice in\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_SPLICE_BEFORE(lep, ep1, epN, link) do {\t\t\\\n\tAPR_RING_NEXT((epN), link) = (lep);\t\t\t\t\\\n\tAPR_RING_PREV((ep1), link) = APR_RING_PREV((lep), link);\t\\\n\tAPR_RING_NEXT(APR_RING_PREV((lep), link), link) = (ep1);\t\\\n\tAPR_RING_PREV((lep), link) = (epN);\t\t\t\t\\\n    } while (0)\n\n/**\n * Splice the sequence ep1..epN into the ring after element lep\n *   (..lep.. becomes ..lep..ep1..epN..)\n * @warning This doesn't work for splicing after the last element or on\n *   empty rings... see APR_RING_SPLICE_TAIL for one that does\n * @param lep  Element in the ring to splice after\n * @param ep1  First element in the sequence to splice in\n * @param epN  Last element in the sequence to splice in\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_SPLICE_AFTER(lep, ep1, epN, link) do {\t\t\t\\\n\tAPR_RING_PREV((ep1), link) = (lep);\t\t\t\t\\\n\tAPR_RING_NEXT((epN), link) = APR_RING_NEXT((lep), link);\t\\\n\tAPR_RING_PREV(APR_RING_NEXT((lep), link), link) = (epN);\t\\\n\tAPR_RING_NEXT((lep), link) = (ep1);\t\t\t\t\\\n    } while (0)\n\n/**\n * Insert the element nep into the ring before element lep\n *   (..lep.. becomes ..nep..lep..)\n * @warning This doesn't work for inserting before the first element or on\n *   empty rings... see APR_RING_INSERT_HEAD for one that does\n * @param lep  Element in the ring to insert before\n * @param nep  Element to insert\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_INSERT_BEFORE(lep, nep, link)\t\t\t\t\\\n\tAPR_RING_SPLICE_BEFORE((lep), (nep), (nep), link)\n\n/**\n * Insert the element nep into the ring after element lep\n *   (..lep.. becomes ..lep..nep..)\n * @warning This doesn't work for inserting after the last element or on\n *   empty rings... see APR_RING_INSERT_TAIL for one that does\n * @param lep  Element in the ring to insert after\n * @param nep  Element to insert\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_INSERT_AFTER(lep, nep, link)\t\t\t\t\\\n\tAPR_RING_SPLICE_AFTER((lep), (nep), (nep), link)\n\n\n/**\n * Splice the sequence ep1..epN into the ring before the first element\n *   (..hp.. becomes ..hp..ep1..epN..)\n * @param hp   Head of the ring\n * @param ep1  First element in the sequence to splice in\n * @param epN  Last element in the sequence to splice in\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_SPLICE_HEAD(hp, ep1, epN, elem, link)\t\t\t\\\n\tAPR_RING_SPLICE_AFTER(APR_RING_SENTINEL((hp), elem, link),\t\\\n\t\t\t     (ep1), (epN), link)\n\n/**\n * Splice the sequence ep1..epN into the ring after the last element\n *   (..hp.. becomes ..ep1..epN..hp..)\n * @param hp   Head of the ring\n * @param ep1  First element in the sequence to splice in\n * @param epN  Last element in the sequence to splice in\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_SPLICE_TAIL(hp, ep1, epN, elem, link)\t\t\t\\\n\tAPR_RING_SPLICE_BEFORE(APR_RING_SENTINEL((hp), elem, link),\t\\\n\t\t\t     (ep1), (epN), link)\n\n/**\n * Insert the element nep into the ring before the first element\n *   (..hp.. becomes ..hp..nep..)\n * @param hp   Head of the ring\n * @param nep  Element to insert\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_INSERT_HEAD(hp, nep, elem, link)\t\t\t\\\n\tAPR_RING_SPLICE_HEAD((hp), (nep), (nep), elem, link)\n\n/**\n * Insert the element nep into the ring after the last element\n *   (..hp.. becomes ..nep..hp..)\n * @param hp   Head of the ring\n * @param nep  Element to insert\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_INSERT_TAIL(hp, nep, elem, link)\t\t\t\\\n\tAPR_RING_SPLICE_TAIL((hp), (nep), (nep), elem, link)\n\n/**\n * Concatenate ring h2 onto the end of ring h1, leaving h2 empty.\n * @param h1   Head of the ring to concatenate onto\n * @param h2   Head of the ring to concatenate\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_CONCAT(h1, h2, elem, link) do {\t\t\t\\\n\tif (!APR_RING_EMPTY((h2), elem, link)) {\t\t\t\\\n\t    APR_RING_SPLICE_BEFORE(APR_RING_SENTINEL((h1), elem, link),\t\\\n\t\t\t\t  APR_RING_FIRST((h2)),\t\t\t\\\n\t\t\t\t  APR_RING_LAST((h2)), link);\t\t\\\n\t    APR_RING_INIT((h2), elem, link);\t\t\t\t\\\n\t}\t\t\t\t\t\t\t\t\\\n    } while (0)\n\n/**\n * Prepend ring h2 onto the beginning of ring h1, leaving h2 empty.\n * @param h1   Head of the ring to prepend onto\n * @param h2   Head of the ring to prepend\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_PREPEND(h1, h2, elem, link) do {\t\t\t\\\n\tif (!APR_RING_EMPTY((h2), elem, link)) {\t\t\t\\\n\t    APR_RING_SPLICE_AFTER(APR_RING_SENTINEL((h1), elem, link),\t\\\n\t\t\t\t  APR_RING_FIRST((h2)),\t\t\t\\\n\t\t\t\t  APR_RING_LAST((h2)), link);\t\t\\\n\t    APR_RING_INIT((h2), elem, link);\t\t\t\t\\\n\t}\t\t\t\t\t\t\t\t\\\n    } while (0)\n\n/**\n * Unsplice a sequence of elements from a ring\n * @warning The unspliced sequence is left with dangling pointers at either end\n * @param ep1  First element in the sequence to unsplice\n * @param epN  Last element in the sequence to unsplice\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_UNSPLICE(ep1, epN, link) do {\t\t\t\t\\\n\tAPR_RING_NEXT(APR_RING_PREV((ep1), link), link) =\t\t\\\n\t\t     APR_RING_NEXT((epN), link);\t\t\t\\\n\tAPR_RING_PREV(APR_RING_NEXT((epN), link), link) =\t\t\\\n\t\t     APR_RING_PREV((ep1), link);\t\t\t\\\n    } while (0)\n\n/**\n * Remove a single element from a ring\n * @warning The unspliced element is left with dangling pointers at either end\n * @param ep   Element to remove\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_REMOVE(ep, link)\t\t\t\t\t\\\n    APR_RING_UNSPLICE((ep), (ep), link)\n\n/**\n * Iterate over a ring\n * @param ep The current element\n * @param head The head of the ring\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_FOREACH(ep, head, elem, link)                          \\\n    for (ep = APR_RING_FIRST(head);                                     \\\n         ep != APR_RING_SENTINEL(head, elem, link);                     \\\n         ep = APR_RING_NEXT(ep, link))\n\n/**\n * Iterate over a ring safe against removal of the current element\n * @param ep1 The current element\n * @param ep2 Iteration cursor\n * @param head The head of the ring\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_FOREACH_SAFE(ep1, ep2, head, elem, link)               \\\n    for (ep1 = APR_RING_FIRST(head), ep2 = APR_RING_NEXT(ep1, link);    \\\n         ep1 != APR_RING_SENTINEL(head, elem, link);                    \\\n         ep1 = ep2, ep2 = APR_RING_NEXT(ep1, link))\n\n/* Debugging tools: */\n\n#ifdef APR_RING_DEBUG\n#include <stdio.h>\n#include <assert.h>\n\n#define APR_RING_CHECK_ONE(msg, ptr)\t\t\t\t\t\\\n\tfprintf(stderr, \"*** %s %p\\n\", msg, ptr)\n\n#define APR_RING_CHECK(hp, elem, link, msg)\t\t\t\t\\\n\tAPR_RING_CHECK_ELEM(APR_RING_SENTINEL(hp, elem, link), elem, link, msg)\n\n#define APR_RING_CHECK_ELEM(ep, elem, link, msg) do {\t\t\t\\\n\tstruct elem *start = (ep);\t\t\t\t\t\\\n\tstruct elem *here = start;\t\t\t\t\t\\\n\tfprintf(stderr, \"*** ring check start -- %s\\n\", msg);\t\t\\\n\tdo {\t\t\t\t\t\t\t\t\\\n\t    fprintf(stderr, \"\\telem %p\\n\", here);\t\t\t\\\n\t    fprintf(stderr, \"\\telem->next %p\\n\",\t\t\t\\\n\t\t    APR_RING_NEXT(here, link));\t\t\t\t\\\n\t    fprintf(stderr, \"\\telem->prev %p\\n\",\t\t\t\\\n\t\t    APR_RING_PREV(here, link));\t\t\t\t\\\n\t    fprintf(stderr, \"\\telem->next->prev %p\\n\",\t\t\t\\\n\t\t    APR_RING_PREV(APR_RING_NEXT(here, link), link));\t\\\n\t    fprintf(stderr, \"\\telem->prev->next %p\\n\",\t\t\t\\\n\t\t    APR_RING_NEXT(APR_RING_PREV(here, link), link));\t\\\n\t    if (APR_RING_PREV(APR_RING_NEXT(here, link), link) != here) { \\\n\t\tfprintf(stderr, \"\\t*** elem->next->prev != elem\\n\");\t\\\n\t\tbreak;\t\t\t\t\t\t\t\\\n\t    }\t\t\t\t\t\t\t\t\\\n\t    if (APR_RING_NEXT(APR_RING_PREV(here, link), link) != here) { \\\n\t\tfprintf(stderr, \"\\t*** elem->prev->next != elem\\n\");\t\\\n\t\tbreak;\t\t\t\t\t\t\t\\\n\t    }\t\t\t\t\t\t\t\t\\\n\t    here = APR_RING_NEXT(here, link);\t\t\t\t\\\n\t} while (here != start);\t\t\t\t\t\\\n\tfprintf(stderr, \"*** ring check end\\n\");\t\t\t\\\n    } while (0)\n\n#define APR_RING_CHECK_CONSISTENCY(hp, elem, link)\t\t\t\\\n\tAPR_RING_CHECK_ELEM_CONSISTENCY(APR_RING_SENTINEL(hp, elem, link),\\\n\t\t\t\t\telem, link)\n\n#define APR_RING_CHECK_ELEM_CONSISTENCY(ep, elem, link) do {\t\t\\\n\tstruct elem *start = (ep);\t\t\t\t\t\\\n\tstruct elem *here = start;\t\t\t\t\t\\\n\tdo {\t\t\t\t\t\t\t\t\\\n\t    assert(APR_RING_PREV(APR_RING_NEXT(here, link), link) == here); \\\n\t    assert(APR_RING_NEXT(APR_RING_PREV(here, link), link) == here); \\\n\t    here = APR_RING_NEXT(here, link);\t\t\t\t\\\n\t} while (here != start);\t\t\t\t\t\\\n    } while (0)\n\n#else\n/**\n * Print a single pointer value to STDERR\n *   (This is a no-op unless APR_RING_DEBUG is defined.)\n * @param msg Descriptive message\n * @param ptr Pointer value to print\n */\n#define APR_RING_CHECK_ONE(msg, ptr)\n/**\n * Dump all ring pointers to STDERR, starting with the head and looping all\n * the way around the ring back to the head.  Aborts if an inconsistency\n * is found.\n *   (This is a no-op unless APR_RING_DEBUG is defined.)\n * @param hp   Head of the ring\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n * @param msg  Descriptive message\n */\n#define APR_RING_CHECK(hp, elem, link, msg)\n/**\n * Loops around a ring and checks all the pointers for consistency.  Pops\n * an assertion if any inconsistency is found.  Same idea as APR_RING_CHECK()\n * except that it's silent if all is well.\n *   (This is a no-op unless APR_RING_DEBUG is defined.)\n * @param hp   Head of the ring\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_CHECK_CONSISTENCY(hp, elem, link)\n/**\n * Dump all ring pointers to STDERR, starting with the given element and\n * looping all the way around the ring back to that element.  Aborts if\n * an inconsistency is found.\n *   (This is a no-op unless APR_RING_DEBUG is defined.)\n * @param ep   The element\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n * @param msg  Descriptive message\n */\n#define APR_RING_CHECK_ELEM(ep, elem, link, msg)\n/**\n * Loops around a ring, starting with the given element, and checks all\n * the pointers for consistency.  Pops an assertion if any inconsistency\n * is found.  Same idea as APR_RING_CHECK_ELEM() except that it's silent\n * if all is well.\n *   (This is a no-op unless APR_RING_DEBUG is defined.)\n * @param ep   The element\n * @param elem The name of the element struct\n * @param link The name of the APR_RING_ENTRY in the element struct\n */\n#define APR_RING_CHECK_ELEM_CONSISTENCY(ep, elem, link)\n#endif\n\n/** @} */ \n\n#endif /* !APR_RING_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_shm.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_SHM_H\n#define APR_SHM_H\n\n/**\n * @file apr_shm.h\n * @brief APR Shared Memory Routines\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_shm Shared Memory Routines\n * @ingroup APR \n * @{\n */\n\n/**\n * Private, platform-specific data struture representing a shared memory\n * segment.\n */\ntypedef struct apr_shm_t apr_shm_t;\n\n/**\n * Create and make accessible a shared memory segment with default\n * properties.\n * @param m The shared memory structure to create.\n * @param reqsize The desired size of the segment.\n * @param filename The file to use for shared memory on platforms that\n *        require it.\n * @param pool the pool from which to allocate the shared memory\n *        structure.\n * @remark A note about Anonymous vs. Named shared memory segments:\n *         Not all plaforms support anonymous shared memory segments, but in\n *         some cases it is prefered over other types of shared memory\n *         implementations. Passing a NULL 'file' parameter to this function\n *         will cause the subsystem to use anonymous shared memory segments.\n *         If such a system is not available, APR_ENOTIMPL is returned.\n * @remark A note about allocation sizes:\n *         On some platforms it is necessary to store some metainformation\n *         about the segment within the actual segment. In order to supply\n *         the caller with the requested size it may be necessary for the\n *         implementation to request a slightly greater segment length\n *         from the subsystem. In all cases, the apr_shm_baseaddr_get()\n *         function will return the first usable byte of memory.\n * \n */\nAPR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,\n                                         apr_size_t reqsize,\n                                         const char *filename,\n                                         apr_pool_t *pool);\n\n/**\n * Special processing flags for apr_shm_create_ex() and apr_shm_attach_ex().\n */\n#define APR_SHM_NS_LOCAL    1 /* Create or attach to named shared memory\n                               * segment in the \"Local\" namespace on\n                               * Windows.  (Ignored on other platforms.)\n                               * By default, the \"Global\" namespace is\n                               * used for privileged processes and the\n                               * \"Local\" namespace is used otherwise.\n                               */\n#define APR_SHM_NS_GLOBAL   2 /* Create or attach to named shared memory\n                               * segment in the \"Global\" namespace on\n                               * Windows.  (Ignored on other platforms.)\n                               */\n\n/**\n * Create and make accessible a shared memory segment with platform-\n * specific processing.\n * @param m The shared memory structure to create.\n * @param reqsize The desired size of the segment.\n * @param filename The file to use for shared memory on platforms that\n *        require it.\n * @param pool the pool from which to allocate the shared memory\n *        structure.\n * @param flags mask of APR_SHM_* (defined above)\n * @remark A note about Anonymous vs. Named shared memory segments:\n *         Not all plaforms support anonymous shared memory segments, but in\n *         some cases it is prefered over other types of shared memory\n *         implementations. Passing a NULL 'file' parameter to this function\n *         will cause the subsystem to use anonymous shared memory segments.\n *         If such a system is not available, APR_ENOTIMPL is returned.\n * @remark A note about allocation sizes:\n *         On some platforms it is necessary to store some metainformation\n *         about the segment within the actual segment. In order to supply\n *         the caller with the requested size it may be necessary for the\n *         implementation to request a slightly greater segment length\n *         from the subsystem. In all cases, the apr_shm_baseaddr_get()\n *         function will return the first usable byte of memory.\n * \n */\nAPR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,\n                                            apr_size_t reqsize,\n                                            const char *filename,\n                                            apr_pool_t *pool,\n                                            apr_int32_t flags);\n\n/**\n * Remove named resource associated with a shared memory segment,\n * preventing attachments to the resource, but not destroying it.\n * @param filename The filename associated with shared-memory segment which\n *        needs to be removed\n * @param pool The pool used for file operations\n * @remark This function is only supported on platforms which support\n * name-based shared memory segments, and will return APR_ENOTIMPL on\n * platforms without such support.  Removing the file while the shm\n * is in use is not entirely portable, caller may use this to enhance\n * obscurity of the resource, but be prepared for the call to fail,\n * and for concurrent attempts to create a resource of the same name\n * to also fail.  The pool cleanup of apr_shm_create (apr_shm_destroy)\n * also removes the named resource.\n */\nAPR_DECLARE(apr_status_t) apr_shm_remove(const char *filename,\n                                         apr_pool_t *pool);\n\n/**\n * Destroy a shared memory segment and associated memory.\n * @param m The shared memory segment structure to destroy.\n */\nAPR_DECLARE(apr_status_t) apr_shm_destroy(apr_shm_t *m);\n\n/**\n * Attach to a shared memory segment that was created\n * by another process.\n * @param m The shared memory structure to create.\n * @param filename The file used to create the original segment.\n *        (This MUST match the original filename.)\n * @param pool the pool from which to allocate the shared memory\n *        structure for this process.\n */\nAPR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,\n                                         const char *filename,\n                                         apr_pool_t *pool);\n\n/**\n * Attach to a shared memory segment that was created\n * by another process, with platform-specific processing.\n * @param m The shared memory structure to create.\n * @param filename The file used to create the original segment.\n *        (This MUST match the original filename.)\n * @param pool the pool from which to allocate the shared memory\n *        structure for this process.\n * @param flags mask of APR_SHM_* (defined above)\n */\nAPR_DECLARE(apr_status_t) apr_shm_attach_ex(apr_shm_t **m,\n                                            const char *filename,\n                                            apr_pool_t *pool,\n                                            apr_int32_t flags);\n\n/**\n * Detach from a shared memory segment without destroying it.\n * @param m The shared memory structure representing the segment\n *        to detach from.\n */\nAPR_DECLARE(apr_status_t) apr_shm_detach(apr_shm_t *m);\n\n/**\n * Retrieve the base address of the shared memory segment.\n * NOTE: This address is only usable within the callers address\n * space, since this API does not guarantee that other attaching\n * processes will maintain the same address mapping.\n * @param m The shared memory segment from which to retrieve\n *        the base address.\n * @return address, aligned by APR_ALIGN_DEFAULT.\n */\nAPR_DECLARE(void *) apr_shm_baseaddr_get(const apr_shm_t *m);\n\n/**\n * Retrieve the length of a shared memory segment in bytes.\n * @param m The shared memory segment from which to retrieve\n *        the segment length.\n */\nAPR_DECLARE(apr_size_t) apr_shm_size_get(const apr_shm_t *m);\n\n/**\n * Get the pool used by this shared memory segment.\n */\nAPR_POOL_DECLARE_ACCESSOR(shm);\n\n/** @} */ \n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* APR_SHM_T */\n"
  },
  {
    "path": "third_party/include/apr/apr_signal.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_SIGNAL_H\n#define APR_SIGNAL_H\n\n/**\n * @file apr_signal.h\n * @brief APR Signal Handling\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n\n#if APR_HAVE_SIGNAL_H\n#include <signal.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_signal Signal Handling\n * @ingroup APR\n * @{\n */\n\n#if APR_HAVE_SIGACTION || defined(DOXYGEN)\n\n#if defined(DARWIN) && !defined(__cplusplus) && !defined(_ANSI_SOURCE)\n/* work around Darwin header file bugs\n *   http://www.opensource.apple.com/bugs/X/BSD%20Kernel/2657228.html\n */\n#undef SIG_DFL\n#undef SIG_IGN\n#undef SIG_ERR\n#define SIG_DFL (void (*)(int))0\n#define SIG_IGN (void (*)(int))1\n#define SIG_ERR (void (*)(int))-1\n#endif\n\n/** Function prototype for signal handlers */\ntypedef void apr_sigfunc_t(int);\n\n/**\n * Set the signal handler function for a given signal\n * @param signo The signal (eg... SIGWINCH)\n * @param func the function to get called\n */\nAPR_DECLARE(apr_sigfunc_t *) apr_signal(int signo, apr_sigfunc_t * func);\n\n#if defined(SIG_IGN) && !defined(SIG_ERR)\n#define SIG_ERR ((apr_sigfunc_t *) -1)\n#endif\n\n#else /* !APR_HAVE_SIGACTION */\n#define apr_signal(a, b) signal(a, b)\n#endif\n\n\n/**\n * Get the description for a specific signal number\n * @param signum The signal number\n * @return The description of the signal\n */\nAPR_DECLARE(const char *) apr_signal_description_get(int signum);\n\n/**\n * APR-private function for initializing the signal package\n * @internal\n * @param pglobal The internal, global pool\n */\nvoid apr_signal_init(apr_pool_t *pglobal);\n\n/**\n * Block the delivery of a particular signal\n * @param signum The signal number\n * @return status\n */\nAPR_DECLARE(apr_status_t) apr_signal_block(int signum);\n\n/**\n * Enable the delivery of a particular signal\n * @param signum The signal number\n * @return status\n */\nAPR_DECLARE(apr_status_t) apr_signal_unblock(int signum);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* APR_SIGNAL_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_skiplist.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_SKIPLIST_H\n#define APR_SKIPLIST_H\n/**\n * @file apr_skiplist.h\n * @brief APR skip list implementation\n */\n\n#include \"apr.h\"\n#include \"apr_portable.h\"\n#include <stdlib.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_skiplist Skip list implementation\n * Refer to http://en.wikipedia.org/wiki/Skip_list for information\n * about the purpose of and ideas behind skip lists.\n * @ingroup APR\n * @{\n */\n\n/**\n * apr_skiplist_compare is the function type that must be implemented \n * per object type that is used in a skip list for comparisons to maintain\n * order. A value <0 indicates placement after this node; a value of 0\n * indicates collision with this exact node; a value >0 indicates placement\n * before this node.\n * */\ntypedef int (*apr_skiplist_compare) (void *, void *);\n\n/**\n * apr_skiplist_freefunc is the function type that must be implemented\n * to handle elements as they are removed from a skip list.\n */\ntypedef void (*apr_skiplist_freefunc) (void *);\n\n/** Opaque structure used to represent the skip list */\nstruct apr_skiplist;\n/** Opaque structure used to represent the skip list */\ntypedef struct apr_skiplist apr_skiplist;\n\n/** \n * Opaque structure used to represent abstract nodes in the skip list\n * (an abstraction above the raw elements which are collected in the\n * skip list).\n */\nstruct apr_skiplistnode;\n/** Opaque structure */\ntypedef struct apr_skiplistnode apr_skiplistnode;\n\n/**\n * Allocate memory using the same mechanism as the skip list.\n * @param sl The skip list\n * @param size The amount to allocate\n * @remark If a pool was provided to apr_skiplist_init(), memory will\n * be allocated from the pool or from a free list maintained with\n * the skip list.  Otherwise, memory will be allocated using the\n * C standard library heap functions.\n */\nAPR_DECLARE(void *) apr_skiplist_alloc(apr_skiplist *sl, size_t size);\n\n/**\n * Free memory using the same mechanism as the skip list.\n * @param sl The skip list\n * @param mem The object to free\n * @remark If a pool was provided to apr_skiplist_init(), memory will\n * be added to a free list maintained with the skip list and be available\n * to operations on the skip list or to other calls to apr_skiplist_alloc().\n * Otherwise, memory will be freed using the  C standard library heap\n * functions.\n */\nAPR_DECLARE(void) apr_skiplist_free(apr_skiplist *sl, void *mem);\n\n/**\n * Allocate a new skip list\n * @param sl The pointer in which to return the newly created skip list\n * @param p The pool from which to allocate the skip list (optional).\n * @remark Unlike most APR functions, a pool is optional.  If no pool\n * is provided, the C standard library heap functions will be used instead.\n */\nAPR_DECLARE(apr_status_t) apr_skiplist_init(apr_skiplist **sl, apr_pool_t *p);\n\n/**\n * Set the comparison functions to be used for searching the skip list.\n * @param sl The skip list\n * @param XXX1 FIXME\n * @param XXX2 FIXME\n *\n * @remark If existing comparison functions are being replaced, the index\n * will be replaced during this call.  That is a potentially expensive\n * operation.\n */\nAPR_DECLARE(void) apr_skiplist_set_compare(apr_skiplist *sl, apr_skiplist_compare XXX1,\n                             apr_skiplist_compare XXX2);\n\n/**\n * Set the indexing functions to the specified comparison functions and\n * rebuild the index.\n * @param sl The skip list\n * @param XXX1 FIXME\n * @param XXX2 FIXME\n *\n * @remark If an index already exists, it will not be replaced and the\n * comparison functions will not be changed.\n */\nAPR_DECLARE(void) apr_skiplist_add_index(apr_skiplist *sl, apr_skiplist_compare XXX1,\n                        apr_skiplist_compare XXX2);\n\n/**\n * Return the list maintained by the skip list abstraction.\n * @param sl The skip list\n */\nAPR_DECLARE(apr_skiplistnode *) apr_skiplist_getlist(apr_skiplist *sl);\n\n/**\n * Return the next matching element in the skip list using the specified\n * comparison function.\n * @param sl The skip list\n * @param data The value to search for\n * @param iter A pointer to the returned skip list node representing the element\n * found\n * @param func The comparison function to use\n */\nAPR_DECLARE(void *) apr_skiplist_find_compare(apr_skiplist *sl,\n                               void *data,\n                               apr_skiplistnode **iter,\n                               apr_skiplist_compare func);\n\n/**\n * Return the next matching element in the skip list using the current comparison\n * function.\n * @param sl The skip list\n * @param data The value to search for\n * @param iter A pointer to the returned skip list node representing the element\n * found\n */\nAPR_DECLARE(void *) apr_skiplist_find(apr_skiplist *sl, void *data, apr_skiplistnode **iter);\n\n/**\n * Return the next element in the skip list.\n * @param sl The skip list\n * @param iter On entry, a pointer to the skip list node to start with; on return,\n * a pointer to the skip list node representing the element returned\n * @remark If iter points to a NULL value on entry, NULL will be returned.\n */\nAPR_DECLARE(void *) apr_skiplist_next(apr_skiplist *sl, apr_skiplistnode **iter);\n\n/**\n * Return the previous element in the skip list.\n * @param sl The skip list\n * @param iter On entry, a pointer to the skip list node to start with; on return,\n * a pointer to the skip list node representing the element returned\n * @remark If iter points to a NULL value on entry, NULL will be returned.\n */\nAPR_DECLARE(void *) apr_skiplist_previous(apr_skiplist *sl, apr_skiplistnode **iter);\n\n/**\n * Insert an element into the skip list using the specified comparison function\n * if it does not already exist.\n * @param sl The skip list\n * @param data The element to insert\n * @param comp The comparison function to use for placement into the skip list\n */\nAPR_DECLARE(apr_skiplistnode *) apr_skiplist_insert_compare(apr_skiplist *sl,\n                                          void *data, apr_skiplist_compare comp);\n\n/**\n * Insert an element into the skip list using the existing comparison function\n * if it does not already exist (as determined by the comparison function)\n * @param sl The skip list\n * @param data The element to insert\n * @remark If no comparison function has been set for the skip list, the element\n * will not be inserted and NULL will be returned.\n */\nAPR_DECLARE(apr_skiplistnode *) apr_skiplist_insert(apr_skiplist* sl, void *data);\n\n/**\n * Remove an element from the skip list using the specified comparison function for\n * locating the element. In the case of duplicates, the 1st entry will be removed.\n * @param sl The skip list\n * @param data The element to remove\n * @param myfree A function to be called for each removed element\n * @param comp The comparison function to use for placement into the skip list\n * @remark If the element is not found, 0 will be returned.  Otherwise, the heightXXX\n * will be returned.\n */\nAPR_DECLARE(int) apr_skiplist_remove_compare(apr_skiplist *sl, void *data,\n                               apr_skiplist_freefunc myfree, apr_skiplist_compare comp);\n\n/**\n * Remove an element from the skip list using the existing comparison function for\n * locating the element. In the case of duplicates, the 1st entry will be removed.\n * @param sl The skip list\n * @param data The element to remove\n * @param myfree A function to be called for each removed element\n * @remark If the element is not found, 0 will be returned.  Otherwise, the heightXXX\n * will be returned.\n * @remark If no comparison function has been set for the skip list, the element\n * will not be removed and 0 will be returned.\n */\nAPR_DECLARE(int) apr_skiplist_remove(apr_skiplist *sl, void *data, apr_skiplist_freefunc myfree);\n\n/**\n * Remove all elements from the skip list.\n * @param sl The skip list\n * @param myfree A function to be called for each removed element\n */\nAPR_DECLARE(void) apr_skiplist_remove_all(apr_skiplist *sl, apr_skiplist_freefunc myfree);\n\n/**\n * Remove each element from the skip list.\n * @param sl The skip list\n * @param myfree A function to be called for each removed element\n */\nAPR_DECLARE(void) apr_skiplist_destroy(apr_skiplist *sl, apr_skiplist_freefunc myfree);\n\n/**\n * Return the first element in the skip list, removing the element from the skip list.\n * @param sl The skip list\n * @param myfree A function to be called for the removed element\n * @remark NULL will be returned if there are no elements\n */\nAPR_DECLARE(void *) apr_skiplist_pop(apr_skiplist *sl, apr_skiplist_freefunc myfree);\n\n/**\n * Return the first element in the skip list, leaving the element in the skip list.\n * @param sl The skip list\n * @remark NULL will be returned if there are no elements\n */\nAPR_DECLARE(void *) apr_skiplist_peek(apr_skiplist *sl);\n\n/**\n * Merge two skip lists.  XXX SEMANTICS\n * @param sl1 One of two skip lists to be merged\n * @param sl2 The other of two skip lists to be merged\n */\nAPR_DECLARE(apr_skiplist *) apr_skiplist_merge(apr_skiplist *sl1, apr_skiplist *sl2);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* ! APR_SKIPLIST_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_strings.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Portions of this file are covered by */\n/* -*- mode: c; c-file-style: \"k&r\" -*-\n\n  strnatcmp.c -- Perform 'natural order' comparisons of strings in C.\n  Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef APR_STRINGS_H\n#define APR_STRINGS_H\n\n/**\n * @file apr_strings.h\n * @brief APR Strings library\n */\n\n#include \"apr.h\"\n#include \"apr_errno.h\"\n#include \"apr_pools.h\"\n#define APR_WANT_IOVEC\n#include \"apr_want.h\"\n\n#if APR_HAVE_STDARG_H\n#include <stdarg.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_strings String routines\n * @ingroup APR \n * @{\n */\n\n/**\n * Do a natural order comparison of two strings.\n * @param a The first string to compare\n * @param b The second string to compare\n * @return Either <0, 0, or >0.  If the first string is less than the second\n *          this returns <0, if they are equivalent it returns 0, and if the\n *          first string is greater than second string it retuns >0.\n */\nAPR_DECLARE(int) apr_strnatcmp(char const *a, char const *b);\n\n/**\n * Do a natural order comparison of two strings ignoring the case of the \n * strings.\n * @param a The first string to compare\n * @param b The second string to compare\n * @return Either <0, 0, or >0.  If the first string is less than the second\n *         this returns <0, if they are equivalent it returns 0, and if the\n *         first string is greater than second string it retuns >0.\n */\nAPR_DECLARE(int) apr_strnatcasecmp(char const *a, char const *b);\n\n/**\n * duplicate a string into memory allocated out of a pool\n * @param p The pool to allocate out of\n * @param s The string to duplicate\n * @return The new string or NULL if s == NULL\n */\nAPR_DECLARE(char *) apr_pstrdup(apr_pool_t *p, const char *s);\n\n/**\n * Create a null-terminated string by making a copy of a sequence\n * of characters and appending a null byte\n * @param p The pool to allocate out of\n * @param s The block of characters to duplicate\n * @param n The number of characters to duplicate\n * @return The new string or NULL if s == NULL\n * @remark This is a faster alternative to apr_pstrndup, for use\n *         when you know that the string being duplicated really\n *         has 'n' or more characters.  If the string might contain\n *         fewer characters, use apr_pstrndup.\n */\nAPR_DECLARE(char *) apr_pstrmemdup(apr_pool_t *p, const char *s, apr_size_t n)\n#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))\n    __attribute__((alloc_size(3)))\n#endif\n    ;\n\n/**\n * Duplicate at most n characters of a string into memory allocated \n * out of a pool; the new string will be NUL-terminated\n * @param p The pool to allocate out of\n * @param s The string to duplicate\n * @param n The maximum number of characters to duplicate\n * @return The new string or NULL if s == NULL\n * @remark The amount of memory allocated from the pool is the length\n *         of the returned string including the NUL terminator\n */\nAPR_DECLARE(char *) apr_pstrndup(apr_pool_t *p, const char *s, apr_size_t n);\n\n/**\n * Duplicate a block of memory.\n *\n * @param p The pool to allocate from\n * @param m The memory to duplicate\n * @param n The number of bytes to duplicate\n * @return The new block of memory or NULL if m == NULL\n */\nAPR_DECLARE(void *) apr_pmemdup(apr_pool_t *p, const void *m, apr_size_t n)\n#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))\n    __attribute__((alloc_size(3)))\n#endif\n    ;\n\n/**\n * Concatenate multiple strings, allocating memory out a pool\n * @param p The pool to allocate out of\n * @param ... The strings to concatenate.  The final string must be NULL\n * @return The new string\n */\nAPR_DECLARE_NONSTD(char *) apr_pstrcat(apr_pool_t *p, ...)\n#if defined(__GNUC__) && __GNUC__ >= 4\n    __attribute__((sentinel))\n#endif\n    ;\n\n/**\n * Concatenate multiple strings specified in a writev-style vector\n * @param p The pool from which to allocate\n * @param vec The strings to concatenate\n * @param nvec The number of strings to concatenate\n * @param nbytes (output) strlen of new string (pass in NULL to omit)\n * @return The new string\n */\nAPR_DECLARE(char *) apr_pstrcatv(apr_pool_t *p, const struct iovec *vec,\n                                 apr_size_t nvec, apr_size_t *nbytes);\n\n/**\n * printf-style style printing routine.  The data is output to a string \n * allocated from a pool\n * @param p The pool to allocate out of\n * @param fmt The format of the string\n * @param ap The arguments to use while printing the data\n * @return The new string\n */\nAPR_DECLARE(char *) apr_pvsprintf(apr_pool_t *p, const char *fmt, va_list ap);\n\n/**\n * printf-style style printing routine.  The data is output to a string \n * allocated from a pool\n * @param p The pool to allocate out of\n * @param fmt The format of the string\n * @param ... The arguments to use while printing the data\n * @return The new string\n */\nAPR_DECLARE_NONSTD(char *) apr_psprintf(apr_pool_t *p, const char *fmt, ...)\n        __attribute__((format(printf,2,3)));\n\n/**\n * Copy up to dst_size characters from src to dst; does not copy\n * past a NUL terminator in src, but always terminates dst with a NUL\n * regardless.\n * @param dst The destination string\n * @param src The source string\n * @param dst_size The space available in dst; dst always receives\n *                 NUL termination, so if src is longer than\n *                 dst_size, the actual number of characters copied is\n *                 dst_size - 1.\n * @return Pointer to the NUL terminator of the destination string, dst\n * @remark\n * <PRE>\n * Note the differences between this function and strncpy():\n *  1) strncpy() doesn't always NUL terminate; apr_cpystrn() does.\n *  2) strncpy() pads the destination string with NULs, which is often \n *     unnecessary; apr_cpystrn() does not.\n *  3) strncpy() returns a pointer to the beginning of the dst string;\n *     apr_cpystrn() returns a pointer to the NUL terminator of dst, \n *     to allow a check for truncation.\n * </PRE>\n */\nAPR_DECLARE(char *) apr_cpystrn(char *dst, const char *src,\n                                apr_size_t dst_size);\n\n/**\n * Remove all whitespace from a string\n * @param dest The destination string.  It is okay to modify the string\n *             in place.  Namely dest == src\n * @param src The string to rid the spaces from.\n * @return A pointer to the destination string's null terminator.\n */\nAPR_DECLARE(char *) apr_collapse_spaces(char *dest, const char *src);\n\n/**\n * Convert the arguments to a program from one string to an array of \n * strings terminated by a NULL pointer\n * @param arg_str The arguments to convert\n * @param argv_out Output location.  This is a pointer to an array of strings.\n * @param token_context Pool to use.\n */\nAPR_DECLARE(apr_status_t) apr_tokenize_to_argv(const char *arg_str,\n                                               char ***argv_out,\n                                               apr_pool_t *token_context);\n\n/**\n * Split a string into separate null-terminated tokens.  The tokens are \n * delimited in the string by one or more characters from the sep\n * argument.\n * @param str The string to separate; this should be specified on the\n *            first call to apr_strtok() for a given string, and NULL\n *            on subsequent calls.\n * @param sep The set of delimiters\n * @param last State saved by apr_strtok() between calls.\n * @return The next token from the string\n * @note the 'last' state points to the trailing NUL char of the final\n * token, otherwise it points to the character following the current\n * token (all successive or empty occurances of sep are skiped on the\n * subsequent call to apr_strtok).  Therefore it is possible to avoid\n * a strlen() determination, with the following logic;\n * toklen = last - retval; if (*last) --toklen;\n */\nAPR_DECLARE(char *) apr_strtok(char *str, const char *sep, char **last);\n\n/**\n * @defgroup APR_Strings_Snprintf snprintf implementations\n * @warning\n * These are snprintf implementations based on apr_vformatter().\n *\n * Note that various standards and implementations disagree on the return\n * value of snprintf, and side-effects due to %n in the formatting string.\n * apr_snprintf (and apr_vsnprintf) behaves as follows:\n *\n * Process the format string until the entire string is exhausted, or\n * the buffer fills.  If the buffer fills then stop processing immediately\n * (so no further %n arguments are processed), and return the buffer\n * length.  In all cases the buffer is NUL terminated. It will return the\n * number of characters inserted into the buffer, not including the\n * terminating NUL. As a special case, if len is 0, apr_snprintf will\n * return the number of characters that would have been inserted if\n * the buffer had been infinite (in this case, *buffer can be NULL)\n *\n * In no event does apr_snprintf return a negative number.\n * @{\n */\n\n/**\n * snprintf routine based on apr_vformatter.  This means it understands the\n * same extensions.\n * @param buf The buffer to write to\n * @param len The size of the buffer\n * @param format The format string\n * @param ... The arguments to use to fill out the format string.\n */\nAPR_DECLARE_NONSTD(int) apr_snprintf(char *buf, apr_size_t len,\n                                     const char *format, ...)\n        __attribute__((format(printf,3,4)));\n\n/**\n * vsnprintf routine based on apr_vformatter.  This means it understands the\n * same extensions.\n * @param buf The buffer to write to\n * @param len The size of the buffer\n * @param format The format string\n * @param ap The arguments to use to fill out the format string.\n */\nAPR_DECLARE(int) apr_vsnprintf(char *buf, apr_size_t len, const char *format,\n                               va_list ap);\n/** @} */\n\n/**\n * create a string representation of an int, allocated from a pool\n * @param p The pool from which to allocate\n * @param n The number to format\n * @return The string representation of the number\n */\nAPR_DECLARE(char *) apr_itoa(apr_pool_t *p, int n);\n\n/**\n * create a string representation of a long, allocated from a pool\n * @param p The pool from which to allocate\n * @param n The number to format\n * @return The string representation of the number\n */\nAPR_DECLARE(char *) apr_ltoa(apr_pool_t *p, long n);\n\n/**\n * create a string representation of an apr_off_t, allocated from a pool\n * @param p The pool from which to allocate\n * @param n The number to format\n * @return The string representation of the number\n */\nAPR_DECLARE(char *) apr_off_t_toa(apr_pool_t *p, apr_off_t n);\n\n/**\n * Convert a numeric string into an apr_off_t numeric value.\n * @param offset The value of the parsed string.\n * @param buf The string to parse. It may contain optional whitespace,\n *   followed by an optional '+' (positive, default) or '-' (negative)\n *   character, followed by an optional '0x' prefix if base is 0 or 16,\n *   followed by numeric digits appropriate for base.\n * @param end A pointer to the end of the valid character in buf. If\n *   not NULL, it is set to the first invalid character in buf.\n * @param base A numeric base in the range between 2 and 36 inclusive,\n *   or 0.  If base is zero, buf will be treated as base ten unless its\n *   digits are prefixed with '0x', in which case it will be treated as\n *   base 16.\n * @bug *end breaks type safety; where *buf is const, *end needs to be\n * declared as const in APR 2.0\n */\nAPR_DECLARE(apr_status_t) apr_strtoff(apr_off_t *offset, const char *buf, \n                                      char **end, int base);\n\n/**\n * parse a numeric string into a 64-bit numeric value\n * @param buf The string to parse. It may contain optional whitespace,\n *   followed by an optional '+' (positive, default) or '-' (negative)\n *   character, followed by an optional '0x' prefix if base is 0 or 16,\n *   followed by numeric digits appropriate for base.\n * @param end A pointer to the end of the valid character in buf. If\n *   not NULL, it is set to the first invalid character in buf.\n * @param base A numeric base in the range between 2 and 36 inclusive,\n *   or 0.  If base is zero, buf will be treated as base ten unless its\n *   digits are prefixed with '0x', in which case it will be treated as\n *   base 16.\n * @return The numeric value of the string.  On overflow, errno is set\n * to ERANGE.  On success, errno is set to 0.\n */\nAPR_DECLARE(apr_int64_t) apr_strtoi64(const char *buf, char **end, int base);\n\n/**\n * parse a base-10 numeric string into a 64-bit numeric value.\n * Equivalent to apr_strtoi64(buf, (char**)NULL, 10).\n * @param buf The string to parse\n * @return The numeric value of the string.  On overflow, errno is set\n * to ERANGE.  On success, errno is set to 0.\n */\nAPR_DECLARE(apr_int64_t) apr_atoi64(const char *buf);\n\n/**\n * Format a binary size (magnitiudes are 2^10 rather than 10^3) from an apr_off_t,\n * as bytes, K, M, T, etc, to a four character compacted human readable string.\n * @param size The size to format\n * @param buf The 5 byte text buffer (counting the trailing null)\n * @return The buf passed to apr_strfsize()\n * @remark All negative sizes report '  - ', apr_strfsize only formats positive values.\n */\nAPR_DECLARE(char *) apr_strfsize(apr_off_t size, char *buf);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* !APR_STRINGS_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_support.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_SUPPORT_H\n#define APR_SUPPORT_H\n\n/**\n * @file apr_support.h\n * @brief APR Support functions\n */\n\n#include \"apr.h\"\n#include \"apr_network_io.h\"\n#include \"apr_file_io.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_support Internal APR support functions\n * @ingroup APR \n * @{\n */\n\n/**\n * Wait for IO to occur or timeout.\n *\n * @param f The file to wait on.\n * @param s The socket to wait on if @a f is @c NULL.\n * @param for_read If non-zero wait for data to be available to read,\n *        otherwise wait for data to be able to be written. \n * @return APR_TIMEUP if we run out of time.\n */\napr_status_t apr_wait_for_io_or_timeout(apr_file_t *f, apr_socket_t *s,\n                                        int for_read);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_SUPPORT_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_tables.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_TABLES_H\n#define APR_TABLES_H\n\n/**\n * @file apr_tables.h\n * @brief APR Table library\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n\n#if APR_HAVE_STDARG_H\n#include <stdarg.h>     /* for va_list */\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_tables Table and Array Functions\n * @ingroup APR \n * Arrays are used to store data which is referenced sequentially or\n * as a stack.  Functions are provided to push and pop individual\n * elements as well as to operate on the entire array.\n *\n * Tables are used to store data which can be referenced by key.\n * Limited capabilities are provided for tables with multiple elements\n * which share a key; while key lookup will return only a single\n * element, iteration is available.  Additionally, a table can be\n * compressed to resolve duplicates.\n *\n * Both arrays and tables may store string or binary data; some features,\n * such as concatenation or merging of elements, work only for string\n * data.\n * @{\n */\n\n/** the table abstract data type */\ntypedef struct apr_table_t apr_table_t;\n\n/** @see apr_array_header_t */\ntypedef struct apr_array_header_t apr_array_header_t;\n\n/** An opaque array type */\nstruct apr_array_header_t {\n    /** The pool the array is allocated out of */\n    apr_pool_t *pool;\n    /** The amount of memory allocated for each element of the array */\n    int elt_size;\n    /** The number of active elements in the array */\n    int nelts;\n    /** The number of elements allocated in the array */\n    int nalloc;\n    /** The elements in the array */\n    char *elts;\n};\n\n/**\n * The (opaque) structure for string-content tables.\n */\ntypedef struct apr_table_entry_t apr_table_entry_t;\n\n/** The type for each entry in a string-content table */\nstruct apr_table_entry_t {\n    /** The key for the current table entry */\n    char *key;          /* maybe NULL in future;\n                         * check when iterating thru table_elts\n                         */\n    /** The value for the current table entry */\n    char *val;\n\n    /** A checksum for the key, for use by the apr_table internals */\n    apr_uint32_t key_checksum;\n};\n\n/**\n * Get the elements from a table.\n * @param t The table\n * @return An array containing the contents of the table\n */\nAPR_DECLARE(const apr_array_header_t *) apr_table_elts(const apr_table_t *t);\n\n/**\n * Determine if the table is empty (either NULL or having no elements).\n * @param t The table to check\n * @return True if empty, False otherwise\n */\nAPR_DECLARE(int) apr_is_empty_table(const apr_table_t *t);\n\n/**\n * Determine if the array is empty (either NULL or having no elements).\n * @param a The array to check\n * @return True if empty, False otherwise\n */\nAPR_DECLARE(int) apr_is_empty_array(const apr_array_header_t *a);\n\n/**\n * Create an array.\n * @param p The pool to allocate the memory out of\n * @param nelts the number of elements in the initial array\n * @param elt_size The size of each element in the array.\n * @return The new array\n */\nAPR_DECLARE(apr_array_header_t *) apr_array_make(apr_pool_t *p,\n                                                 int nelts, int elt_size);\n\n/**\n * Add a new element to an array (as a first-in, last-out stack).\n * @param arr The array to add an element to.\n * @return Location for the new element in the array.\n * @remark If there are no free spots in the array, then this function will\n *         allocate new space for the new element.\n */\nAPR_DECLARE(void *) apr_array_push(apr_array_header_t *arr);\n\n/** A helper macro for accessing a member of an APR array.\n *\n * @param ary the array\n * @param i the index into the array to return\n * @param type the type of the objects stored in the array\n *\n * @return the item at index i\n */\n#define APR_ARRAY_IDX(ary,i,type) (((type *)(ary)->elts)[i])\n\n/** A helper macro for pushing elements into an APR array.\n *\n * @param ary the array\n * @param type the type of the objects stored in the array\n *\n * @return the location where the new object should be placed\n */\n#define APR_ARRAY_PUSH(ary,type) (*((type *)apr_array_push(ary)))\n\n/**\n * Remove an element from an array (as a first-in, last-out stack).\n * @param arr The array to remove an element from.\n * @return Location of the element in the array.\n * @remark If there are no elements in the array, NULL is returned.\n */\nAPR_DECLARE(void *) apr_array_pop(apr_array_header_t *arr);\n\n/**\n * Remove all elements from an array.\n * @param arr The array to remove all elements from.\n * @remark As the underlying storage is allocated from a pool, no\n * memory is freed by this operation, but is available for reuse.\n */\nAPR_DECLARE(void) apr_array_clear(apr_array_header_t *arr);\n\n/**\n * Concatenate two arrays together.\n * @param dst The destination array, and the one to go first in the combined \n *            array\n * @param src The source array to add to the destination array\n */\nAPR_DECLARE(void) apr_array_cat(apr_array_header_t *dst,\n\t\t\t        const apr_array_header_t *src);\n\n/**\n * Copy the entire array.\n * @param p The pool to allocate the copy of the array out of\n * @param arr The array to copy\n * @return An exact copy of the array passed in\n * @remark The alternate apr_array_copy_hdr copies only the header, and arranges \n *         for the elements to be copied if (and only if) the code subsequently\n *         does a push or arraycat.\n */\nAPR_DECLARE(apr_array_header_t *) apr_array_copy(apr_pool_t *p,\n                                      const apr_array_header_t *arr);\n/**\n * Copy the headers of the array, and arrange for the elements to be copied if\n * and only if the code subsequently does a push or arraycat.\n * @param p The pool to allocate the copy of the array out of\n * @param arr The array to copy\n * @return An exact copy of the array passed in\n * @remark The alternate apr_array_copy copies the *entire* array.\n */\nAPR_DECLARE(apr_array_header_t *) apr_array_copy_hdr(apr_pool_t *p,\n                                      const apr_array_header_t *arr);\n\n/**\n * Append one array to the end of another, creating a new array in the process.\n * @param p The pool to allocate the new array out of\n * @param first The array to put first in the new array.\n * @param second The array to put second in the new array.\n * @return A new array containing the data from the two arrays passed in.\n*/\nAPR_DECLARE(apr_array_header_t *) apr_array_append(apr_pool_t *p,\n                                      const apr_array_header_t *first,\n                                      const apr_array_header_t *second);\n\n/**\n * Generate a new string from the apr_pool_t containing the concatenated \n * sequence of substrings referenced as elements within the array.  The string \n * will be empty if all substrings are empty or null, or if there are no \n * elements in the array.  If sep is non-NUL, it will be inserted between \n * elements as a separator.\n * @param p The pool to allocate the string out of\n * @param arr The array to generate the string from\n * @param sep The separator to use\n * @return A string containing all of the data in the array.\n */\nAPR_DECLARE(char *) apr_array_pstrcat(apr_pool_t *p,\n\t\t\t\t      const apr_array_header_t *arr,\n\t\t\t\t      const char sep);\n\n/**\n * Make a new table.\n * @param p The pool to allocate the pool out of\n * @param nelts The number of elements in the initial table.\n * @return The new table.\n * @warning This table can only store text data\n */\nAPR_DECLARE(apr_table_t *) apr_table_make(apr_pool_t *p, int nelts);\n\n/**\n * Create a new table and copy another table into it.\n * @param p The pool to allocate the new table out of\n * @param t The table to copy\n * @return A copy of the table passed in\n * @warning The table keys and respective values are not copied\n */\nAPR_DECLARE(apr_table_t *) apr_table_copy(apr_pool_t *p,\n                                          const apr_table_t *t);\n\n/**\n * Create a new table whose contents are deep copied from the given\n * table. A deep copy operation copies all fields, and makes copies\n * of dynamically allocated memory pointed to by the fields.\n * @param p The pool to allocate the new table out of\n * @param t The table to clone\n * @return A deep copy of the table passed in\n */\nAPR_DECLARE(apr_table_t *) apr_table_clone(apr_pool_t *p,\n                                           const apr_table_t *t);\n\n/**\n * Delete all of the elements from a table.\n * @param t The table to clear\n */\nAPR_DECLARE(void) apr_table_clear(apr_table_t *t);\n\n/**\n * Get the value associated with a given key from the table.  After this call,\n * the data is still in the table.\n * @param t The table to search for the key\n * @param key The key to search for (case does not matter)\n * @return The value associated with the key, or NULL if the key does not exist. \n */\nAPR_DECLARE(const char *) apr_table_get(const apr_table_t *t, const char *key);\n\n/**\n * Get values associated with a given key from the table.      If more than one\n * value exists, return a comma separated list of values.  After this call, the\n * data is still in the table.\n * @param p The pool to allocate the combined value from, if necessary\n * @param t The table to search for the key\n * @param key The key to search for (case does not matter)\n * @return The value associated with the key, or NULL if the key does not exist.\n */\nAPR_DECLARE(const char *) apr_table_getm(apr_pool_t *p, const apr_table_t *t,\n                                         const char *key);\n\n/**\n * Add a key/value pair to a table.  If another element already exists with the\n * same key, this will overwrite the old data.\n * @param t The table to add the data to.\n * @param key The key to use (case does not matter)\n * @param val The value to add\n * @remark When adding data, this function makes a copy of both the key and the\n *         value.\n */\nAPR_DECLARE(void) apr_table_set(apr_table_t *t, const char *key,\n                                const char *val);\n\n/**\n * Add a key/value pair to a table.  If another element already exists with the\n * same key, this will overwrite the old data.\n * @param t The table to add the data to.\n * @param key The key to use (case does not matter)\n * @param val The value to add\n * @warning When adding data, this function does not make a copy of the key or \n *          the value, so care should be taken to ensure that the values will \n *          not change after they have been added..\n */\nAPR_DECLARE(void) apr_table_setn(apr_table_t *t, const char *key,\n                                 const char *val);\n\n/**\n * Remove data from the table.\n * @param t The table to remove data from\n * @param key The key of the data being removed (case does not matter)\n */\nAPR_DECLARE(void) apr_table_unset(apr_table_t *t, const char *key);\n\n/**\n * Add data to a table by merging the value with data that has already been \n * stored. The merging is done by concatenating the two values, separated\n * by the string \", \".\n * @param t The table to search for the data\n * @param key The key to merge data for (case does not matter)\n * @param val The data to add\n * @remark If the key is not found, then this function acts like apr_table_add\n */\nAPR_DECLARE(void) apr_table_merge(apr_table_t *t, const char *key,\n                                  const char *val);\n\n/**\n * Add data to a table by merging the value with data that has already been \n * stored. The merging is done by concatenating the two values, separated\n * by the string \", \".\n * @param t The table to search for the data\n * @param key The key to merge data for (case does not matter)\n * @param val The data to add\n * @remark If the key is not found, then this function acts like apr_table_addn\n */\nAPR_DECLARE(void) apr_table_mergen(apr_table_t *t, const char *key,\n                                   const char *val);\n\n/**\n * Add data to a table, regardless of whether there is another element with the\n * same key.\n * @param t The table to add to\n * @param key The key to use\n * @param val The value to add.\n * @remark When adding data, this function makes a copy of both the key and the\n *         value.\n */\nAPR_DECLARE(void) apr_table_add(apr_table_t *t, const char *key,\n                                const char *val);\n\n/**\n * Add data to a table, regardless of whether there is another element with the\n * same key.\n * @param t The table to add to\n * @param key The key to use\n * @param val The value to add.\n * @remark When adding data, this function does not make a copy of the key or the\n *         value, so care should be taken to ensure that the values will not \n *         change after they have been added.\n */\nAPR_DECLARE(void) apr_table_addn(apr_table_t *t, const char *key,\n                                 const char *val);\n\n/**\n * Merge two tables into one new table.\n * @param p The pool to use for the new table\n * @param overlay The first table to put in the new table\n * @param base The table to add at the end of the new table\n * @return A new table containing all of the data from the two passed in\n */\nAPR_DECLARE(apr_table_t *) apr_table_overlay(apr_pool_t *p,\n                                             const apr_table_t *overlay,\n                                             const apr_table_t *base);\n\n/**\n * Declaration prototype for the iterator callback function of apr_table_do()\n * and apr_table_vdo().\n * @param rec The data passed as the first argument to apr_table_[v]do()\n * @param key The key from this iteration of the table\n * @param value The value from this iteration of the table\n * @remark Iteration continues while this callback function returns non-zero.\n * To export the callback function for apr_table_[v]do() it must be declared \n * in the _NONSTD convention.\n */\ntypedef int (apr_table_do_callback_fn_t)(void *rec, const char *key, \n                                                    const char *value);\n\n/** \n * Iterate over a table running the provided function once for every\n * element in the table.  The varargs array must be a list of zero or\n * more (char *) keys followed by a NULL pointer.  If zero keys are\n * given, the @param comp function will be invoked for every element\n * in the table.  Otherwise, the function is invoked only for those\n * elements matching the keys specified.\n *\n * If an invocation of the @param comp function returns zero,\n * iteration will continue using the next specified key, if any.\n *\n * @param comp The function to run\n * @param rec The data to pass as the first argument to the function\n * @param t The table to iterate over\n * @param ... A varargs array of zero or more (char *) keys followed by NULL\n * @return FALSE if one of the comp() iterations returned zero; TRUE if all\n *            iterations returned non-zero\n * @see apr_table_do_callback_fn_t\n */\nAPR_DECLARE_NONSTD(int) apr_table_do(apr_table_do_callback_fn_t *comp,\n                                     void *rec, const apr_table_t *t, ...)\n#if defined(__GNUC__) && __GNUC__ >= 4\n    __attribute__((sentinel))\n#endif\n    ;\n\n/** \n * Iterate over a table running the provided function once for every\n * element in the table.  The @param vp varargs parameter must be a\n * list of zero or more (char *) keys followed by a NULL pointer.  If\n * zero keys are given, the @param comp function will be invoked for\n * every element in the table.  Otherwise, the function is invoked\n * only for those elements matching the keys specified.\n *\n * If an invocation of the @param comp function returns zero,\n * iteration will continue using the next specified key, if any.\n *\n * @param comp The function to run\n * @param rec The data to pass as the first argument to the function\n * @param t The table to iterate over\n * @param vp List of zero or more (char *) keys followed by NULL\n * @return FALSE if one of the comp() iterations returned zero; TRUE if all\n *            iterations returned non-zero\n * @see apr_table_do_callback_fn_t\n */\nAPR_DECLARE(int) apr_table_vdo(apr_table_do_callback_fn_t *comp,\n                               void *rec, const apr_table_t *t, va_list vp);\n\n/** flag for overlap to use apr_table_setn */\n#define APR_OVERLAP_TABLES_SET   (0)\n/** flag for overlap to use apr_table_mergen */\n#define APR_OVERLAP_TABLES_MERGE (1)\n/**\n * For each element in table b, either use setn or mergen to add the data\n * to table a.  Which method is used is determined by the flags passed in.\n * @param a The table to add the data to.\n * @param b The table to iterate over, adding its data to table a\n * @param flags How to add the table to table a.  One of:\n *          APR_OVERLAP_TABLES_SET        Use apr_table_setn\n *          APR_OVERLAP_TABLES_MERGE      Use apr_table_mergen\n * @remark  When merging duplicates, the two values are concatenated,\n *          separated by the string \", \".\n * @remark  This function is highly optimized, and uses less memory and CPU cycles\n *          than a function that just loops through table b calling other functions.\n */\n/**\n * Conceptually, apr_table_overlap does this:\n *\n * <pre>\n *  apr_array_header_t *barr = apr_table_elts(b);\n *  apr_table_entry_t *belt = (apr_table_entry_t *)barr->elts;\n *  int i;\n *\n *  for (i = 0; i < barr->nelts; ++i) {\n *      if (flags & APR_OVERLAP_TABLES_MERGE) {\n *          apr_table_mergen(a, belt[i].key, belt[i].val);\n *      }\n *      else {\n *          apr_table_setn(a, belt[i].key, belt[i].val);\n *      }\n *  }\n * </pre>\n *\n *  Except that it is more efficient (less space and cpu-time) especially\n *  when b has many elements.\n *\n *  Notice the assumptions on the keys and values in b -- they must be\n *  in an ancestor of a's pool.  In practice b and a are usually from\n *  the same pool.\n */\n\nAPR_DECLARE(void) apr_table_overlap(apr_table_t *a, const apr_table_t *b,\n                                     unsigned flags);\n\n/**\n * Eliminate redundant entries in a table by either overwriting\n * or merging duplicates.\n *\n * @param t Table.\n * @param flags APR_OVERLAP_TABLES_MERGE to merge, or\n *              APR_OVERLAP_TABLES_SET to overwrite\n * @remark When merging duplicates, the two values are concatenated,\n *         separated by the string \", \".\n */\nAPR_DECLARE(void) apr_table_compress(apr_table_t *t, unsigned flags);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\t/* ! APR_TABLES_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_thread_cond.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_THREAD_COND_H\n#define APR_THREAD_COND_H\n\n/**\n * @file apr_thread_cond.h\n * @brief APR Condition Variable Routines\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n#include \"apr_time.h\"\n#include \"apr_thread_mutex.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n#if APR_HAS_THREADS || defined(DOXYGEN)\n\n/**\n * @defgroup apr_thread_cond Condition Variable Routines\n * @ingroup APR \n * @{\n */\n\n/** Opaque structure for thread condition variables */\ntypedef struct apr_thread_cond_t apr_thread_cond_t;\n\n/**\n * Note: destroying a condition variable (or likewise, destroying or\n * clearing the pool from which a condition variable was allocated) if\n * any threads are blocked waiting on it gives undefined results.\n */\n\n/**\n * Create and initialize a condition variable that can be used to signal\n * and schedule threads in a single process.\n * @param cond the memory address where the newly created condition variable\n *        will be stored.\n * @param pool the pool from which to allocate the condition.\n */\nAPR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,\n                                                 apr_pool_t *pool);\n\n/**\n * Put the active calling thread to sleep until signaled to wake up. Each\n * condition variable must be associated with a mutex, and that mutex must\n * be locked before  calling this function, or the behavior will be\n * undefined. As the calling thread is put to sleep, the given mutex\n * will be simultaneously released; and as this thread wakes up the lock\n * is again simultaneously acquired.\n * @param cond the condition variable on which to block.\n * @param mutex the mutex that must be locked upon entering this function,\n *        is released while the thread is asleep, and is again acquired before\n *        returning from this function.\n * @remark Spurious wakeups may occur. Before and after every call to wait on\n * a condition variable, the caller should test whether the condition is already\n * met.\n */\nAPR_DECLARE(apr_status_t) apr_thread_cond_wait(apr_thread_cond_t *cond,\n                                               apr_thread_mutex_t *mutex);\n\n/**\n * Put the active calling thread to sleep until signaled to wake up or\n * the timeout is reached. Each condition variable must be associated\n * with a mutex, and that mutex must be locked before calling this\n * function, or the behavior will be undefined. As the calling thread\n * is put to sleep, the given mutex will be simultaneously released;\n * and as this thread wakes up the lock is again simultaneously acquired.\n * @param cond the condition variable on which to block.\n * @param mutex the mutex that must be locked upon entering this function,\n *        is released while the thread is asleep, and is again acquired before\n *        returning from this function.\n * @param timeout The amount of time in microseconds to wait. This is \n *        a maximum, not a minimum. If the condition is signaled, we \n *        will wake up before this time, otherwise the error APR_TIMEUP\n *        is returned.\n */\nAPR_DECLARE(apr_status_t) apr_thread_cond_timedwait(apr_thread_cond_t *cond,\n                                                    apr_thread_mutex_t *mutex,\n                                                    apr_interval_time_t timeout);\n\n/**\n * Signals a single thread, if one exists, that is blocking on the given\n * condition variable. That thread is then scheduled to wake up and acquire\n * the associated mutex. Although it is not required, if predictable scheduling\n * is desired, that mutex must be locked while calling this function.\n * @param cond the condition variable on which to produce the signal.\n * @remark If no threads are waiting on the condition variable, nothing happens.\n */\nAPR_DECLARE(apr_status_t) apr_thread_cond_signal(apr_thread_cond_t *cond);\n\n/**\n * Signals all threads blocking on the given condition variable.\n * Each thread that was signaled is then scheduled to wake up and acquire\n * the associated mutex. This will happen in a serialized manner.\n * @param cond the condition variable on which to produce the broadcast.\n * @remark If no threads are waiting on the condition variable, nothing happens.\n */\nAPR_DECLARE(apr_status_t) apr_thread_cond_broadcast(apr_thread_cond_t *cond);\n\n/**\n * Destroy the condition variable and free the associated memory.\n * @param cond the condition variable to destroy.\n */\nAPR_DECLARE(apr_status_t) apr_thread_cond_destroy(apr_thread_cond_t *cond);\n\n/**\n * Get the pool used by this thread_cond.\n * @return apr_pool_t the pool\n */\nAPR_POOL_DECLARE_ACCESSOR(thread_cond);\n\n#endif /* APR_HAS_THREADS */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_THREAD_COND_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_thread_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_THREAD_MUTEX_H\n#define APR_THREAD_MUTEX_H\n\n/**\n * @file apr_thread_mutex.h\n * @brief APR Thread Mutex Routines\n */\n\n#include \"apr.h\"\n#include \"apr_errno.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n#if APR_HAS_THREADS || defined(DOXYGEN)\n\n/**\n * @defgroup apr_thread_mutex Thread Mutex Routines\n * @ingroup APR \n * @{\n */\n\n/** Opaque thread-local mutex structure */\ntypedef struct apr_thread_mutex_t apr_thread_mutex_t;\n\n#define APR_THREAD_MUTEX_DEFAULT  0x0   /**< platform-optimal lock behavior */\n#define APR_THREAD_MUTEX_NESTED   0x1   /**< enable nested (recursive) locks */\n#define APR_THREAD_MUTEX_UNNESTED 0x2   /**< disable nested locks */\n\n/* Delayed the include to avoid a circular reference */\n#include \"apr_pools.h\"\n\n/**\n * Create and initialize a mutex that can be used to synchronize threads.\n * @param mutex the memory address where the newly created mutex will be\n *        stored.\n * @param flags Or'ed value of:\n * <PRE>\n *           APR_THREAD_MUTEX_DEFAULT   platform-optimal lock behavior.\n *           APR_THREAD_MUTEX_NESTED    enable nested (recursive) locks.\n *           APR_THREAD_MUTEX_UNNESTED  disable nested locks (non-recursive).\n * </PRE>\n * @param pool the pool from which to allocate the mutex.\n * @warning Be cautious in using APR_THREAD_MUTEX_DEFAULT.  While this is the\n * most optimal mutex based on a given platform's performance characteristics,\n * it will behave as either a nested or an unnested lock.\n */\nAPR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,\n                                                  unsigned int flags,\n                                                  apr_pool_t *pool);\n/**\n * Acquire the lock for the given mutex. If the mutex is already locked,\n * the current thread will be put to sleep until the lock becomes available.\n * @param mutex the mutex on which to acquire the lock.\n */\nAPR_DECLARE(apr_status_t) apr_thread_mutex_lock(apr_thread_mutex_t *mutex);\n\n/**\n * Attempt to acquire the lock for the given mutex. If the mutex has already\n * been acquired, the call returns immediately with APR_EBUSY. Note: it\n * is important that the APR_STATUS_IS_EBUSY(s) macro be used to determine\n * if the return value was APR_EBUSY, for portability reasons.\n * @param mutex the mutex on which to attempt the lock acquiring.\n */\nAPR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex);\n\n/**\n * Release the lock for the given mutex.\n * @param mutex the mutex from which to release the lock.\n */\nAPR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex);\n\n/**\n * Destroy the mutex and free the memory associated with the lock.\n * @param mutex the mutex to destroy.\n */\nAPR_DECLARE(apr_status_t) apr_thread_mutex_destroy(apr_thread_mutex_t *mutex);\n\n/**\n * Get the pool used by this thread_mutex.\n * @return apr_pool_t the pool\n */\nAPR_POOL_DECLARE_ACCESSOR(thread_mutex);\n\n#endif /* APR_HAS_THREADS */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_THREAD_MUTEX_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_thread_proc.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_THREAD_PROC_H\n#define APR_THREAD_PROC_H\n\n/**\n * @file apr_thread_proc.h\n * @brief APR Thread and Process Library\n */\n\n#include \"apr.h\"\n#include \"apr_file_io.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n\n#if APR_HAVE_STRUCT_RLIMIT\n#include <sys/time.h>\n#include <sys/resource.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_thread_proc Threads and Process Functions\n * @ingroup APR \n * @{\n */\n\ntypedef enum {\n    APR_SHELLCMD,           /**< use the shell to invoke the program */\n    APR_PROGRAM,            /**< invoke the program directly, no copied env */\n    APR_PROGRAM_ENV,        /**< invoke the program, replicating our environment */\n    APR_PROGRAM_PATH,       /**< find program on PATH, use our environment */\n    APR_SHELLCMD_ENV        /**< use the shell to invoke the program,\n                             *   replicating our environment\n                             */\n} apr_cmdtype_e;\n\ntypedef enum {\n    APR_WAIT,           /**< wait for the specified process to finish */\n    APR_NOWAIT          /**< do not wait -- just see if it has finished */\n} apr_wait_how_e;\n\n/* I am specifically calling out the values so that the macros below make\n * more sense.  Yes, I know I don't need to, but I am hoping this makes what\n * I am doing more clear.  If you want to add more reasons to exit, continue\n * to use bitmasks.\n */\ntypedef enum {\n    APR_PROC_EXIT = 1,          /**< process exited normally */\n    APR_PROC_SIGNAL = 2,        /**< process exited due to a signal */\n    APR_PROC_SIGNAL_CORE = 4    /**< process exited and dumped a core file */\n} apr_exit_why_e;\n\n/** did we exit the process */\n#define APR_PROC_CHECK_EXIT(x)        (x & APR_PROC_EXIT)\n/** did we get a signal */\n#define APR_PROC_CHECK_SIGNALED(x)    (x & APR_PROC_SIGNAL)\n/** did we get core */\n#define APR_PROC_CHECK_CORE_DUMP(x)   (x & APR_PROC_SIGNAL_CORE)\n\n/** @see apr_procattr_io_set */\n#define APR_NO_PIPE          0\n/** @see apr_procattr_io_set and apr_file_pipe_create_ex */\n#define APR_FULL_BLOCK       1\n/** @see apr_procattr_io_set and apr_file_pipe_create_ex */\n#define APR_FULL_NONBLOCK    2\n/** @see apr_procattr_io_set */\n#define APR_PARENT_BLOCK     3\n/** @see apr_procattr_io_set */\n#define APR_CHILD_BLOCK      4\n/** @see apr_procattr_io_set */\n#define APR_NO_FILE          8\n\n/** @see apr_file_pipe_create_ex */\n#define APR_READ_BLOCK       3\n/** @see apr_file_pipe_create_ex */\n#define APR_WRITE_BLOCK      4\n\n/** @see apr_procattr_io_set \n * @note Win32 only effective with version 1.2.12, portably introduced in 1.3.0\n */\n#define APR_NO_FILE          8\n\n/** @see apr_procattr_limit_set */\n#define APR_LIMIT_CPU        0\n/** @see apr_procattr_limit_set */\n#define APR_LIMIT_MEM        1\n/** @see apr_procattr_limit_set */\n#define APR_LIMIT_NPROC      2\n/** @see apr_procattr_limit_set */\n#define APR_LIMIT_NOFILE     3\n\n/**\n * @defgroup APR_OC Other Child Flags\n * @{\n */\n#define APR_OC_REASON_DEATH         0     /**< child has died, caller must call\n                                           * unregister still */\n#define APR_OC_REASON_UNWRITABLE    1     /**< write_fd is unwritable */\n#define APR_OC_REASON_RESTART       2     /**< a restart is occurring, perform\n                                           * any necessary cleanup (including\n                                           * sending a special signal to child)\n                                           */\n#define APR_OC_REASON_UNREGISTER    3     /**< unregister has been called, do\n                                           * whatever is necessary (including\n                                           * kill the child) */\n#define APR_OC_REASON_LOST          4     /**< somehow the child exited without\n                                           * us knowing ... buggy os? */\n#define APR_OC_REASON_RUNNING       5     /**< a health check is occurring, \n                                           * for most maintainence functions\n                                           * this is a no-op.\n                                           */\n/** @} */\n\n/** The APR process type */\ntypedef struct apr_proc_t {\n    /** The process ID */\n    pid_t pid;\n    /** Parent's side of pipe to child's stdin */\n    apr_file_t *in;\n    /** Parent's side of pipe to child's stdout */\n    apr_file_t *out;\n    /** Parent's side of pipe to child's stdouterr */\n    apr_file_t *err;\n#if APR_HAS_PROC_INVOKED || defined(DOXYGEN)\n    /** Diagnositics/debugging string of the command invoked for \n     *  this process [only present if APR_HAS_PROC_INVOKED is true]\n     * @remark Only enabled on Win32 by default.\n     * @bug This should either always or never be present in release\n     * builds - since it breaks binary compatibility.  We may enable\n     * it always in APR 1.0 yet leave it undefined in most cases.\n     */\n    char *invoked;\n#endif\n#if defined(WIN32) || defined(DOXYGEN)\n    /** (Win32 only) Creator's handle granting access to the process\n     * @remark This handle is closed and reset to NULL in every case\n     * corresponding to a waitpid() on Unix which returns the exit status.\n     * Therefore Win32 correspond's to Unix's zombie reaping characteristics\n     * and avoids potential handle leaks.\n     */\n    HANDLE hproc;\n#endif\n} apr_proc_t;\n\n/**\n * The prototype for APR child errfn functions.  (See the description\n * of apr_procattr_child_errfn_set() for more information.)\n * It is passed the following parameters:\n * @param pool Pool associated with the apr_proc_t.  If your child\n *             error function needs user data, associate it with this\n *             pool.\n * @param err APR error code describing the error\n * @param description Text description of type of processing which failed\n */\ntypedef void (apr_child_errfn_t)(apr_pool_t *proc, apr_status_t err,\n                                 const char *description);\n\n/** Opaque Thread structure. */\ntypedef struct apr_thread_t           apr_thread_t;\n\n/** Opaque Thread attributes structure. */\ntypedef struct apr_threadattr_t       apr_threadattr_t;\n\n/** Opaque Process attributes structure. */\ntypedef struct apr_procattr_t         apr_procattr_t;\n\n/** Opaque control variable for one-time atomic variables.  */\ntypedef struct apr_thread_once_t      apr_thread_once_t;\n\n/** Opaque thread private address space. */\ntypedef struct apr_threadkey_t        apr_threadkey_t;\n\n/** Opaque record of child process. */\ntypedef struct apr_other_child_rec_t  apr_other_child_rec_t;\n\n/**\n * The prototype for any APR thread worker functions.\n */\ntypedef void *(APR_THREAD_FUNC *apr_thread_start_t)(apr_thread_t*, void*);\n\ntypedef enum {\n    APR_KILL_NEVER,             /**< process is never killed (i.e., never sent\n                                 * any signals), but it will be reaped if it exits\n                                 * before the pool is cleaned up */\n    APR_KILL_ALWAYS,            /**< process is sent SIGKILL on apr_pool_t cleanup */\n    APR_KILL_AFTER_TIMEOUT,     /**< SIGTERM, wait 3 seconds, SIGKILL */\n    APR_JUST_WAIT,              /**< wait forever for the process to complete */\n    APR_KILL_ONLY_ONCE          /**< send SIGTERM and then wait */\n} apr_kill_conditions_e;\n\n/* Thread Function definitions */\n\n#if APR_HAS_THREADS\n\n/**\n * Create and initialize a new threadattr variable\n * @param new_attr The newly created threadattr.\n * @param cont The pool to use\n */\nAPR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new_attr, \n                                                apr_pool_t *cont);\n\n/**\n * Set if newly created threads should be created in detached state.\n * @param attr The threadattr to affect \n * @param on Non-zero if detached threads should be created.\n */\nAPR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr, \n                                                    apr_int32_t on);\n\n/**\n * Get the detach state for this threadattr.\n * @param attr The threadattr to reference\n * @return APR_DETACH if threads are to be detached, or APR_NOTDETACH\n * if threads are to be joinable. \n */\nAPR_DECLARE(apr_status_t) apr_threadattr_detach_get(apr_threadattr_t *attr);\n\n/**\n * Set the stack size of newly created threads.\n * @param attr The threadattr to affect \n * @param stacksize The stack size in bytes\n */\nAPR_DECLARE(apr_status_t) apr_threadattr_stacksize_set(apr_threadattr_t *attr,\n                                                       apr_size_t stacksize);\n\n/**\n * Set the stack guard area size of newly created threads.\n * @param attr The threadattr to affect \n * @param guardsize The stack guard area size in bytes\n * @note Thread library implementations commonly use a \"guard area\"\n * after each thread's stack which is not readable or writable such that\n * stack overflows cause a segfault; this consumes e.g. 4K of memory\n * and increases memory management overhead.  Setting the guard area\n * size to zero hence trades off reliable behaviour on stack overflow\n * for performance. */\nAPR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr,\n                                                       apr_size_t guardsize);\n\n/**\n * Create a new thread of execution\n * @param new_thread The newly created thread handle.\n * @param attr The threadattr to use to determine how to create the thread\n * @param func The function to start the new thread in\n * @param data Any data to be passed to the starting function\n * @param cont The pool to use\n */\nAPR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new_thread, \n                                            apr_threadattr_t *attr, \n                                            apr_thread_start_t func, \n                                            void *data, apr_pool_t *cont);\n\n/**\n * stop the current thread\n * @param thd The thread to stop\n * @param retval The return value to pass back to any thread that cares\n */\nAPR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd, \n                                          apr_status_t retval);\n\n/**\n * block until the desired thread stops executing.\n * @param retval The return value from the dead thread.\n * @param thd The thread to join\n */\nAPR_DECLARE(apr_status_t) apr_thread_join(apr_status_t *retval, \n                                          apr_thread_t *thd); \n\n/**\n * force the current thread to yield the processor\n */\nAPR_DECLARE(void) apr_thread_yield(void);\n\n/**\n * Initialize the control variable for apr_thread_once.  If this isn't\n * called, apr_initialize won't work.\n * @param control The control variable to initialize\n * @param p The pool to allocate data from.\n */\nAPR_DECLARE(apr_status_t) apr_thread_once_init(apr_thread_once_t **control,\n                                               apr_pool_t *p);\n\n/**\n * Run the specified function one time, regardless of how many threads\n * call it.\n * @param control The control variable.  The same variable should\n *                be passed in each time the function is tried to be\n *                called.  This is how the underlying functions determine\n *                if the function has ever been called before.\n * @param func The function to call.\n */\nAPR_DECLARE(apr_status_t) apr_thread_once(apr_thread_once_t *control,\n                                          void (*func)(void));\n\n/**\n * detach a thread\n * @param thd The thread to detach \n */\nAPR_DECLARE(apr_status_t) apr_thread_detach(apr_thread_t *thd);\n\n/**\n * Return user data associated with the current thread.\n * @param data The user data associated with the thread.\n * @param key The key to associate with the data\n * @param thread The currently open thread.\n */\nAPR_DECLARE(apr_status_t) apr_thread_data_get(void **data, const char *key,\n                                             apr_thread_t *thread);\n\n/**\n * Set user data associated with the current thread.\n * @param data The user data to associate with the thread.\n * @param key The key to use for associating the data with the thread\n * @param cleanup The cleanup routine to use when the thread is destroyed.\n * @param thread The currently open thread.\n */\nAPR_DECLARE(apr_status_t) apr_thread_data_set(void *data, const char *key,\n                                             apr_status_t (*cleanup) (void *),\n                                             apr_thread_t *thread);\n\n/**\n * Create and initialize a new thread private address space\n * @param key The thread private handle.\n * @param dest The destructor to use when freeing the private memory.\n * @param cont The pool to use\n */\nAPR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t **key, \n                                                    void (*dest)(void *),\n                                                    apr_pool_t *cont);\n\n/**\n * Get a pointer to the thread private memory\n * @param new_mem The data stored in private memory \n * @param key The handle for the desired thread private memory \n */\nAPR_DECLARE(apr_status_t) apr_threadkey_private_get(void **new_mem, \n                                                 apr_threadkey_t *key);\n\n/**\n * Set the data to be stored in thread private memory\n * @param priv The data to be stored in private memory \n * @param key The handle for the desired thread private memory \n */\nAPR_DECLARE(apr_status_t) apr_threadkey_private_set(void *priv, \n                                                 apr_threadkey_t *key);\n\n/**\n * Free the thread private memory\n * @param key The handle for the desired thread private memory \n */\nAPR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key);\n\n/**\n * Return the pool associated with the current threadkey.\n * @param data The user data associated with the threadkey.\n * @param key The key associated with the data\n * @param threadkey The currently open threadkey.\n */\nAPR_DECLARE(apr_status_t) apr_threadkey_data_get(void **data, const char *key,\n                                                apr_threadkey_t *threadkey);\n\n/**\n * Return the pool associated with the current threadkey.\n * @param data The data to set.\n * @param key The key to associate with the data.\n * @param cleanup The cleanup routine to use when the file is destroyed.\n * @param threadkey The currently open threadkey.\n */\nAPR_DECLARE(apr_status_t) apr_threadkey_data_set(void *data, const char *key,\n                                                apr_status_t (*cleanup) (void *),\n                                                apr_threadkey_t *threadkey);\n\n#endif\n\n/**\n * Create and initialize a new procattr variable\n * @param new_attr The newly created procattr. \n * @param cont The pool to use\n */\nAPR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new_attr,\n                                                  apr_pool_t *cont);\n\n/**\n * Determine if any of stdin, stdout, or stderr should be linked to pipes \n * when starting a child process.\n * @param attr The procattr we care about. \n * @param in Should stdin be a pipe back to the parent?\n * @param out Should stdout be a pipe back to the parent?\n * @param err Should stderr be a pipe back to the parent?\n * @note If APR_NO_PIPE, there will be no special channel, the child\n * inherits the parent's corresponding stdio stream.  If APR_NO_FILE is \n * specified, that corresponding stream is closed in the child (and will\n * be INVALID_HANDLE_VALUE when inspected on Win32). This can have ugly \n * side effects, as the next file opened in the child on Unix will fall\n * into the stdio stream fd slot!\n */\nAPR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, \n                                             apr_int32_t in, apr_int32_t out,\n                                             apr_int32_t err);\n\n/**\n * Set the child_in and/or parent_in values to existing apr_file_t values.\n * @param attr The procattr we care about. \n * @param child_in apr_file_t value to use as child_in. Must be a valid file.\n * @param parent_in apr_file_t value to use as parent_in. Must be a valid file.\n * @remark  This is NOT a required initializer function. This is\n *          useful if you have already opened a pipe (or multiple files)\n *          that you wish to use, perhaps persistently across multiple\n *          process invocations - such as a log file. You can save some \n *          extra function calls by not creating your own pipe since this\n *          creates one in the process space for you.\n * @bug Note that calling this function with two NULL files on some platforms\n * creates an APR_FULL_BLOCK pipe, but this behavior is neither portable nor\n * is it supported.  @see apr_procattr_io_set instead for simple pipes.\n */\nAPR_DECLARE(apr_status_t) apr_procattr_child_in_set(struct apr_procattr_t *attr,\n                                                  apr_file_t *child_in,\n                                                  apr_file_t *parent_in);\n\n/**\n * Set the child_out and parent_out values to existing apr_file_t values.\n * @param attr The procattr we care about. \n * @param child_out apr_file_t value to use as child_out. Must be a valid file.\n * @param parent_out apr_file_t value to use as parent_out. Must be a valid file.\n * @remark This is NOT a required initializer function. This is\n *         useful if you have already opened a pipe (or multiple files)\n *         that you wish to use, perhaps persistently across multiple\n *         process invocations - such as a log file. \n * @bug Note that calling this function with two NULL files on some platforms\n * creates an APR_FULL_BLOCK pipe, but this behavior is neither portable nor\n * is it supported.  @see apr_procattr_io_set instead for simple pipes.\n */\nAPR_DECLARE(apr_status_t) apr_procattr_child_out_set(struct apr_procattr_t *attr,\n                                                   apr_file_t *child_out,\n                                                   apr_file_t *parent_out);\n\n/**\n * Set the child_err and parent_err values to existing apr_file_t values.\n * @param attr The procattr we care about. \n * @param child_err apr_file_t value to use as child_err. Must be a valid file.\n * @param parent_err apr_file_t value to use as parent_err. Must be a valid file.\n * @remark This is NOT a required initializer function. This is\n *         useful if you have already opened a pipe (or multiple files)\n *         that you wish to use, perhaps persistently across multiple\n *         process invocations - such as a log file. \n * @bug Note that calling this function with two NULL files on some platforms\n * creates an APR_FULL_BLOCK pipe, but this behavior is neither portable nor\n * is it supported.  @see apr_procattr_io_set instead for simple pipes.\n */\nAPR_DECLARE(apr_status_t) apr_procattr_child_err_set(struct apr_procattr_t *attr,\n                                                   apr_file_t *child_err,\n                                                   apr_file_t *parent_err);\n\n/**\n * Set which directory the child process should start executing in.\n * @param attr The procattr we care about. \n * @param dir Which dir to start in.  By default, this is the same dir as\n *            the parent currently resides in, when the createprocess call\n *            is made. \n */\nAPR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr, \n                                              const char *dir);\n\n/**\n * Set what type of command the child process will call.\n * @param attr The procattr we care about. \n * @param cmd The type of command.  One of:\n * <PRE>\n *            APR_SHELLCMD     --  Anything that the shell can handle\n *            APR_PROGRAM      --  Executable program   (default) \n *            APR_PROGRAM_ENV  --  Executable program, copy environment\n *            APR_PROGRAM_PATH --  Executable program on PATH, copy env\n * </PRE>\n */\nAPR_DECLARE(apr_status_t) apr_procattr_cmdtype_set(apr_procattr_t *attr,\n                                                  apr_cmdtype_e cmd);\n\n/**\n * Determine if the child should start in detached state.\n * @param attr The procattr we care about. \n * @param detach Should the child start in detached state?  Default is no. \n */\nAPR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, \n                                                 apr_int32_t detach);\n\n#if APR_HAVE_STRUCT_RLIMIT\n/**\n * Set the Resource Utilization limits when starting a new process.\n * @param attr The procattr we care about. \n * @param what Which limit to set, one of:\n * <PRE>\n *                 APR_LIMIT_CPU\n *                 APR_LIMIT_MEM\n *                 APR_LIMIT_NPROC\n *                 APR_LIMIT_NOFILE\n * </PRE>\n * @param limit Value to set the limit to.\n */\nAPR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr, \n                                                apr_int32_t what,\n                                                struct rlimit *limit);\n#endif\n\n/**\n * Specify an error function to be called in the child process if APR\n * encounters an error in the child prior to running the specified program.\n * @param attr The procattr describing the child process to be created.\n * @param errfn The function to call in the child process.\n * @remark At the present time, it will only be called from apr_proc_create()\n *         on platforms where fork() is used.  It will never be called on other\n *         platforms, on those platforms apr_proc_create() will return the error\n *         in the parent process rather than invoke the callback in the now-forked\n *         child process.\n */\nAPR_DECLARE(apr_status_t) apr_procattr_child_errfn_set(apr_procattr_t *attr,\n                                                       apr_child_errfn_t *errfn);\n\n/**\n * Specify that apr_proc_create() should do whatever it can to report\n * failures to the caller of apr_proc_create(), rather than find out in\n * the child.\n * @param attr The procattr describing the child process to be created.\n * @param chk Flag to indicate whether or not extra work should be done\n *            to try to report failures to the caller.\n * @remark This flag only affects apr_proc_create() on platforms where\n *         fork() is used.  This leads to extra overhead in the calling\n *         process, but that may help the application handle such\n *         errors more gracefully.\n */\nAPR_DECLARE(apr_status_t) apr_procattr_error_check_set(apr_procattr_t *attr,\n                                                       apr_int32_t chk);\n\n/**\n * Determine if the child should start in its own address space or using the \n * current one from its parent\n * @param attr The procattr we care about. \n * @param addrspace Should the child start in its own address space?  Default\n *                  is no on NetWare and yes on other platforms.\n */\nAPR_DECLARE(apr_status_t) apr_procattr_addrspace_set(apr_procattr_t *attr,\n                                                       apr_int32_t addrspace);\n\n/**\n * Set the username used for running process\n * @param attr The procattr we care about. \n * @param username The username used\n * @param password User password if needed. Password is needed on WIN32\n *                 or any other platform having\n *                 APR_PROCATTR_USER_SET_REQUIRES_PASSWORD set.\n */\nAPR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,\n                                                const char *username,\n                                                const char *password);\n\n/**\n * Set the group used for running process\n * @param attr The procattr we care about. \n * @param groupname The group name  used\n */\nAPR_DECLARE(apr_status_t) apr_procattr_group_set(apr_procattr_t *attr,\n                                                 const char *groupname);\n\n\n#if APR_HAS_FORK\n/**\n * This is currently the only non-portable call in APR.  This executes \n * a standard unix fork.\n * @param proc The resulting process handle. \n * @param cont The pool to use. \n * @remark returns APR_INCHILD for the child, and APR_INPARENT for the parent\n * or an error.\n */\nAPR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont);\n#endif\n\n/**\n * Create a new process and execute a new program within that process.\n * @param new_proc The resulting process handle.\n * @param progname The program to run \n * @param args the arguments to pass to the new program.  The first \n *             one should be the program name.\n * @param env The new environment table for the new process.  This \n *            should be a list of NULL-terminated strings. This argument\n *            is ignored for APR_PROGRAM_ENV, APR_PROGRAM_PATH, and\n *            APR_SHELLCMD_ENV types of commands.\n * @param attr the procattr we should use to determine how to create the new\n *         process\n * @param pool The pool to use.\n * @note This function returns without waiting for the new process to terminate;\n * use apr_proc_wait for that.\n */\nAPR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new_proc,\n                                          const char *progname,\n                                          const char * const *args,\n                                          const char * const *env, \n                                          apr_procattr_t *attr, \n                                          apr_pool_t *pool);\n\n/**\n * Wait for a child process to die\n * @param proc The process handle that corresponds to the desired child process \n * @param exitcode The returned exit status of the child, if a child process \n *                 dies, or the signal that caused the child to die.\n *                 On platforms that don't support obtaining this information, \n *                 the status parameter will be returned as APR_ENOTIMPL.\n * @param exitwhy Why the child died, the bitwise or of:\n * <PRE>\n *            APR_PROC_EXIT         -- process terminated normally\n *            APR_PROC_SIGNAL       -- process was killed by a signal\n *            APR_PROC_SIGNAL_CORE  -- process was killed by a signal, and\n *                                     generated a core dump.\n * </PRE>\n * @param waithow How should we wait.  One of:\n * <PRE>\n *            APR_WAIT   -- block until the child process dies.\n *            APR_NOWAIT -- return immediately regardless of if the \n *                          child is dead or not.\n * </PRE>\n * @remark The child's status is in the return code to this process.  It is one of:\n * <PRE>\n *            APR_CHILD_DONE     -- child is no longer running.\n *            APR_CHILD_NOTDONE  -- child is still running.\n * </PRE>\n */\nAPR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc,\n                                        int *exitcode, apr_exit_why_e *exitwhy,\n                                        apr_wait_how_e waithow);\n\n/**\n * Wait for any current child process to die and return information \n * about that child.\n * @param proc Pointer to NULL on entry, will be filled out with child's \n *             information \n * @param exitcode The returned exit status of the child, if a child process \n *                 dies, or the signal that caused the child to die.\n *                 On platforms that don't support obtaining this information, \n *                 the status parameter will be returned as APR_ENOTIMPL.\n * @param exitwhy Why the child died, the bitwise or of:\n * <PRE>\n *            APR_PROC_EXIT         -- process terminated normally\n *            APR_PROC_SIGNAL       -- process was killed by a signal\n *            APR_PROC_SIGNAL_CORE  -- process was killed by a signal, and\n *                                     generated a core dump.\n * </PRE>\n * @param waithow How should we wait.  One of:\n * <PRE>\n *            APR_WAIT   -- block until the child process dies.\n *            APR_NOWAIT -- return immediately regardless of if the \n *                          child is dead or not.\n * </PRE>\n * @param p Pool to allocate child information out of.\n * @bug Passing proc as a *proc rather than **proc was an odd choice\n * for some platforms... this should be revisited in 1.0\n */\nAPR_DECLARE(apr_status_t) apr_proc_wait_all_procs(apr_proc_t *proc,\n                                                  int *exitcode,\n                                                  apr_exit_why_e *exitwhy,\n                                                  apr_wait_how_e waithow,\n                                                  apr_pool_t *p);\n\n#define APR_PROC_DETACH_FOREGROUND 0    /**< Do not detach */\n#define APR_PROC_DETACH_DAEMONIZE 1     /**< Detach */\n\n/**\n * Detach the process from the controlling terminal.\n * @param daemonize set to non-zero if the process should daemonize\n *                  and become a background process, else it will\n *                  stay in the foreground.\n */\nAPR_DECLARE(apr_status_t) apr_proc_detach(int daemonize);\n\n/**\n * Register an other_child -- a child associated to its registered \n * maintence callback.  This callback is invoked when the process\n * dies, is disconnected or disappears.\n * @param proc The child process to register.\n * @param maintenance maintenance is a function that is invoked with a \n *                    reason and the data pointer passed here.\n * @param data Opaque context data passed to the maintenance function.\n * @param write_fd An fd that is probed for writing.  If it is ever unwritable\n *                 then the maintenance is invoked with reason \n *                 OC_REASON_UNWRITABLE.\n * @param p The pool to use for allocating memory.\n * @bug write_fd duplicates the proc->out stream, it's really redundant\n * and should be replaced in the APR 1.0 API with a bitflag of which\n * proc->in/out/err handles should be health checked.\n * @bug no platform currently tests the pipes health.\n */\nAPR_DECLARE(void) apr_proc_other_child_register(apr_proc_t *proc, \n                                           void (*maintenance) (int reason, \n                                                                void *, \n                                                                int status),\n                                           void *data, apr_file_t *write_fd,\n                                           apr_pool_t *p);\n\n/**\n * Stop watching the specified other child.  \n * @param data The data to pass to the maintenance function.  This is\n *             used to find the process to unregister.\n * @warning Since this can be called by a maintenance function while we're\n *          scanning the other_children list, all scanners should protect \n *          themself by loading ocr->next before calling any maintenance \n *          function.\n */\nAPR_DECLARE(void) apr_proc_other_child_unregister(void *data);\n\n/**\n * Notify the maintenance callback of a registered other child process\n * that application has detected an event, such as death.\n * @param proc The process to check\n * @param reason The reason code to pass to the maintenance function\n * @param status The status to pass to the maintenance function\n * @remark An example of code using this behavior;\n * <pre>\n * rv = apr_proc_wait_all_procs(&proc, &exitcode, &status, APR_WAIT, p);\n * if (APR_STATUS_IS_CHILD_DONE(rv)) {\n * \\#if APR_HAS_OTHER_CHILD\n *     if (apr_proc_other_child_alert(&proc, APR_OC_REASON_DEATH, status)\n *             == APR_SUCCESS) {\n *         ;  (already handled)\n *     }\n *     else\n * \\#endif\n *         [... handling non-otherchild processes death ...]\n * </pre>\n */\nAPR_DECLARE(apr_status_t) apr_proc_other_child_alert(apr_proc_t *proc, \n                                                     int reason,\n                                                     int status);\n\n/**\n * Test one specific other child processes and invoke the maintenance callback \n * with the appropriate reason code, if still running, or the appropriate reason \n * code if the process is no longer healthy.\n * @param ocr The registered other child\n * @param reason The reason code (e.g. APR_OC_REASON_RESTART) if still running\n */\nAPR_DECLARE(void) apr_proc_other_child_refresh(apr_other_child_rec_t *ocr,\n                                               int reason);\n\n/**\n * Test all registered other child processes and invoke the maintenance callback \n * with the appropriate reason code, if still running, or the appropriate reason \n * code if the process is no longer healthy.\n * @param reason The reason code (e.g. APR_OC_REASON_RESTART) to running processes\n */\nAPR_DECLARE(void) apr_proc_other_child_refresh_all(int reason);\n\n/** \n * Terminate a process.\n * @param proc The process to terminate.\n * @param sig How to kill the process.\n */\nAPR_DECLARE(apr_status_t) apr_proc_kill(apr_proc_t *proc, int sig);\n\n/**\n * Register a process to be killed when a pool dies.\n * @param a The pool to use to define the processes lifetime \n * @param proc The process to register\n * @param how How to kill the process, one of:\n * <PRE>\n *         APR_KILL_NEVER         -- process is never sent any signals\n *         APR_KILL_ALWAYS        -- process is sent SIGKILL on apr_pool_t cleanup\n *         APR_KILL_AFTER_TIMEOUT -- SIGTERM, wait 3 seconds, SIGKILL\n *         APR_JUST_WAIT          -- wait forever for the process to complete\n *         APR_KILL_ONLY_ONCE     -- send SIGTERM and then wait\n * </PRE>\n */\nAPR_DECLARE(void) apr_pool_note_subprocess(apr_pool_t *a, apr_proc_t *proc,\n                                           apr_kill_conditions_e how);\n\n#if APR_HAS_THREADS \n\n#if (APR_HAVE_SIGWAIT || APR_HAVE_SIGSUSPEND) && !defined(OS2)\n\n/**\n * Setup the process for a single thread to be used for all signal handling.\n * @warning This must be called before any threads are created\n */\nAPR_DECLARE(apr_status_t) apr_setup_signal_thread(void);\n\n/**\n * Make the current thread listen for signals.  This thread will loop\n * forever, calling a provided function whenever it receives a signal.  That\n * functions should return 1 if the signal has been handled, 0 otherwise.\n * @param signal_handler The function to call when a signal is received\n * apr_status_t apr_signal_thread((int)(*signal_handler)(int signum))\n */\nAPR_DECLARE(apr_status_t) apr_signal_thread(int(*signal_handler)(int signum));\n\n#endif /* (APR_HAVE_SIGWAIT || APR_HAVE_SIGSUSPEND) && !defined(OS2) */\n\n/**\n * Get the child-pool used by the thread from the thread info.\n * @return apr_pool_t the pool\n */\nAPR_POOL_DECLARE_ACCESSOR(thread);\n\n#endif /* APR_HAS_THREADS */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_THREAD_PROC_H */\n\n"
  },
  {
    "path": "third_party/include/apr/apr_thread_rwlock.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_THREAD_RWLOCK_H\n#define APR_THREAD_RWLOCK_H\n\n/**\n * @file apr_thread_rwlock.h\n * @brief APR Reader/Writer Lock Routines\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n#if APR_HAS_THREADS\n\n/**\n * @defgroup apr_thread_rwlock Reader/Writer Lock Routines\n * @ingroup APR \n * @{\n */\n\n/** Opaque read-write thread-safe lock. */\ntypedef struct apr_thread_rwlock_t apr_thread_rwlock_t;\n\n/**\n * Note: The following operations have undefined results: unlocking a\n * read-write lock which is not locked in the calling thread; write\n * locking a read-write lock which is already locked by the calling\n * thread; destroying a read-write lock more than once; clearing or\n * destroying the pool from which a <b>locked</b> read-write lock is\n * allocated.\n */\n\n/**\n * Create and initialize a read-write lock that can be used to synchronize\n * threads.\n * @param rwlock the memory address where the newly created readwrite lock\n *        will be stored.\n * @param pool the pool from which to allocate the mutex.\n */\nAPR_DECLARE(apr_status_t) apr_thread_rwlock_create(apr_thread_rwlock_t **rwlock,\n                                                   apr_pool_t *pool);\n/**\n * Acquire a shared-read lock on the given read-write lock. This will allow\n * multiple threads to enter the same critical section while they have acquired\n * the read lock.\n * @param rwlock the read-write lock on which to acquire the shared read.\n */\nAPR_DECLARE(apr_status_t) apr_thread_rwlock_rdlock(apr_thread_rwlock_t *rwlock);\n\n/**\n * Attempt to acquire the shared-read lock on the given read-write lock. This\n * is the same as apr_thread_rwlock_rdlock(), only that the function fails\n * if there is another thread holding the write lock, or if there are any\n * write threads blocking on the lock. If the function fails for this case,\n * APR_EBUSY will be returned. Note: it is important that the\n * APR_STATUS_IS_EBUSY(s) macro be used to determine if the return value was\n * APR_EBUSY, for portability reasons.\n * @param rwlock the rwlock on which to attempt the shared read.\n */\nAPR_DECLARE(apr_status_t) apr_thread_rwlock_tryrdlock(apr_thread_rwlock_t *rwlock);\n\n/**\n * Acquire an exclusive-write lock on the given read-write lock. This will\n * allow only one single thread to enter the critical sections. If there\n * are any threads currently holding the read-lock, this thread is put to\n * sleep until it can have exclusive access to the lock.\n * @param rwlock the read-write lock on which to acquire the exclusive write.\n */\nAPR_DECLARE(apr_status_t) apr_thread_rwlock_wrlock(apr_thread_rwlock_t *rwlock);\n\n/**\n * Attempt to acquire the exclusive-write lock on the given read-write lock. \n * This is the same as apr_thread_rwlock_wrlock(), only that the function fails\n * if there is any other thread holding the lock (for reading or writing),\n * in which case the function will return APR_EBUSY. Note: it is important\n * that the APR_STATUS_IS_EBUSY(s) macro be used to determine if the return\n * value was APR_EBUSY, for portability reasons.\n * @param rwlock the rwlock on which to attempt the exclusive write.\n */\nAPR_DECLARE(apr_status_t) apr_thread_rwlock_trywrlock(apr_thread_rwlock_t *rwlock);\n\n/**\n * Release either the read or write lock currently held by the calling thread\n * associated with the given read-write lock.\n * @param rwlock the read-write lock to be released (unlocked).\n */\nAPR_DECLARE(apr_status_t) apr_thread_rwlock_unlock(apr_thread_rwlock_t *rwlock);\n\n/**\n * Destroy the read-write lock and free the associated memory.\n * @param rwlock the rwlock to destroy.\n */\nAPR_DECLARE(apr_status_t) apr_thread_rwlock_destroy(apr_thread_rwlock_t *rwlock);\n\n/**\n * Get the pool used by this thread_rwlock.\n * @return apr_pool_t the pool\n */\nAPR_POOL_DECLARE_ACCESSOR(thread_rwlock);\n\n#endif  /* APR_HAS_THREADS */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_THREAD_RWLOCK_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_time.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_TIME_H\n#define APR_TIME_H\n\n/**\n * @file apr_time.h\n * @brief APR Time Library\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_time Time Routines\n * @ingroup APR \n * @{\n */\n\n/** month names */\nAPR_DECLARE_DATA extern const char apr_month_snames[12][4];\n/** day names */\nAPR_DECLARE_DATA extern const char apr_day_snames[7][4];\n\n\n/** number of microseconds since 00:00:00 January 1, 1970 UTC */\ntypedef apr_int64_t apr_time_t;\n\n\n/** mechanism to properly type apr_time_t literals */\n#define APR_TIME_C(val) APR_INT64_C(val)\n\n/** mechanism to properly print apr_time_t values */\n#define APR_TIME_T_FMT APR_INT64_T_FMT\n\n/** intervals for I/O timeouts, in microseconds */\ntypedef apr_int64_t apr_interval_time_t;\n/** short interval for I/O timeouts, in microseconds */\ntypedef apr_int32_t apr_short_interval_time_t;\n\n/** number of microseconds per second */\n#define APR_USEC_PER_SEC APR_TIME_C(1000000)\n\n/** @return apr_time_t as a second */\n#define apr_time_sec(time) ((time) / APR_USEC_PER_SEC)\n\n/** @return apr_time_t as a usec */\n#define apr_time_usec(time) ((time) % APR_USEC_PER_SEC)\n\n/** @return apr_time_t as a msec */\n#define apr_time_msec(time) (((time) / 1000) % 1000)\n\n/** @return apr_time_t as a msec */\n#define apr_time_as_msec(time) ((time) / 1000)\n\n/** @return milliseconds as an apr_time_t */\n#define apr_time_from_msec(msec) ((apr_time_t)(msec) * 1000)\n\n/** @return seconds as an apr_time_t */\n#define apr_time_from_sec(sec) ((apr_time_t)(sec) * APR_USEC_PER_SEC)\n\n/** @return a second and usec combination as an apr_time_t */\n#define apr_time_make(sec, usec) ((apr_time_t)(sec) * APR_USEC_PER_SEC \\\n                                + (apr_time_t)(usec))\n\n/**\n * @return the current time\n */\nAPR_DECLARE(apr_time_t) apr_time_now(void);\n\n/** @see apr_time_exp_t */\ntypedef struct apr_time_exp_t apr_time_exp_t;\n\n/**\n * a structure similar to ANSI struct tm with the following differences:\n *  - tm_usec isn't an ANSI field\n *  - tm_gmtoff isn't an ANSI field (it's a BSDism)\n */\nstruct apr_time_exp_t {\n    /** microseconds past tm_sec */\n    apr_int32_t tm_usec;\n    /** (0-61) seconds past tm_min */\n    apr_int32_t tm_sec;\n    /** (0-59) minutes past tm_hour */\n    apr_int32_t tm_min;\n    /** (0-23) hours past midnight */\n    apr_int32_t tm_hour;\n    /** (1-31) day of the month */\n    apr_int32_t tm_mday;\n    /** (0-11) month of the year */\n    apr_int32_t tm_mon;\n    /** year since 1900 */\n    apr_int32_t tm_year;\n    /** (0-6) days since Sunday */\n    apr_int32_t tm_wday;\n    /** (0-365) days since January 1 */\n    apr_int32_t tm_yday;\n    /** daylight saving time */\n    apr_int32_t tm_isdst;\n    /** seconds east of UTC */\n    apr_int32_t tm_gmtoff;\n};\n\n/**\n * Convert an ansi time_t to an apr_time_t\n * @param result the resulting apr_time_t\n * @param input the time_t to convert\n */\nAPR_DECLARE(apr_status_t) apr_time_ansi_put(apr_time_t *result, \n                                                    time_t input);\n\n/**\n * Convert a time to its human readable components using an offset\n * from GMT.\n * @param result the exploded time\n * @param input the time to explode\n * @param offs the number of seconds offset to apply\n */\nAPR_DECLARE(apr_status_t) apr_time_exp_tz(apr_time_exp_t *result,\n                                          apr_time_t input,\n                                          apr_int32_t offs);\n\n/**\n * Convert a time to its human readable components (GMT).\n * @param result the exploded time\n * @param input the time to explode\n */\nAPR_DECLARE(apr_status_t) apr_time_exp_gmt(apr_time_exp_t *result, \n                                           apr_time_t input);\n\n/**\n * Convert a time to its human readable components in the local timezone.\n * @param result the exploded time\n * @param input the time to explode\n */\nAPR_DECLARE(apr_status_t) apr_time_exp_lt(apr_time_exp_t *result, \n                                          apr_time_t input);\n\n/**\n * Convert time value from human readable format to a numeric apr_time_t\n * (elapsed microseconds since the epoch).\n * @param result the resulting imploded time\n * @param input the input exploded time\n */\nAPR_DECLARE(apr_status_t) apr_time_exp_get(apr_time_t *result, \n                                           apr_time_exp_t *input);\n\n/**\n * Convert time value from human readable format to a numeric apr_time_t that\n * always represents GMT.\n * @param result the resulting imploded time\n * @param input the input exploded time\n */\nAPR_DECLARE(apr_status_t) apr_time_exp_gmt_get(apr_time_t *result, \n                                               apr_time_exp_t *input);\n\n/**\n * Sleep for the specified number of micro-seconds.\n * @param t desired amount of time to sleep.\n * @warning May sleep for longer than the specified time. \n */\nAPR_DECLARE(void) apr_sleep(apr_interval_time_t t);\n\n/** length of a RFC822 Date */\n#define APR_RFC822_DATE_LEN (30)\n/**\n * apr_rfc822_date formats dates in the RFC822\n * format in an efficient manner.  It is a fixed length\n * format which requires APR_RFC822_DATA_LEN bytes of storage,\n * including the trailing NUL terminator.\n * @param date_str String to write to.\n * @param t the time to convert \n */\nAPR_DECLARE(apr_status_t) apr_rfc822_date(char *date_str, apr_time_t t);\n\n/** length of a CTIME date */\n#define APR_CTIME_LEN (25)\n/**\n * apr_ctime formats dates in the ctime() format\n * in an efficient manner.  It is a fixed length format\n * and requires APR_CTIME_LEN bytes of storage including\n * the trailing NUL terminator.\n * Unlike ANSI/ISO C ctime(), apr_ctime() does not include\n * a \\\\n at the end of the string.\n * @param date_str String to write to.\n * @param t the time to convert \n */\nAPR_DECLARE(apr_status_t) apr_ctime(char *date_str, apr_time_t t);\n\n/**\n * Formats the exploded time according to the format specified\n * @param s string to write to\n * @param retsize The length of the returned string\n * @param max The maximum length of the string\n * @param format The format for the time string\n * @param tm The time to convert\n */\nAPR_DECLARE(apr_status_t) apr_strftime(char *s, apr_size_t *retsize, \n                                       apr_size_t max, const char *format, \n                                       apr_time_exp_t *tm);\n\n/**\n * Improve the clock resolution for the lifetime of the given pool.\n * Generally this is only desirable on benchmarking and other very\n * time-sensitive applications, and has no impact on most platforms.\n * @param p The pool to associate the finer clock resolution \n */\nAPR_DECLARE(void) apr_time_clock_hires(apr_pool_t *p);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_TIME_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_user.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_USER_H\n#define APR_USER_H\n\n/**\n * @file apr_user.h\n * @brief APR User ID Services \n */\n\n#include \"apr.h\"\n#include \"apr_errno.h\"\n#include \"apr_pools.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apr_user User and Group ID Services\n * @ingroup APR \n * @{\n */\n\n/**\n * Structure for determining user ownership.\n */\n#ifdef WIN32\ntypedef PSID                      apr_uid_t;\n#else\ntypedef uid_t                     apr_uid_t;\n#endif\n\n/**\n * Structure for determining group ownership.\n */\n#ifdef WIN32\ntypedef PSID                      apr_gid_t;\n#else\ntypedef gid_t                     apr_gid_t;\n#endif\n\n#if APR_HAS_USER \n\n/**\n * Get the userid (and groupid) of the calling process\n * @param userid   Returns the user id\n * @param groupid  Returns the user's group id\n * @param p The pool from which to allocate working space\n * @remark This function is available only if APR_HAS_USER is defined.\n */\nAPR_DECLARE(apr_status_t) apr_uid_current(apr_uid_t *userid,\n                                          apr_gid_t *groupid,\n                                          apr_pool_t *p);\n\n/**\n * Get the user name for a specified userid\n * @param username Pointer to new string containing user name (on output)\n * @param userid The userid\n * @param p The pool from which to allocate the string\n * @remark This function is available only if APR_HAS_USER is defined.\n */\nAPR_DECLARE(apr_status_t) apr_uid_name_get(char **username, apr_uid_t userid,\n                                           apr_pool_t *p);\n\n/**\n * Get the userid (and groupid) for the specified username\n * @param userid   Returns the user id\n * @param groupid  Returns the user's group id\n * @param username The username to look up\n * @param p The pool from which to allocate working space\n * @remark This function is available only if APR_HAS_USER is defined.\n */\nAPR_DECLARE(apr_status_t) apr_uid_get(apr_uid_t *userid, apr_gid_t *groupid,\n                                      const char *username, apr_pool_t *p);\n\n/**\n * Get the home directory for the named user\n * @param dirname Pointer to new string containing directory name (on output)\n * @param username The named user\n * @param p The pool from which to allocate the string\n * @remark This function is available only if APR_HAS_USER is defined.\n */\nAPR_DECLARE(apr_status_t) apr_uid_homepath_get(char **dirname, \n                                               const char *username, \n                                               apr_pool_t *p);\n\n/**\n * Compare two user identifiers for equality.\n * @param left One uid to test\n * @param right Another uid to test\n * @return APR_SUCCESS if the apr_uid_t structures identify the same user,\n * APR_EMISMATCH if not, APR_BADARG if an apr_uid_t is invalid.\n * @remark This function is available only if APR_HAS_USER is defined.\n */\n#if defined(WIN32)\nAPR_DECLARE(apr_status_t) apr_uid_compare(apr_uid_t left, apr_uid_t right);\n#else\n#define apr_uid_compare(left,right) (((left) == (right)) ? APR_SUCCESS : APR_EMISMATCH)\n#endif\n\n/**\n * Get the group name for a specified groupid\n * @param groupname Pointer to new string containing group name (on output)\n * @param groupid The groupid\n * @param p The pool from which to allocate the string\n * @remark This function is available only if APR_HAS_USER is defined.\n */\nAPR_DECLARE(apr_status_t) apr_gid_name_get(char **groupname, \n                                             apr_gid_t groupid, apr_pool_t *p);\n\n/**\n * Get the groupid for a specified group name\n * @param groupid Pointer to the group id (on output)\n * @param groupname The group name to look up\n * @param p The pool from which to allocate the string\n * @remark This function is available only if APR_HAS_USER is defined.\n */\nAPR_DECLARE(apr_status_t) apr_gid_get(apr_gid_t *groupid, \n                                      const char *groupname, apr_pool_t *p);\n\n/**\n * Compare two group identifiers for equality.\n * @param left One gid to test\n * @param right Another gid to test\n * @return APR_SUCCESS if the apr_gid_t structures identify the same group,\n * APR_EMISMATCH if not, APR_BADARG if an apr_gid_t is invalid.\n * @remark This function is available only if APR_HAS_USER is defined.\n */\n#if defined(WIN32)\nAPR_DECLARE(apr_status_t) apr_gid_compare(apr_gid_t left, apr_gid_t right);\n#else\n#define apr_gid_compare(left,right) (((left) == (right)) ? APR_SUCCESS : APR_EMISMATCH)\n#endif\n\n#endif  /* ! APR_HAS_USER */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_USER_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_version.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_VERSION_H\n#define APR_VERSION_H\n\n/**\n * @file apr_version.h\n * @brief APR Versioning Interface\n * \n * APR's Version\n *\n * There are several different mechanisms for accessing the version. There\n * is a string form, and a set of numbers; in addition, there are constants\n * which can be compiled into your application, and you can query the library\n * being used for its actual version.\n *\n * Note that it is possible for an application to detect that it has been\n * compiled against a different version of APR by use of the compile-time\n * constants and the use of the run-time query function.\n *\n * APR version numbering follows the guidelines specified in:\n *\n *     http://apr.apache.org/versioning.html\n */\n\n\n#define APR_COPYRIGHT \"Copyright (c) 2000-2015 The Apache Software \" \\\n                      \"Foundation or its licensors, as applicable.\"\n\n/* The numeric compile-time version constants. These constants are the\n * authoritative version numbers for APR. \n */\n\n/** major version \n * Major API changes that could cause compatibility problems for older\n * programs such as structure size changes.  No binary compatibility is\n * possible across a change in the major version.\n */\n#define APR_MAJOR_VERSION       1\n\n/** minor version\n * Minor API changes that do not cause binary compatibility problems.\n * Reset to 0 when upgrading APR_MAJOR_VERSION\n */\n#define APR_MINOR_VERSION       5\n\n/** patch level \n * The Patch Level never includes API changes, simply bug fixes.\n * Reset to 0 when upgrading APR_MINOR_VERSION\n */\n#define APR_PATCH_VERSION       2\n\n/** \n * The symbol APR_IS_DEV_VERSION is only defined for internal,\n * \"development\" copies of APR.  It is undefined for released versions\n * of APR.\n */\n/* #define APR_IS_DEV_VERSION */\n\n/**\n * Check at compile time if the APR version is at least a certain\n * level.\n * @param major The major version component of the version checked\n * for (e.g., the \"1\" of \"1.3.0\").\n * @param minor The minor version component of the version checked\n * for (e.g., the \"3\" of \"1.3.0\").\n * @param patch The patch level component of the version checked\n * for (e.g., the \"0\" of \"1.3.0\").\n * @remark This macro is available with APR versions starting with\n * 1.3.0.\n */\n#define APR_VERSION_AT_LEAST(major,minor,patch)                    \\\n(((major) < APR_MAJOR_VERSION)                                     \\\n || ((major) == APR_MAJOR_VERSION && (minor) < APR_MINOR_VERSION) \\\n || ((major) == APR_MAJOR_VERSION && (minor) == APR_MINOR_VERSION && (patch) <= APR_PATCH_VERSION))\n\n#if defined(APR_IS_DEV_VERSION) || defined(DOXYGEN)\n/** Internal: string form of the \"is dev\" flag */\n#ifndef APR_IS_DEV_STRING\n#define APR_IS_DEV_STRING \"-dev\"\n#endif\n#else\n#define APR_IS_DEV_STRING \"\"\n#endif\n\n/* APR_STRINGIFY is defined here, and also in apr_general.h, so wrap it */\n#ifndef APR_STRINGIFY\n/** Properly quote a value as a string in the C preprocessor */\n#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)\n/** Helper macro for APR_STRINGIFY */\n#define APR_STRINGIFY_HELPER(n) #n\n#endif\n\n/** The formatted string of APR's version */\n#define APR_VERSION_STRING \\\n     APR_STRINGIFY(APR_MAJOR_VERSION) \".\" \\\n     APR_STRINGIFY(APR_MINOR_VERSION) \".\" \\\n     APR_STRINGIFY(APR_PATCH_VERSION) \\\n     APR_IS_DEV_STRING\n\n/** An alternative formatted string of APR's version */\n/* macro for Win32 .rc files using numeric csv representation */\n#define APR_VERSION_STRING_CSV APR_MAJOR_VERSION ##, \\\n                             ##APR_MINOR_VERSION ##, \\\n                             ##APR_PATCH_VERSION\n\n\n#ifndef APR_VERSION_ONLY\n\n/* The C language API to access the version at run time, \n * as opposed to compile time.  APR_VERSION_ONLY may be defined \n * externally when preprocessing apr_version.h to obtain strictly \n * the C Preprocessor macro declarations.\n */\n\n#include \"apr.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** \n * The numeric version information is broken out into fields within this \n * structure. \n */\ntypedef struct {\n    int major;      /**< major number */\n    int minor;      /**< minor number */\n    int patch;      /**< patch number */\n    int is_dev;     /**< is development (1 or 0) */\n} apr_version_t;\n\n/**\n * Return APR's version information information in a numeric form.\n *\n *  @param pvsn Pointer to a version structure for returning the version\n *              information.\n */\nAPR_DECLARE(void) apr_version(apr_version_t *pvsn);\n\n/** Return APR's version information as a string. */\nAPR_DECLARE(const char *) apr_version_string(void);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* ndef APR_VERSION_ONLY */\n\n#endif /* ndef APR_VERSION_H */\n"
  },
  {
    "path": "third_party/include/apr/apr_want.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"apr.h\"        /* configuration data */\n/**\n * @file apr_want.h\n * @brief APR Standard Headers Support\n *\n * <PRE>\n * Features:\n *\n *   APR_WANT_STRFUNC:  strcmp, strcat, strcpy, etc\n *   APR_WANT_MEMFUNC:  memcmp, memcpy, etc\n *   APR_WANT_STDIO:    <stdio.h> and related bits\n *   APR_WANT_IOVEC:    struct iovec\n *   APR_WANT_BYTEFUNC: htons, htonl, ntohl, ntohs\n *\n * Typical usage:\n *\n *   \\#define APR_WANT_STRFUNC\n *   \\#define APR_WANT_MEMFUNC\n *   \\#include \"apr_want.h\"\n *\n * The appropriate headers will be included.\n *\n * Note: it is safe to use this in a header (it won't interfere with other\n *       headers' or source files' use of apr_want.h)\n * </PRE>\n */\n\n/* --------------------------------------------------------------------- */\n\n#ifdef APR_WANT_STRFUNC\n\n#if APR_HAVE_STRING_H\n#include <string.h>\n#endif\n#if APR_HAVE_STRINGS_H\n#include <strings.h>\n#endif\n\n#undef APR_WANT_STRFUNC\n#endif\n\n/* --------------------------------------------------------------------- */\n\n#ifdef APR_WANT_MEMFUNC\n\n#if APR_HAVE_STRING_H\n#include <string.h>\n#endif\n\n#undef APR_WANT_MEMFUNC\n#endif\n\n/* --------------------------------------------------------------------- */\n\n#ifdef APR_WANT_STDIO\n\n#if APR_HAVE_STDIO_H\n#include <stdio.h>\n#endif\n\n#undef APR_WANT_STDIO\n#endif\n\n/* --------------------------------------------------------------------- */\n\n#ifdef APR_WANT_IOVEC\n\n#if APR_HAVE_IOVEC\n\n#if APR_HAVE_SYS_UIO_H\n#include <sys/uio.h>\n#endif\n\n#else\n\n#ifndef APR_IOVEC_DEFINED\n#define APR_IOVEC_DEFINED\nstruct iovec\n{\n    void *iov_base;\n    size_t iov_len;\n};\n#endif /* !APR_IOVEC_DEFINED */\n\n#endif /* APR_HAVE_IOVEC */\n\n#undef APR_WANT_IOVEC\n#endif\n\n/* --------------------------------------------------------------------- */\n\n#ifdef APR_WANT_BYTEFUNC\n\n/* Single Unix says they are in arpa/inet.h.  Linux has them in\n * netinet/in.h.  FreeBSD has them in arpa/inet.h but requires that\n * netinet/in.h be included first.\n */\n#if APR_HAVE_NETINET_IN_H\n#include <netinet/in.h>\n#endif\n#if APR_HAVE_ARPA_INET_H\n#include <arpa/inet.h>\n#endif\n\n#undef APR_WANT_BYTEFUNC\n#endif\n\n/* --------------------------------------------------------------------- */\n"
  },
  {
    "path": "third_party/include/apr/arch/aix/apr_arch_dso.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef DSO_H\n#define DSO_H\n\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_pools.h\"\n#include \"apr_dso.h\"\n#include \"apr.h\"\n\n#if APR_HAS_DSO\n\nvoid *dlopen(const char *path, int mode);\nvoid *dlsym(void *handle, const char *symbol);\nconst char *dlerror(void);\nint dlclose(void *handle);\n\nstruct apr_dso_handle_t {\n    apr_pool_t  *pool;\n    void          *handle;\n    const char *errormsg;\n};\n\n#endif\n\n#endif\n"
  },
  {
    "path": "third_party/include/apr/arch/apr_private_common.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * This file contains private declarations common to all architectures.\n */\n\n#ifndef APR_PRIVATE_COMMON_H\n#define APR_PRIVATE_COMMON_H\n\n#include \"apr_pools.h\"\n#include \"apr_tables.h\"\n\napr_status_t apr_filepath_list_split_impl(apr_array_header_t **pathelts,\n                                          const char *liststr,\n                                          char separator,\n                                          apr_pool_t *p);\n\napr_status_t apr_filepath_list_merge_impl(char **liststr,\n                                          apr_array_header_t *pathelts,\n                                          char separator,\n                                          apr_pool_t *p);\n\n/* temporary defines to handle 64bit compile mismatches */\n#define APR_INT_TRUNC_CAST    int\n#define APR_UINT32_TRUNC_CAST apr_uint32_t\n\n#endif  /*APR_PRIVATE_COMMON_H*/\n"
  },
  {
    "path": "third_party/include/apr/arch/beos/apr_arch_dso.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef DSO_H\n#define DSO_H\n\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n#include \"apr_dso.h\"\n#include \"apr.h\"\n#include <kernel/image.h>\n#include <string.h>\n\n#if APR_HAS_DSO\n\nstruct apr_dso_handle_t {\n    image_id      handle;    /* Handle to the DSO loaded */\n    apr_pool_t   *pool;\n    const char   *errormsg;  /* if the load fails, we have an error\n                              * message here :)\n                              */\n};\n\n#endif\n\n#endif\n"
  },
  {
    "path": "third_party/include/apr/arch/beos/apr_arch_proc_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef PROC_MUTEX_H\n#define PROC_MUTEX_H\n\n#include \"apr_pools.h\"\n#include \"apr_proc_mutex.h\"\n#include \"apr_file_io.h\"\n#include \"apr_general.h\"\n#include \"apr_lib.h\"\n#include \"apr_portable.h\"\n\nstruct apr_proc_mutex_t {\n    apr_pool_t *pool;\n    \n    /* Our lock :) */\n    sem_id Lock;\n    int32  LockCount;\n};\n\n#endif  /* PROC_MUTEX_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/beos/apr_arch_thread_cond.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_COND_H\n#define THREAD_COND_H\n\n#include <kernel/OS.h>\n#include \"apr_pools.h\"\n#include \"apr_thread_cond.h\"\n#include \"apr_file_io.h\"\n#include \"apr_general.h\"\n#include \"apr_lib.h\"\n#include \"apr_portable.h\"\n#include \"apr_ring.h\"\n\nstruct waiter_t {\n    APR_RING_ENTRY(waiter_t) link;\n    sem_id sem;\n};\n\nstruct apr_thread_cond_t {\n    apr_pool_t *pool;\n    sem_id lock;\n    apr_thread_mutex_t *condlock;\n    thread_id owner;\n    /* active list */\n    APR_RING_HEAD(active_list, waiter_t) alist;\n    /* free list */\n    APR_RING_HEAD(free_list,   waiter_t) flist;\n};\n\n#endif  /* THREAD_COND_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/beos/apr_arch_thread_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_MUTEX_H\n#define THREAD_MUTEX_H\n\n#include <kernel/OS.h>\n#include \"apr_pools.h\"\n#include \"apr_thread_mutex.h\"\n#include \"apr_file_io.h\"\n#include \"apr_general.h\"\n#include \"apr_lib.h\"\n#include \"apr_portable.h\"\n\nstruct apr_thread_mutex_t {\n    apr_pool_t *pool;\n    \n    /* Our lock :) */\n    sem_id Lock;\n    int32  LockCount;\n\n    /* If we nest locks we need these... */\n    int nested;  \n    apr_os_thread_t owner;\n    int owner_ref;\n};\n\n#endif  /* THREAD_MUTEX_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/beos/apr_arch_thread_rwlock.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_RWLOCK_H\n#define THREAD_RWLOCK_H\n\n#include <kernel/OS.h>\n#include \"apr_pools.h\"\n#include \"apr_thread_rwlock.h\"\n#include \"apr_file_io.h\"\n#include \"apr_general.h\"\n#include \"apr_lib.h\"\n#include \"apr_portable.h\"\n\nstruct apr_thread_rwlock_t {\n    apr_pool_t *pool;\n\n    /* Our lock :) */\n    sem_id Lock;\n    int32  LockCount;\n    /* Read/Write lock stuff */\n    sem_id Read;\n    int32  ReadCount;\n    sem_id Write;\n    int32  WriteCount;\n    int32  Nested;\n\n    thread_id writer;\n};\n\n#endif  /* THREAD_RWLOCK_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/beos/apr_arch_threadproc.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"apr_thread_proc.h\"\n#include \"apr_arch_file_io.h\"\n#include \"apr_file_io.h\"\n#include \"apr_thread_proc.h\"\n#include \"apr_general.h\"\n#include \"apr_portable.h\"\n#include <kernel/OS.h>\n#include <signal.h>\n#include <string.h>\n#include <sys/wait.h>\n#include <image.h>\n\n#ifndef THREAD_PROC_H\n#define THREAD_PROC_H\n\n#define SHELL_PATH \"/bin/sh\"\n\n#define PTHREAD_CANCEL_AYNCHRONOUS  CANCEL_ASYNCH; \n#define PTHREAD_CANCEL_DEFERRED     CANCEL_DEFER; \n                                   \n#define PTHREAD_CANCEL_ENABLE       CANCEL_ENABLE; \n#define PTHREAD_CANCEL_DISABLE      CANCEL_DISABLE; \n\n#define BEOS_MAX_DATAKEYS\t128\n\nstruct apr_thread_t {\n    apr_pool_t *pool;\n    thread_id td;\n    void *data;\n    apr_thread_start_t func;\n    apr_status_t exitval;\n};\n\nstruct apr_threadattr_t {\n    apr_pool_t *pool;\n    int32 attr;\n    int detached;\n    int joinable;\n};\n\nstruct apr_threadkey_t {\n    apr_pool_t *pool;\n\tint32  key;\n};\n\nstruct beos_private_data {\n\tconst void ** data;\n\tint count;\n\tvolatile thread_id  td;\n};\n\nstruct beos_key {\n\tint  assigned;\n\tint  count;\n\tsem_id  lock;\n\tint32  ben_lock;\n\tvoid (* destructor) (void *);\n};\n\nstruct apr_procattr_t {\n    apr_pool_t *pool;\n    apr_file_t *parent_in;\n    apr_file_t *child_in;\n    apr_file_t *parent_out;\n    apr_file_t *child_out;\n    apr_file_t *parent_err;\n    apr_file_t *child_err;\n    char *currdir;\n    apr_int32_t cmdtype;\n    apr_int32_t detached;\n};\n\nstruct apr_thread_once_t {\n    sem_id sem;\n    int hit;\n};\n\n#endif  /* ! THREAD_PROC_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/netware/apr_arch_dso.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef DSO_H\n#define DSO_H\n\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_pools.h\"\n#include \"apr_dso.h\"\n#include \"apr.h\"\n\n#include <dlfcn.h>\n\ntypedef struct sym_list sym_list;\n\nstruct sym_list {\n    sym_list *next;\n    char *symbol;\n};\n\nstruct apr_dso_handle_t {\n    apr_pool_t  *pool;\n    void        *handle;\n    const char  *errormsg;\n    sym_list    *symbols;\n    char        *path;\n};\n\n#endif\n"
  },
  {
    "path": "third_party/include/apr/arch/netware/apr_arch_file_io.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef FILE_IO_H\n#define FILE_IO_H\n\n#include \"apr.h\"\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_tables.h\"\n#include \"apr_file_io.h\"\n#include \"apr_file_info.h\"\n#include \"apr_errno.h\"\n#include \"apr_lib.h\"\n#include \"apr_poll.h\"\n\n/* System headers the file I/O library needs */\n#if APR_HAVE_FCNTL_H\n#include <fcntl.h>\n#endif\n#if APR_HAVE_SYS_TYPES_H\n#include <sys/types.h>\n#endif\n#if APR_HAVE_ERRNO_H\n#include <errno.h>\n#endif\n#if APR_HAVE_STRING_H\n#include <string.h>\n#endif\n#if APR_HAVE_STRINGS_H\n#include <strings.h>\n#endif\n#if APR_HAVE_DIRENT_H\n#include <dirent.h>\n#endif\n#ifdef HAVE_SYS_STAT_H\n#include <sys/stat.h>\n#endif\n#if APR_HAVE_UNISTD_H\n#include <unistd.h>\n#endif\n#if APR_HAVE_STDIO_H\n#include <stdio.h>\n#endif\n#if APR_HAVE_STDLIB_H\n#include <stdlib.h>\n#endif\n#if APR_HAVE_SYS_UIO_H\n#include <sys/uio.h>\n#endif\n#if APR_HAVE_SYS_TIME_H\n#include <sys/time.h>\n#endif\n\n#include <fsio.h>\n\n/* End System headers */\n\n#define APR_FILE_DEFAULT_BUFSIZE 4096\n/* For backwards compat */\n#define APR_FILE_BUFSIZE APR_FILE_DEFAULT_BUFSIZE\n\n#if APR_HAS_THREADS\n#define file_lock(f)   do { \\\n                           if ((f)->thlock) \\\n                               apr_thread_mutex_lock((f)->thlock); \\\n                       } while (0)\n#define file_unlock(f) do { \\\n                           if ((f)->thlock) \\\n                               apr_thread_mutex_unlock((f)->thlock); \\\n                       } while (0)\n#else\n#define file_lock(f)   do {} while (0)\n#define file_unlock(f) do {} while (0)\n#endif\n\n#if APR_HAS_LARGE_FILES\n#define lseek(f,o,w) lseek64(f,o,w)\n#define ftruncate(f,l) ftruncate64(f,l)\n#endif\n\ntypedef struct stat struct_stat;\n\nstruct apr_file_t {\n    apr_pool_t *pool;\n    int filedes;\n    char *fname;\n    apr_int32_t flags;\n    int eof_hit;\n    int is_pipe;\n    apr_interval_time_t timeout;\n    int buffered;\n    enum {BLK_UNKNOWN, BLK_OFF, BLK_ON } blocking;\n    int ungetchar;    /* Last char provided by an unget op. (-1 = no char)*/\n\n    /* if there is a timeout set, then this pollset is used */\n    apr_pollset_t *pollset;\n\n    /* Stuff for buffered mode */\n    char *buffer;\n    apr_size_t bufpos;    /* Read/Write position in buffer */\n    apr_size_t bufsize;   /* The buffer size */\n    apr_off_t dataRead;   /* amount of valid data read into buffer */\n    int direction;            /* buffer being used for 0 = read, 1 = write */\n    apr_off_t filePtr;    /* position in file of handle */\n#if APR_HAS_THREADS\n    struct apr_thread_mutex_t *thlock;\n#endif\n};\n\nstruct apr_dir_t {\n    apr_pool_t *pool;\n    char *dirname;\n    DIR *dirstruct;\n    struct dirent *entry;\n};\n\ntypedef struct apr_stat_entry_t apr_stat_entry_t;\n\nstruct apr_stat_entry_t {\n    struct stat info;\n    char *casedName;\n    apr_time_t expire;\n    NXPathCtx_t pathCtx;\n};\n\n#define MAX_SERVER_NAME     64\n#define MAX_VOLUME_NAME     64\n#define MAX_PATH_NAME       256\n#define MAX_FILE_NAME       256\n\n#define DRIVE_ONLY          1\n\n/* If the user passes d: vs. D: (or //mach/share vs. //MACH/SHARE),\n * we need to fold the case to canonical form.  This function is\n * supposed to do so.\n */\napr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p);\n\n/* This function check to see of the given path includes a drive/volume\n * specifier.  If the _only_ parameter is set to DRIVE_ONLY then it \n * check to see of the path only contains a drive/volume specifier and\n * nothing else.\n */\napr_status_t filepath_has_drive(const char *rootpath, int only, apr_pool_t *p);\n\n/* This function compares the drive/volume specifiers for each given path.\n * It returns zero if they match or non-zero if not. \n */\napr_status_t filepath_compare_drive(const char *path1, const char *path2, apr_pool_t *p);\n\napr_status_t apr_unix_file_cleanup(void *);\napr_status_t apr_unix_child_file_cleanup(void *);\n\nmode_t apr_unix_perms2mode(apr_fileperms_t perms);\napr_fileperms_t apr_unix_mode2perms(mode_t mode);\n\napr_status_t apr_file_flush_locked(apr_file_t *thefile);\napr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,\n                                      apr_file_t *thefile);\n\n#endif  /* ! FILE_IO_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/netware/apr_arch_global_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef GLOBAL_MUTEX_H\n#define GLOBAL_MUTEX_H\n\n#include \"apr_global_mutex.h\"\n#include \"apr_thread_mutex.h\"\n\nstruct apr_global_mutex_t {\n    apr_pool_t *pool;\n    apr_thread_mutex_t *mutex;\n};\n\n#endif  /* GLOBAL_MUTEX_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/netware/apr_arch_internal_time.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef TIME_INTERNAL_H\n#define TIME_INTERNAL_H\n\n#include \"apr.h\"\n\n#define TZONE           (*___timezone())\n\nvoid apr_netware_setup_time(void);\n\n#endif  /* TIME_INTERNAL_H */\n"
  },
  {
    "path": "third_party/include/apr/arch/netware/apr_arch_networkio.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef NETWORK_IO_H\n\n#ifdef USE_WINSOCK\n/* Making sure that we include the correct networkio.h since the\n    the project file is configured to first look for headers in\n    arch/netware and then arch/unix. But in this specific case we \n    want arch/win32.\n*/\n#include <../win32/apr_arch_networkio.h>\n#else\n#include <../unix/apr_arch_networkio.h>\n#endif\n\n#endif  /* ! NETWORK_IO_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/netware/apr_arch_pre_nw.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#ifndef __pre_nw__\n#define __pre_nw__\n\n#include <stdint.h>\n\n#ifndef __GNUC__\n#pragma precompile_target \"precomp.mch\"\n#endif\n\n#define NETWARE\n\n#define N_PLAT_NLM\n\n#define FAR\n#define far\n\n/* no-op for Codewarrior C compiler; a functions are cdecl \n   by default */\n#define cdecl\n\n/* if we have wchar_t enabled in C++, predefine this type to avoid\n   a conflict in Novell's header files */\n#ifndef __GNUC__\n#ifndef DOXYGEN\n#if (__option(cplusplus) && __option(wchar_type))\n#define _WCHAR_T\n#endif\n#endif\n#endif\n\n/* C9X defintion used by MSL C++ library */\n#define DECIMAL_DIG 17\n\n/* some code may want to use the MS convention for long long */\n#ifndef __int64\n#define __int64 long long\n#endif\n\n#endif\n\n\n\n"
  },
  {
    "path": "third_party/include/apr/arch/netware/apr_arch_proc_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef PROC_MUTEX_H\n#define PROC_MUTEX_H\n\n#include \"apr_proc_mutex.h\"\n#include \"apr_thread_mutex.h\"\n\nstruct apr_proc_mutex_t {\n    apr_pool_t *pool;\n    apr_thread_mutex_t *mutex;\n};\n\n#endif  /* PROC_MUTEX_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/netware/apr_arch_thread_cond.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_COND_H\n#define THREAD_COND_H\n\n#include \"apr_thread_cond.h\"\n#include <nks/synch.h>\n\nstruct apr_thread_cond_t {\n    apr_pool_t *pool;\n    NXCond_t *cond;\n};\n\n#endif  /* THREAD_COND_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/netware/apr_arch_thread_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_MUTEX_H\n#define THREAD_MUTEX_H\n\n#include \"apr_thread_mutex.h\"\n#include <nks/synch.h>\n\nstruct apr_thread_mutex_t {\n    apr_pool_t *pool;\n    NXMutex_t *mutex;\n};\n\n#endif  /* THREAD_MUTEX_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/netware/apr_arch_thread_rwlock.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_RWLOCK_H\n#define THREAD_RWLOCK_H\n\n#include \"apr_thread_rwlock.h\"\n#include <nks/synch.h>\n\nstruct apr_thread_rwlock_t {\n    apr_pool_t *pool;\n    NXRwLock_t *rwlock;\n};\n\n#endif  /* THREAD_RWLOCK_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/netware/apr_arch_threadproc.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"apr.h\"\n#include \"apr_thread_proc.h\"\n#include \"apr_file_io.h\"\n\n#include <sys/wait.h>\n\n#ifndef THREAD_PROC_H\n#define THREAD_PROC_H\n\n#define SHELL_PATH \"\"\n#define APR_DEFAULT_STACK_SIZE 65536\n\nstruct apr_thread_t {\n    apr_pool_t *pool;\n    NXContext_t ctx;\n    NXThreadId_t td;\n    char *thread_name;\n    apr_int32_t cancel;\n    apr_int32_t cancel_how;\n    void *data;\n    apr_thread_start_t func;\n    apr_status_t exitval;\n};\n\nstruct apr_threadattr_t {\n    apr_pool_t *pool;\n    apr_size_t  stack_size;\n    apr_int32_t detach;\n    char *thread_name;\n};\n\nstruct apr_threadkey_t {\n    apr_pool_t *pool;\n    NXKey_t key;\n};\n\nstruct apr_procattr_t {\n    apr_pool_t *pool;\n    apr_file_t *parent_in;\n    apr_file_t *child_in;\n    apr_file_t *parent_out;\n    apr_file_t *child_out;\n    apr_file_t *parent_err;\n    apr_file_t *child_err;\n    char *currdir;\n    apr_int32_t cmdtype;\n    apr_int32_t detached;\n    apr_int32_t addrspace;\n};\n\nstruct apr_thread_once_t {\n    unsigned long value;\n};\n\n/*\nstruct apr_proc_t {\n    apr_pool_t *pool;\n    pid_t pid;\n    apr_procattr_t *attr;\n};\n*/\n\n#endif  /* ! THREAD_PROC_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/netware/apr_private.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Note: \n * This is the netware-specific autoconf-like config file\n * which unix creates at ./configure time.\n */\n\n#ifdef NETWARE\n\n#ifndef APR_PRIVATE_H\n#define APR_PRIVATE_H\n\n/* Pick up publicly advertised headers and symbols before the\n * APR internal private headers and symbols\n */\n#include <apr.h>\n\n/* Pick up privately consumed headers */\n#include <ndkvers.h>\n\n/* Include alloca.h to get compiler-dependent defines */ \n#include <alloca.h>\n\n#include <sys/types.h>\n#include <stddef.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <time.h>\n#include <library.h>\n#include <netware.h>\n\n/* Use this section to define all of the HAVE_FOO_H\n * that are required to build properly.\n */\n#define HAVE_DLFCN_H    1\n#define HAVE_LIMITS_H   1\n#define HAVE_SIGNAL_H   1\n#define HAVE_STDDEF_H   1\n#define HAVE_STDLIB_H   1\n#ifndef USE_WINSOCK\n#define HAVE_SYS_SELECT_H 1\n#define HAVE_WRITEV       1\n#endif\n#define HAVE_SYS_STAT_H 1\n#define HAVE_SYS_MMAN_H 1\n#define HAVE_FCNTL_H    1\n#define HAVE_ICONV_H    1\n#define HAVE_UTIME_H    1\n\n#define HAVE_STRICMP    1\n#define HAVE_STRNICMP   1\n#define HAVE_STRDUP     1\n#define HAVE_STRSTR     1\n#define HAVE_MEMCHR     1\n#define HAVE_CALLOC     1\n#define HAVE_UTIME      1\n\n#define HAVE_GETENV     1\n#define HAVE_SETENV     1\n#define HAVE_UNSETENV   1\n\n#define HAVE_WRITEV     1\n\n#define HAVE_GETPASS_R  1\n/*\n * Hack around older NDKs which have only the getpassword() function,\n * a threadsafe, API-equivalent of getpass_r().\n */\n#if (CURRENT_NDK_THRESHOLD < 709060000)\n#define getpass_r       getpassword\n#endif\n\n/*#define DSO_USE_DLFCN */\n\n#ifdef NW_BUILD_IPV6\n#define HAVE_GETADDRINFO 1\n#define HAVE_GETNAMEINFO 1\n#endif\n\n/* 1 is used for SIGABRT on netware */\n/* 2 is used for SIGFPE on netware */\n/* 3 is used for SIGILL on netware */\n/* 4 is used for SIGINT on netware */\n/* 5 is used for SIGSEGV on netware */\n/* 6 is used for SIGTERM on netware */\n/* 7 is used for SIGPOLL on netware */\n\n#if (CURRENT_NDK_THRESHOLD < 306030000)\n#define SIGKILL         11\n#define SIGALRM         13\n#define SIGCHLD         14 \n#define SIGCONT         15\n#define SIGHUP          16\n#define SIGPIPE         17\n#define SIGQUIT         18\n#define SIGSTOP         19\n#define SIGTSTP         20\n#define SIGTTIN         21\n#define SIGTTOU         22\n#define SIGUSR1         23\n#define SIGUSR2         24\n#endif\n\n#define SIGTRAP         25\n#define SIGIOT          26\n#define SIGSTKFLT       28\n#define SIGURG          29\n#define SIGXCPU         30\n#define SIGXFSZ         31\n#define SIGVTALRM       32\n#define SIGPROF         33\n#define SIGWINCH        34\n#define SIGIO           35\n\n#if (CURRENT_NDK_THRESHOLD < 406230000)\n#undef  SA_NOCLDSTOP\n#define SA_NOCLDSTOP    0x00000001\n#endif\n#ifndef SIGBUS\n#define SIGBUS          SIGSEGV\n#endif\n\n#define _getch          getcharacter\n\n#define SIZEOF_SHORT    2\n#define SIZEOF_INT      4\n#define SIZEOF_LONGLONG 8\n#define SIZEOF_CHAR     1\n#define SIZEOF_SSIZE_T  SIZEOF_INT\n\nvoid netware_pool_proc_cleanup();\n\n/* NLM registration routines for managing which NLMs\n    are using the library. */\nint register_NLM(void *NLMHandle);\nint unregister_NLM(void *NLMHandle);\n\n/* Application global data management */\nextern int  gLibId;\nextern void *gLibHandle;\n\ntypedef struct app_data {\n    int     initialized;\n    void*   gPool;\n    void*   gs_aHooksToSort;\n    void*   gs_phOptionalHooks;\n    void*   gs_phOptionalFunctions;\n    void*   gs_nlmhandle;\n    rtag_t  gs_startup_rtag;\n    rtag_t  gs_socket_rtag;\n    rtag_t  gs_lookup_rtag;\n    rtag_t  gs_event_rtag;\n    rtag_t  gs_pcp_rtag;\n    void*   gs_ldap_xref_lock;\n    void*   gs_xref_head;\n} APP_DATA;\n\nint setGlobalPool(void *data);\nvoid* getGlobalPool();\nint setStatCache(void *data);\nvoid* getStatCache();\n\n/* Redefine malloc to use the library malloc call so \n    that all of the memory resources will be owned\n    and can be shared by the library. */\n#undef malloc\n#define malloc(x) library_malloc(gLibHandle,x)\n#ifndef __MWERKS__\n#define _alloca         alloca\n#endif\n\n/* 64-bit integer conversion function */\n#define APR_INT64_STRFN strtoll\n\n#if APR_HAS_LARGE_FILES\n#define APR_OFF_T_STRFN strtoll\n#else\n#define APR_OFF_T_STRFN strtol\n#endif\n\n/* used to check DWORD overflow for 64bit compiles */\n#define APR_DWORD_MAX   0xFFFFFFFFUL\n\n/*\n * Include common private declarations.\n */\n#include \"../apr_private_common.h\"\n\n#endif  /*APR_PRIVATE_H*/\n#endif  /*NETWARE*/\n"
  },
  {
    "path": "third_party/include/apr/arch/os2/apr_arch_dso.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef DSO_H\n#define DSO_H\n\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_pools.h\"\n#include \"apr_dso.h\"\n#include \"apr.h\"\n\n#if APR_HAS_DSO\n\nstruct apr_dso_handle_t {\n    apr_pool_t  *cont;       /* Context for returning error strings */\n    HMODULE       handle;     /* Handle to the DSO loaded            */\n    apr_status_t   load_error;\n    char          *failed_module;\n};\n\n#endif\n\n#endif\n"
  },
  {
    "path": "third_party/include/apr/arch/os2/apr_arch_file_io.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef FILE_IO_H\n#define FILE_IO_H\n\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_thread_mutex.h\"\n#include \"apr_file_io.h\"\n#include \"apr_file_info.h\"\n#include \"apr_errno.h\"\n#include \"apr_poll.h\"\n\n/* We have an implementation of mkstemp but it's not very multi-threading \n * friendly & is part of the POSIX emulation rather than native so don't\n * use it.\n */\n#undef HAVE_MKSTEMP\n\n#define APR_FILE_DEFAULT_BUFSIZE 4096\n#define APR_FILE_BUFSIZE APR_FILE_DEFAULT_BUFSIZE\n\nstruct apr_file_t {\n    apr_pool_t *pool;\n    HFILE filedes;\n    char * fname;\n    int isopen;\n    int buffered;\n    int eof_hit;\n    apr_int32_t flags;\n    int timeout;\n    int pipe;\n    HEV pipeSem;\n    enum { BLK_UNKNOWN, BLK_OFF, BLK_ON } blocking;\n\n    /* Stuff for buffered mode */\n    char *buffer;\n    apr_size_t bufsize;        /* Read/Write position in buffer             */\n    apr_size_t bufpos;         /* Read/Write position in buffer             */\n    unsigned long dataRead;    /* amount of valid data read into buffer     */\n    int direction;             /* buffer being used for 0 = read, 1 = write */\n    unsigned long filePtr;     /* position in file of handle                */\n    apr_thread_mutex_t *mutex; /* mutex semaphore, must be owned to access\n                                  the above fields                          */\n};\n\nstruct apr_dir_t {\n    apr_pool_t *pool;\n    char *dirname;\n    ULONG handle;\n    FILEFINDBUF3 entry;\n    int validentry;\n};\n\napr_status_t apr_file_cleanup(void *);\napr_status_t apr_os2_time_to_apr_time(apr_time_t *result, FDATE os2date, \n                                      FTIME os2time);\napr_status_t apr_apr_time_to_os2_time(FDATE *os2date, FTIME *os2time,\n                                      apr_time_t aprtime);\n\n/* see win32/fileio.h for description of these */\nextern const char c_is_fnchar[256];\n\n#define IS_FNCHAR(c) c_is_fnchar[(unsigned char)c]\n\napr_status_t filepath_root_test(char *path, apr_pool_t *p);\napr_status_t filepath_drive_get(char **rootpath, char drive, \n                                apr_int32_t flags, apr_pool_t *p);\napr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p);\n\n#endif  /* ! FILE_IO_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/os2/apr_arch_inherit.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef INHERIT_H\n#define INHERIT_H\n\n#include \"apr_inherit.h\"\n\n#define APR_INHERIT (1 << 24)    /* Must not conflict with other bits */\n\n#define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup)        \\\nAPR_DECLARE(apr_status_t) apr_##name##_inherit_set(apr_##name##_t *the##name) \\\n{                                                                   \\\n    int rv;                                                         \\\n    ULONG state;                                                    \\\n    if (((rv = DosQueryFHState(attr->parent_err->filedes, &state))  \\\n            != 0) ||                                                \\\n        ((rv = DosSetFHState(attr->parent_err->filedes,             \\\n                            state & ~OPEN_FLAGS_NOINHERIT)) != 0))  \\\n        return APR_FROM_OS_ERROR(rv);                               \\\n    return APR_SUCCESS;                                             \\\n}\n\n#define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup)      \\\nAPR_DECLARE(apr_status_t) apr_##name##_inherit_unset(apr_##name##_t *the##name)\\\n{                                                                   \\\n    int rv;                                                         \\\n    ULONG state;                                                    \\\n    if (((rv = DosQueryFHState(attr->parent_err->filedes, &state))  \\\n            != 0) ||                                                \\\n        ((rv = DosSetFHState(attr->parent_err->filedes,             \\\n                            state | OPEN_FLAGS_NOINHERIT)) != 0))   \\\n        return APR_FROM_OS_ERROR(rv);                               \\\n    return APR_SUCCESS;                                             \\\n}\n\n#endif\t/* ! INHERIT_H */\n"
  },
  {
    "path": "third_party/include/apr/arch/os2/apr_arch_networkio.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef NETWORK_IO_H\n#define NETWORK_IO_H\n\n#include \"apr_private.h\"\n#include \"apr_network_io.h\"\n#include \"apr_general.h\"\n#include \"apr_arch_os2calls.h\"\n#include \"apr_poll.h\"\n\n#if APR_HAVE_NETDB_H\n#include <netdb.h>\n#endif\n\ntypedef struct sock_userdata_t sock_userdata_t;\nstruct sock_userdata_t {\n    sock_userdata_t *next;\n    const char *key;\n    void *data;\n};\n\nstruct apr_socket_t {\n    apr_pool_t *pool;\n    int socketdes;\n    int type;\n    int protocol;\n    apr_sockaddr_t *local_addr;\n    apr_sockaddr_t *remote_addr;\n    apr_interval_time_t timeout;\n    int nonblock;\n    int local_port_unknown;\n    int local_interface_unknown;\n    int remote_addr_unknown;\n    apr_int32_t options;\n    apr_int32_t inherit;\n    sock_userdata_t *userdata;\n\n    /* if there is a timeout set, then this pollset is used */\n    apr_pollset_t *pollset;\n};\n\n/* Error codes returned from sock_errno() */\n#define SOCBASEERR              10000\n#define SOCEPERM                (SOCBASEERR+1)             /* Not owner */\n#define SOCESRCH                (SOCBASEERR+3)             /* No such process */\n#define SOCEINTR                (SOCBASEERR+4)             /* Interrupted system call */\n#define SOCENXIO                (SOCBASEERR+6)             /* No such device or address */\n#define SOCEBADF                (SOCBASEERR+9)             /* Bad file number */\n#define SOCEACCES               (SOCBASEERR+13)            /* Permission denied */\n#define SOCEFAULT               (SOCBASEERR+14)            /* Bad address */\n#define SOCEINVAL               (SOCBASEERR+22)            /* Invalid argument */\n#define SOCEMFILE               (SOCBASEERR+24)            /* Too many open files */\n#define SOCEPIPE                (SOCBASEERR+32)            /* Broken pipe */\n#define SOCEOS2ERR              (SOCBASEERR+100)            /* OS/2 Error */\n\nconst char *apr_inet_ntop(int af, const void *src, char *dst, apr_size_t size);\nint apr_inet_pton(int af, const char *src, void *dst);\nvoid apr_sockaddr_vars_set(apr_sockaddr_t *, int, apr_port_t);\n\n#endif  /* ! NETWORK_IO_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/os2/apr_arch_os2calls.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"apr_errno.h\"\n#include <sys/types.h>\n#include <sys/socket.h>\n\nextern int (*apr_os2_socket)(int, int, int);\nextern int (*apr_os2_select)(int *, int, int, int, long);\nextern int (*apr_os2_sock_errno)();\nextern int (*apr_os2_accept)(int, struct sockaddr *, int *);\nextern int (*apr_os2_bind)(int, struct sockaddr *, int);\nextern int (*apr_os2_connect)(int, struct sockaddr *, int);\nextern int (*apr_os2_getpeername)(int, struct sockaddr *, int *);\nextern int (*apr_os2_getsockname)(int, struct sockaddr *, int *);\nextern int (*apr_os2_getsockopt)(int, int, int, char *, int *);\nextern int (*apr_os2_ioctl)(int, int, caddr_t, int);\nextern int (*apr_os2_listen)(int, int);\nextern int (*apr_os2_recv)(int, char *, int, int);\nextern int (*apr_os2_send)(int, const char *, int, int);\nextern int (*apr_os2_setsockopt)(int, int, int, char *, int);\nextern int (*apr_os2_shutdown)(int, int);\nextern int (*apr_os2_soclose)(int);\nextern int (*apr_os2_writev)(int, struct iovec *, int);\nextern int (*apr_os2_sendto)(int, const char *, int, int, const struct sockaddr *, int);\nextern int (*apr_os2_recvfrom)(int, char *, int, int, struct sockaddr *, int *);\n\n#define socket apr_os2_socket\n#define select apr_os2_select\n#define sock_errno apr_os2_sock_errno\n#define accept apr_os2_accept\n#define bind apr_os2_bind\n#define connect apr_os2_connect\n#define getpeername apr_os2_getpeername\n#define getsockname apr_os2_getsockname\n#define getsockopt apr_os2_getsockopt\n#define ioctl apr_os2_ioctl\n#define listen apr_os2_listen\n#define recv apr_os2_recv\n#define send apr_os2_send\n#define setsockopt apr_os2_setsockopt\n#define shutdown apr_os2_shutdown\n#define soclose apr_os2_soclose\n#define writev apr_os2_writev\n#define sendto apr_os2_sendto\n#define recvfrom apr_os2_recvfrom\n"
  },
  {
    "path": "third_party/include/apr/arch/os2/apr_arch_proc_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef PROC_MUTEX_H\n#define PROC_MUTEX_H\n\n#include \"apr_proc_mutex.h\"\n#include \"apr_file_io.h\"\n\nstruct apr_proc_mutex_t {\n    apr_pool_t *pool;\n    HMTX hMutex;\n    TID owner;\n    int lock_count;\n};\n\n#endif  /* PROC_MUTEX_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/os2/apr_arch_thread_cond.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_COND_H\n#define THREAD_COND_H\n\n#include \"apr_thread_cond.h\"\n#include \"apr_file_io.h\"\n\nstruct apr_thread_cond_t {\n    apr_pool_t *pool;\n};\n\n#endif  /* THREAD_COND_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/os2/apr_arch_thread_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_MUTEX_H\n#define THREAD_MUTEX_H\n\n#include \"apr_thread_mutex.h\"\n#include \"apr_file_io.h\"\n\nstruct apr_thread_mutex_t {\n    apr_pool_t *pool;\n    HMTX hMutex;\n};\n\n#endif  /* THREAD_MUTEX_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/os2/apr_arch_thread_rwlock.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_RWLOCK_H\n#define THREAD_RWLOCK_H\n\n#include \"apr_thread_rwlock.h\"\n#include \"apr_file_io.h\"\n\nstruct apr_thread_rwlock_t {\n    apr_pool_t *pool;\n    int readers;\n    HMTX write_lock;\n    HEV read_done;\n};\n\n#endif  /* THREAD_RWLOCK_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/os2/apr_arch_threadproc.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"apr_thread_proc.h\"\n#include \"apr_file_io.h\"\n\n#ifndef THREAD_PROC_H\n#define THREAD_PROC_H\n\n#define APR_THREADATTR_DETACHED 1\n\n#define SHELL_PATH \"cmd.exe\"\n#define APR_THREAD_STACKSIZE 65536\n\nstruct apr_threadattr_t {\n    apr_pool_t *pool;\n    unsigned long attr;\n    apr_size_t stacksize;\n};\n\nstruct apr_thread_t {\n    apr_pool_t *pool;\n    struct apr_threadattr_t *attr;\n    unsigned long tid;\n    apr_thread_start_t func;\n    void *data;\n    apr_status_t exitval;\n};\n\nstruct apr_threadkey_t {\n    apr_pool_t *pool;\n    unsigned long *key;\n};\n\nstruct apr_procattr_t {\n    apr_pool_t *pool;\n    apr_file_t *parent_in;\n    apr_file_t *child_in;\n    apr_file_t *parent_out;\n    apr_file_t *child_out;\n    apr_file_t *parent_err;\n    apr_file_t *child_err;\n    char *currdir;\n    apr_int32_t cmdtype;\n    apr_int32_t detached;\n};\n\nstruct apr_thread_once_t {\n    unsigned long sem;\n    char hit;\n};\n\n#endif  /* ! THREAD_PROC_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/os390/apr_arch_dso.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef DSO_H\n#define DSO_H\n\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_pools.h\"\n#include \"apr_dso.h\"\n#include \"apr.h\"\n\n#if APR_HAS_DSO\n\n#include <dll.h>\n\nstruct apr_dso_handle_t {\n    dllhandle  *handle;     /* Handle to the DSO loaded            */\n    int failing_errno;      /* Don't save the buffer returned by\n                               strerror(); it gets reused          */\n    apr_pool_t *pool;\n};\n\n#endif\n\n#endif\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_atomic.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ATOMIC_H\n#define ATOMIC_H\n\n#include \"apr.h\"\n#include \"apr_private.h\"\n#include \"apr_atomic.h\"\n#include \"apr_thread_mutex.h\"\n\n#if defined(USE_ATOMICS_GENERIC)\n/* noop */\n#elif defined(__GNUC__) && defined(__STRICT_ANSI__)\n/* force use of generic atomics if building e.g. with -std=c89, which\n * doesn't allow inline asm */\n#   define USE_ATOMICS_GENERIC\n#elif HAVE_ATOMIC_BUILTINS\n#   define USE_ATOMICS_BUILTINS\n#elif defined(SOLARIS2) && SOLARIS2 >= 10\n#   define USE_ATOMICS_SOLARIS\n#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))\n#   define USE_ATOMICS_IA32\n#elif defined(__GNUC__) && (defined(__PPC__) || defined(__ppc__))\n#   define USE_ATOMICS_PPC\n#elif defined(__GNUC__) && (defined(__s390__) || defined(__s390x__))\n#   define USE_ATOMICS_S390\n#else\n#   define USE_ATOMICS_GENERIC\n#endif\n\n#endif /* ATOMIC_H */\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_dso.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef DSO_H\n#define DSO_H\n\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_pools.h\"\n#include \"apr_dso.h\"\n#include \"apr.h\"\n\n#if APR_HAS_DSO\n\n#ifdef HAVE_MACH_O_DYLD_H\n#include <mach-o/dyld.h>\n#endif\n\n#ifdef HAVE_DLFCN_H\n#include <dlfcn.h>\n#endif\n\n#ifdef HAVE_DL_H\n#include <dl.h>\n#endif\n\n#ifndef RTLD_NOW\n#define RTLD_NOW 1\n#endif\n\n#ifndef RTLD_GLOBAL\n#define RTLD_GLOBAL 0\n#endif\n\n#if (defined(__DragonFly__) ||\\\n     defined(__FreeBSD__) ||\\\n     defined(__OpenBSD__) ||\\\n     defined(__NetBSD__)     ) && !defined(__ELF__)\n#define DLSYM_NEEDS_UNDERSCORE\n#endif\n\nstruct apr_dso_handle_t {\n    apr_pool_t    *pool;\n    void          *handle;\n    const char    *errormsg;\n};\n\n#endif\n\n#endif\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_file_io.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef FILE_IO_H\n#define FILE_IO_H\n\n#include \"apr.h\"\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_tables.h\"\n#include \"apr_file_io.h\"\n#include \"apr_file_info.h\"\n#include \"apr_errno.h\"\n#include \"apr_lib.h\"\n#include \"apr_thread_mutex.h\"\n#ifndef WAITIO_USES_POLL\n#include \"apr_poll.h\"\n#endif\n\n/* System headers the file I/O library needs */\n#if APR_HAVE_FCNTL_H\n#include <fcntl.h>\n#endif\n#if APR_HAVE_SYS_TYPES_H\n#include <sys/types.h>\n#endif\n#if APR_HAVE_ERRNO_H\n#include <errno.h>\n#endif\n#if APR_HAVE_STRING_H\n#include <string.h>\n#endif\n#if APR_HAVE_STRINGS_H\n#include <strings.h>\n#endif\n#if APR_HAVE_DIRENT_H\n#include <dirent.h>\n#endif\n#ifdef HAVE_SYS_STAT_H\n#include <sys/stat.h>\n#endif\n#if APR_HAVE_UNISTD_H\n#include <unistd.h>\n#endif\n#if APR_HAVE_STDIO_H\n#include <stdio.h>\n#endif\n#if APR_HAVE_STDLIB_H\n#include <stdlib.h>\n#endif\n#if APR_HAVE_SYS_UIO_H\n#include <sys/uio.h>\n#endif\n#if APR_HAVE_SYS_TIME_H\n#include <sys/time.h>\n#endif\n#ifdef BEOS\n#include <kernel/OS.h>\n#endif\n/* Hunting down DEV_BSIZE if not from dirent.h, sys/stat.h etc */\n#ifdef HAVE_SYS_PARAM_H\n#include <sys/param.h>\n#endif\n\n#if BEOS_BONE\n# ifndef BONE7\n  /* prior to BONE/7 fd_set & select were defined in sys/socket.h */\n#  include <sys/socket.h>\n# else\n  /* Be moved the fd_set stuff and also the FIONBIO definition... */\n#  include <sys/ioctl.h>\n# endif\n#endif\n/* End System headers */\n\n#define APR_FILE_DEFAULT_BUFSIZE 4096\n/* For backwards-compat */\n#define APR_FILE_BUFSIZE  APR_FILE_DEFAULT_BUFSIZE\n\nstruct apr_file_t {\n    apr_pool_t *pool;\n    int filedes;\n    char *fname;\n    apr_int32_t flags;\n    int eof_hit;\n    int is_pipe;\n    apr_interval_time_t timeout;\n    int buffered;\n    enum {BLK_UNKNOWN, BLK_OFF, BLK_ON } blocking;\n    int ungetchar;    /* Last char provided by an unget op. (-1 = no char)*/\n#ifndef WAITIO_USES_POLL\n    /* if there is a timeout set, then this pollset is used */\n    apr_pollset_t *pollset;\n#endif\n    /* Stuff for buffered mode */\n    char *buffer;\n    apr_size_t bufpos;        /* Read/Write position in buffer */\n    apr_size_t bufsize;       /* The size of the buffer */\n    unsigned long dataRead;   /* amount of valid data read into buffer */\n    int direction;            /* buffer being used for 0 = read, 1 = write */\n    apr_off_t filePtr;        /* position in file of handle */\n#if APR_HAS_THREADS\n    struct apr_thread_mutex_t *thlock;\n#endif\n};\n\n#if APR_HAS_THREADS\n#define file_lock(f)   do { \\\n                           if ((f)->thlock) \\\n                               apr_thread_mutex_lock((f)->thlock); \\\n                       } while (0)\n#define file_unlock(f) do { \\\n                           if ((f)->thlock) \\\n                               apr_thread_mutex_unlock((f)->thlock); \\\n                       } while (0)\n#else\n#define file_lock(f)   do {} while (0)\n#define file_unlock(f) do {} while (0)\n#endif\n\n#if APR_HAS_LARGE_FILES && defined(_LARGEFILE64_SOURCE)\n#define stat(f,b) stat64(f,b)\n#define lstat(f,b) lstat64(f,b)\n#define fstat(f,b) fstat64(f,b)\n#define lseek(f,o,w) lseek64(f,o,w)\n#define ftruncate(f,l) ftruncate64(f,l)\ntypedef struct stat64 struct_stat;\n#else\ntypedef struct stat struct_stat;\n#endif\n\n/* readdir64_r is only used in specific cases: */\n#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) \\\n    && !defined(READDIR_IS_THREAD_SAFE) && defined(HAVE_READDIR64_R)\n#define APR_USE_READDIR64_R\n#endif\n\nstruct apr_dir_t {\n    apr_pool_t *pool;\n    char *dirname;\n    DIR *dirstruct;\n#ifdef APR_USE_READDIR64_R\n    struct dirent64 *entry;\n#else\n    struct dirent *entry;\n#endif\n};\n\napr_status_t apr_unix_file_cleanup(void *);\napr_status_t apr_unix_child_file_cleanup(void *);\n\nmode_t apr_unix_perms2mode(apr_fileperms_t perms);\napr_fileperms_t apr_unix_mode2perms(mode_t mode);\n\napr_status_t apr_file_flush_locked(apr_file_t *thefile);\napr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,\n                                      apr_file_t *thefile);\n\n\n#endif  /* ! FILE_IO_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_global_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef GLOBAL_MUTEX_H\n#define GLOBAL_MUTEX_H\n\n#include \"apr.h\"\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_lib.h\"\n#include \"apr_global_mutex.h\"\n#include \"apr_arch_proc_mutex.h\"\n#include \"apr_arch_thread_mutex.h\"\n\nstruct apr_global_mutex_t {\n    apr_pool_t *pool;\n    apr_proc_mutex_t *proc_mutex;\n#if APR_HAS_THREADS\n    apr_thread_mutex_t *thread_mutex;\n#endif /* APR_HAS_THREADS */\n};\n\n#endif  /* GLOBAL_MUTEX_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_inherit.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef INHERIT_H\n#define INHERIT_H\n\n#include \"apr_inherit.h\"\n\n#define APR_INHERIT (1 << 24)    /* Must not conflict with other bits */\n\n#define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup)        \\\napr_status_t apr_##name##_inherit_set(apr_##name##_t *the##name)    \\\n{                                                                   \\\n    if (the##name->flag & APR_FOPEN_NOCLEANUP)                      \\\n        return APR_EINVAL;                                          \\\n    if (!(the##name->flag & APR_INHERIT)) {                         \\\n        int flags = fcntl(the##name->name##des, F_GETFD);           \\\n        if (flags == -1)                                            \\\n            return errno;                                           \\\n        flags &= ~(FD_CLOEXEC);                                     \\\n        if (fcntl(the##name->name##des, F_SETFD, flags) == -1)      \\\n            return errno;                                           \\\n        the##name->flag |= APR_INHERIT;                             \\\n        apr_pool_child_cleanup_set(the##name->pool,                 \\\n                                   (void *)the##name,               \\\n                                   cleanup, apr_pool_cleanup_null); \\\n    }                                                               \\\n    return APR_SUCCESS;                                             \\\n}\n\n#define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup)      \\\napr_status_t apr_##name##_inherit_unset(apr_##name##_t *the##name)  \\\n{                                                                   \\\n    if (the##name->flag & APR_FOPEN_NOCLEANUP)                      \\\n        return APR_EINVAL;                                          \\\n    if (the##name->flag & APR_INHERIT) {                            \\\n        int flags;                                                  \\\n        if ((flags = fcntl(the##name->name##des, F_GETFD)) == -1)   \\\n            return errno;                                           \\\n        flags |= FD_CLOEXEC;                                        \\\n        if (fcntl(the##name->name##des, F_SETFD, flags) == -1)      \\\n            return errno;                                           \\\n        the##name->flag &= ~APR_INHERIT;                            \\\n        apr_pool_child_cleanup_set(the##name->pool,                 \\\n                                   (void *)the##name,               \\\n                                   cleanup, cleanup);               \\\n    }                                                               \\\n    return APR_SUCCESS;                                             \\\n}\n\n#endif\t/* ! INHERIT_H */\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_internal_time.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef TIME_INTERNAL_H\n#define TIME_INTERNAL_H\n\n#include \"apr.h\"\n\nvoid apr_unix_setup_time(void);\n\n#endif  /* TIME_INTERNAL_H */\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_misc.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef MISC_H\n#define MISC_H\n\n#include \"apr.h\"\n#include \"apr_portable.h\"\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_pools.h\"\n#include \"apr_getopt.h\"\n#include \"apr_thread_proc.h\"\n#include \"apr_file_io.h\"\n#include \"apr_errno.h\"\n#include \"apr_getopt.h\"\n\n#if APR_HAVE_STDIO_H\n#include <stdio.h>\n#endif\n#if APR_HAVE_SIGNAL_H\n#include <signal.h>\n#endif\n#if APR_HAVE_PTHREAD_H\n#include <pthread.h>\n#endif\n\n#if APR_HAVE_STDLIB_H\n#include <stdlib.h>\n#endif\n#if APR_HAVE_STRING_H\n#include <string.h>\n#endif\n\n#ifdef BEOS\n#include <kernel/OS.h>\n#endif\n\nstruct apr_other_child_rec_t {\n    apr_pool_t *p;\n    struct apr_other_child_rec_t *next;\n    apr_proc_t *proc;\n    void (*maintenance) (int, void *, int);\n    void *data;\n    apr_os_file_t write_fd;\n};\n\n#if defined(WIN32) || defined(NETWARE)\n#define WSAHighByte 2\n#define WSALowByte 0\n#endif\n\n#endif  /* ! MISC_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_networkio.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef NETWORK_IO_H\n#define NETWORK_IO_H\n\n#include \"apr.h\"\n#include \"apr_private.h\"\n#include \"apr_network_io.h\"\n#include \"apr_errno.h\"\n#include \"apr_general.h\"\n#include \"apr_lib.h\"\n#ifndef WAITIO_USES_POLL\n#include \"apr_poll.h\"\n#endif\n\n/* System headers the network I/O library needs */\n#if APR_HAVE_SYS_TYPES_H\n#include <sys/types.h>\n#endif\n#if APR_HAVE_SYS_UIO_H\n#include <sys/uio.h>\n#endif\n#ifdef HAVE_SYS_SELECT_H\n#include <sys/select.h>\n#endif\n#if APR_HAVE_ERRNO_H\n#include <errno.h>\n#endif\n#if APR_HAVE_SYS_TIME_H\n#include <sys/time.h>\n#endif\n#if APR_HAVE_UNISTD_H\n#include <unistd.h>\n#endif\n#if APR_HAVE_STRING_H\n#include <string.h>\n#endif\n#if APR_HAVE_NETINET_TCP_H\n#include <netinet/tcp.h>\n#endif\n#if APR_HAVE_NETINET_SCTP_UIO_H\n#include <netinet/sctp_uio.h>\n#endif\n#if APR_HAVE_NETINET_SCTP_H\n#include <netinet/sctp.h>\n#endif\n#if APR_HAVE_NETINET_IN_H\n#include <netinet/in.h>\n#endif\n#if APR_HAVE_ARPA_INET_H\n#include <arpa/inet.h>\n#endif\n#if APR_HAVE_SYS_SOCKET_H\n#include <sys/socket.h>\n#endif\n#if APR_HAVE_SYS_SOCKIO_H\n#include <sys/sockio.h>\n#endif\n#if APR_HAVE_NETDB_H\n#include <netdb.h>\n#endif\n#if APR_HAVE_FCNTL_H\n#include <fcntl.h>\n#endif\n#if APR_HAVE_SYS_SENDFILE_H\n#include <sys/sendfile.h>\n#endif\n#if APR_HAVE_SYS_IOCTL_H\n#include <sys/ioctl.h>\n#endif\n/* End System Headers */\n\n#ifndef HAVE_POLLIN\n#define POLLIN   1\n#define POLLPRI  2\n#define POLLOUT  4\n#define POLLERR  8\n#define POLLHUP  16\n#define POLLNVAL 32\n#endif\n\ntypedef struct sock_userdata_t sock_userdata_t;\nstruct sock_userdata_t {\n    sock_userdata_t *next;\n    const char *key;\n    void *data;\n};\n\nstruct apr_socket_t {\n    apr_pool_t *pool;\n    int socketdes;\n    int type;\n    int protocol;\n    apr_sockaddr_t *local_addr;\n    apr_sockaddr_t *remote_addr;\n    apr_interval_time_t timeout; \n#ifndef HAVE_POLL\n    int connected;\n#endif\n    int local_port_unknown;\n    int local_interface_unknown;\n    int remote_addr_unknown;\n    apr_int32_t options;\n    apr_int32_t inherit;\n    sock_userdata_t *userdata;\n#ifndef WAITIO_USES_POLL\n    /* if there is a timeout set, then this pollset is used */\n    apr_pollset_t *pollset;\n#endif\n};\n\nconst char *apr_inet_ntop(int af, const void *src, char *dst, apr_size_t size);\nint apr_inet_pton(int af, const char *src, void *dst);\nvoid apr_sockaddr_vars_set(apr_sockaddr_t *, int, apr_port_t);\n\n#define apr_is_option_set(skt, option)  \\\n    (((skt)->options & (option)) == (option))\n\n#define apr_set_option(skt, option, on) \\\n    do {                                 \\\n        if (on)                          \\\n            (skt)->options |= (option);         \\\n        else                             \\\n            (skt)->options &= ~(option);        \\\n    } while (0)\n\n#endif  /* ! NETWORK_IO_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_poll_private.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_ARCH_POLL_PRIVATE_H\n#define APR_ARCH_POLL_PRIVATE_H\n\n#if HAVE_POLL_H\n#include <poll.h>\n#endif\n\n#if HAVE_SYS_POLL_H\n#include <sys/poll.h>\n#endif\n\n#ifdef HAVE_PORT_CREATE\n#include <port.h>\n#include <sys/port_impl.h>\n#endif\n\n#ifdef HAVE_KQUEUE\n#include <sys/types.h>\n#include <sys/event.h>\n#include <sys/time.h>\n#endif\n\n#ifdef HAVE_EPOLL\n#include <sys/epoll.h>\n#endif\n\n#ifdef NETWARE\n#define HAS_SOCKETS(dt) (dt == APR_POLL_SOCKET) ? 1 : 0\n#define HAS_PIPES(dt) (dt == APR_POLL_FILE) ? 1 : 0\n#endif\n\n#if defined(HAVE_AIO_H) && defined(HAVE_AIO_MSGQ)\n#define _AIO_OS390\t/* enable a bunch of z/OS aio.h definitions */\n#include <aio.h>\t/* aiocb\t*/\n#endif\n\n/* Choose the best method platform specific to use in apr_pollset */\n#ifdef HAVE_KQUEUE\n#define POLLSET_USES_KQUEUE\n#define POLLSET_DEFAULT_METHOD APR_POLLSET_KQUEUE\n#elif defined(HAVE_PORT_CREATE)\n#define POLLSET_USES_PORT\n#define POLLSET_DEFAULT_METHOD APR_POLLSET_PORT\n#elif defined(HAVE_EPOLL)\n#define POLLSET_USES_EPOLL\n#define POLLSET_DEFAULT_METHOD APR_POLLSET_EPOLL\n#elif defined(HAVE_AIO_MSGQ)\n#define POLLSET_USES_AIO_MSGQ\n#define POLLSET_DEFAULT_METHOD APR_POLLSET_AIO_MSGQ\n#elif defined(HAVE_POLL)\n#define POLLSET_USES_POLL\n#define POLLSET_DEFAULT_METHOD APR_POLLSET_POLL\n#else\n#define POLLSET_USES_SELECT\n#define POLLSET_DEFAULT_METHOD APR_POLLSET_SELECT\n#endif\n\n#ifdef WIN32\n#define POLL_USES_SELECT\n#undef POLLSET_DEFAULT_METHOD\n#define POLLSET_DEFAULT_METHOD APR_POLLSET_SELECT\n#else\n#ifdef HAVE_POLL\n#define POLL_USES_POLL\n#else\n#define POLL_USES_SELECT\n#endif\n#endif\n\n#if defined(POLLSET_USES_KQUEUE) || defined(POLLSET_USES_EPOLL) || defined(POLLSET_USES_PORT) || defined(POLLSET_USES_AIO_MSGQ)\n\n#include \"apr_ring.h\"\n\n#if APR_HAS_THREADS\n#include \"apr_thread_mutex.h\"\n#define pollset_lock_rings() \\\n    if (pollset->flags & APR_POLLSET_THREADSAFE) \\\n        apr_thread_mutex_lock(pollset->p->ring_lock);\n#define pollset_unlock_rings() \\\n    if (pollset->flags & APR_POLLSET_THREADSAFE) \\\n        apr_thread_mutex_unlock(pollset->p->ring_lock);\n#else\n#define pollset_lock_rings()\n#define pollset_unlock_rings()\n#endif\n\ntypedef struct pfd_elem_t pfd_elem_t;\n\nstruct pfd_elem_t {\n    APR_RING_ENTRY(pfd_elem_t) link;\n    apr_pollfd_t pfd;\n#ifdef HAVE_PORT_CREATE\n   int on_query_ring;\n#endif\n};\n\n#endif\n\ntypedef struct apr_pollset_private_t apr_pollset_private_t;\ntypedef struct apr_pollset_provider_t apr_pollset_provider_t;\ntypedef struct apr_pollcb_provider_t apr_pollcb_provider_t;\n\nstruct apr_pollset_t\n{\n    apr_pool_t *pool;\n    apr_uint32_t nelts;\n    apr_uint32_t nalloc;\n    apr_uint32_t flags;\n    /* Pipe descriptors used for wakeup */\n    apr_file_t *wakeup_pipe[2];\n    apr_pollfd_t wakeup_pfd;\n    apr_pollset_private_t *p;\n    apr_pollset_provider_t *provider;\n};\n\ntypedef union {\n#if defined(HAVE_EPOLL)\n    struct epoll_event *epoll;\n#endif\n#if defined(HAVE_PORT_CREATE)\n    port_event_t *port;\n#endif\n#if defined(HAVE_KQUEUE)\n    struct kevent *ke;\n#endif\n#if defined(HAVE_POLL)\n    struct pollfd *ps;\n#endif\n    void *undef;\n} apr_pollcb_pset;\n\nstruct apr_pollcb_t {\n    apr_pool_t *pool;\n    apr_uint32_t nelts;\n    apr_uint32_t nalloc;\n    int fd;\n    apr_pollcb_pset pollset;\n    apr_pollfd_t **copyset;\n    apr_pollcb_provider_t *provider;\n};\n\nstruct apr_pollset_provider_t {\n    apr_status_t (*create)(apr_pollset_t *, apr_uint32_t, apr_pool_t *, apr_uint32_t);\n    apr_status_t (*add)(apr_pollset_t *, const apr_pollfd_t *);\n    apr_status_t (*remove)(apr_pollset_t *, const apr_pollfd_t *);\n    apr_status_t (*poll)(apr_pollset_t *, apr_interval_time_t, apr_int32_t *, const apr_pollfd_t **);\n    apr_status_t (*cleanup)(apr_pollset_t *);\n    const char *name;\n};\n\nstruct apr_pollcb_provider_t {\n    apr_status_t (*create)(apr_pollcb_t *, apr_uint32_t, apr_pool_t *, apr_uint32_t);\n    apr_status_t (*add)(apr_pollcb_t *, apr_pollfd_t *);\n    apr_status_t (*remove)(apr_pollcb_t *, apr_pollfd_t *);\n    apr_status_t (*poll)(apr_pollcb_t *, apr_interval_time_t, apr_pollcb_cb_t, void *);\n    const char *name;\n};\n\n/* Private functions */\nvoid apr_pollset_drain_wakeup_pipe(apr_pollset_t *pollset);\n\n#endif /* APR_ARCH_POLL_PRIVATE_H */\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_proc_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef PROC_MUTEX_H\n#define PROC_MUTEX_H\n\n#include \"apr.h\"\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_lib.h\"\n#include \"apr_proc_mutex.h\"\n#include \"apr_pools.h\"\n#include \"apr_portable.h\"\n#include \"apr_file_io.h\"\n#include \"apr_arch_file_io.h\"\n\n/* System headers required by Locks library */\n#if APR_HAVE_SYS_TYPES_H\n#include <sys/types.h>\n#endif\n#if APR_HAVE_STDIO_H\n#include <stdio.h>\n#endif\n#if APR_HAVE_FCNTL_H\n#include <fcntl.h>\n#endif\n\n#ifdef HAVE_SYS_IPC_H\n#include <sys/ipc.h>\n#endif\n#ifdef HAVE_SYS_SEM_H\n#include <sys/sem.h>\n#endif\n#ifdef HAVE_SYS_FILE_H\n#include <sys/file.h>\n#endif\n#if APR_HAVE_STDLIB_H\n#include <stdlib.h>\n#endif\n#if APR_HAVE_UNISTD_H\n#include <unistd.h>\n#endif\n#if APR_HAVE_STRING_H\n#include <string.h>\n#endif\n#ifdef HAVE_SYS_MMAN_H\n#include <sys/mman.h>\n#endif\n#if APR_HAVE_PTHREAD_H\n#include <pthread.h>\n#endif\n#if APR_HAVE_SEMAPHORE_H\n#include <semaphore.h>\n#endif\n/* End System Headers */\n\nstruct apr_proc_mutex_unix_lock_methods_t {\n    unsigned int flags;\n    apr_status_t (*create)(apr_proc_mutex_t *, const char *);\n    apr_status_t (*acquire)(apr_proc_mutex_t *);\n    apr_status_t (*tryacquire)(apr_proc_mutex_t *);\n    apr_status_t (*release)(apr_proc_mutex_t *);\n    apr_status_t (*cleanup)(void *);\n    apr_status_t (*child_init)(apr_proc_mutex_t **, apr_pool_t *, const char *);\n    const char *name;\n};\ntypedef struct apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_lock_methods_t;\n\n/* bit values for flags field in apr_unix_lock_methods_t */\n#define APR_PROCESS_LOCK_MECH_IS_GLOBAL          1\n\n#if !APR_HAVE_UNION_SEMUN && defined(APR_HAS_SYSVSEM_SERIALIZE)\nunion semun {\n    int val;\n    struct semid_ds *buf;\n    unsigned short *array;\n};\n#endif\n\nstruct apr_proc_mutex_t {\n    apr_pool_t *pool;\n    const apr_proc_mutex_unix_lock_methods_t *meth;\n    const apr_proc_mutex_unix_lock_methods_t *inter_meth;\n    int curr_locked;\n    char *fname;\n#if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE\n    apr_file_t *interproc;\n#endif\n#if APR_HAS_POSIXSEM_SERIALIZE\n    sem_t *psem_interproc;\n#endif\n#if APR_HAS_PROC_PTHREAD_SERIALIZE\n    pthread_mutex_t *pthread_interproc;\n#endif\n};\n\nvoid apr_proc_mutex_unix_setup_lock(void);\n\n#endif  /* PROC_MUTEX_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_shm.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef SHM_H\n#define SHM_H\n\n#include \"apr.h\"\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_lib.h\"\n#include \"apr_shm.h\"\n#include \"apr_pools.h\"\n#include \"apr_file_io.h\"\n#include \"apr_network_io.h\"\n#include \"apr_portable.h\"\n\n#if APR_HAVE_UNISTD_H\n#include <unistd.h>\n#endif\n#ifdef HAVE_SYS_MMAN_H\n#include <sys/mman.h>\n#endif\n#ifdef HAVE_SYS_IPC_H\n#include <sys/ipc.h>\n#endif\n#ifdef HAVE_SYS_MUTEX_H\n#include <sys/mutex.h>\n#endif\n#ifdef HAVE_SYS_SHM_H\n#include <sys/shm.h>\n#endif\n#if !defined(SHM_R)\n#define SHM_R 0400\n#endif\n#if !defined(SHM_W)\n#define SHM_W 0200\n#endif\n#ifdef HAVE_SYS_FILE_H\n#include <sys/file.h>\n#endif\n\n/* Not all systems seem to have MAP_FAILED defined, but it should always\n * just be (void *)-1. */\n#ifndef MAP_FAILED\n#define MAP_FAILED ((void *)-1)\n#endif\n\nstruct apr_shm_t {\n    apr_pool_t *pool;\n    void *base;          /* base real address */\n    void *usable;        /* base usable address */\n    apr_size_t reqsize;  /* requested segment size */\n    apr_size_t realsize; /* actual segment size */\n    const char *filename;      /* NULL if anonymous */\n#if APR_USE_SHMEM_SHMGET || APR_USE_SHMEM_SHMGET_ANON\n    int shmid;          /* shmem ID returned from shmget() */\n#endif\n};\n\n#endif /* SHM_H */\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_thread_cond.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_COND_H\n#define THREAD_COND_H\n\n#include \"apr.h\"\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_lib.h\"\n#include \"apr_thread_mutex.h\"\n#include \"apr_thread_cond.h\"\n#include \"apr_pools.h\"\n\n#if APR_HAVE_PTHREAD_H\n#include <pthread.h>\n#endif\n\n/* XXX: Should we have a better autoconf search, something like\n * APR_HAS_PTHREAD_COND? -aaron */\n#if APR_HAS_THREADS\nstruct apr_thread_cond_t {\n    apr_pool_t *pool;\n    pthread_cond_t cond;\n};\n#endif\n\n#endif  /* THREAD_COND_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_thread_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_MUTEX_H\n#define THREAD_MUTEX_H\n\n#include \"apr.h\"\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_thread_mutex.h\"\n#include \"apr_portable.h\"\n#include \"apr_atomic.h\"\n\n#if APR_HAVE_PTHREAD_H\n#include <pthread.h>\n#endif\n\n#if APR_HAS_THREADS\nstruct apr_thread_mutex_t {\n    apr_pool_t *pool;\n    pthread_mutex_t mutex;\n};\n#endif\n\n#endif  /* THREAD_MUTEX_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_thread_rwlock.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_RWLOCK_H\n#define THREAD_RWLOCK_H\n\n#include \"apr.h\"\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_thread_rwlock.h\"\n#include \"apr_pools.h\"\n\n#if APR_HAVE_PTHREAD_H\n/* this gives us pthread_rwlock_t */\n#include <pthread.h>\n#endif\n\n#if APR_HAS_THREADS\n#ifdef HAVE_PTHREAD_RWLOCKS\n\nstruct apr_thread_rwlock_t {\n    apr_pool_t *pool;\n    pthread_rwlock_t rwlock;\n};\n\n#else\n\nstruct apr_thread_rwlock_t {\n    apr_pool_t *pool;\n};\n#endif\n\n#endif\n\n#endif  /* THREAD_RWLOCK_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/unix/apr_arch_threadproc.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"apr.h\"\n#include \"apr_private.h\"\n#include \"apr_thread_proc.h\"\n#include \"apr_file_io.h\"\n#include \"apr_arch_file_io.h\"\n\n/* System headers required for thread/process library */\n#if APR_HAVE_PTHREAD_H\n#include <pthread.h>\n#endif\n#ifdef HAVE_SYS_RESOURCE_H\n#include <sys/resource.h>\n#endif\n#if APR_HAVE_SIGNAL_H\n#include <signal.h>\n#endif\n#if APR_HAVE_STRING_H\n#include <string.h>\n#endif\n#if APR_HAVE_SYS_WAIT_H\n#include <sys/wait.h>\n#endif\n#if APR_HAVE_STRING_H\n#include <string.h>\n#endif\n#ifdef HAVE_SCHED_H\n#include <sched.h>\n#endif\n/* End System Headers */\n\n\n#ifndef THREAD_PROC_H\n#define THREAD_PROC_H\n\n#define SHELL_PATH \"/bin/sh\"\n\n#if APR_HAS_THREADS\n\nstruct apr_thread_t {\n    apr_pool_t *pool;\n    pthread_t *td;\n    void *data;\n    apr_thread_start_t func;\n    apr_status_t exitval;\n};\n\nstruct apr_threadattr_t {\n    apr_pool_t *pool;\n    pthread_attr_t attr;\n};\n\nstruct apr_threadkey_t {\n    apr_pool_t *pool;\n    pthread_key_t key;\n};\n\nstruct apr_thread_once_t {\n    pthread_once_t once;\n};\n\n#endif\n\nstruct apr_procattr_t {\n    apr_pool_t *pool;\n    apr_file_t *parent_in;\n    apr_file_t *child_in;\n    apr_file_t *parent_out;\n    apr_file_t *child_out;\n    apr_file_t *parent_err;\n    apr_file_t *child_err;\n    char *currdir;\n    apr_int32_t cmdtype;\n    apr_int32_t detached;\n#ifdef RLIMIT_CPU\n    struct rlimit *limit_cpu;\n#endif\n#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)\n    struct rlimit *limit_mem;\n#endif\n#ifdef RLIMIT_NPROC\n    struct rlimit *limit_nproc;\n#endif\n#ifdef RLIMIT_NOFILE\n    struct rlimit *limit_nofile;\n#endif\n    apr_child_errfn_t *errfn;\n    apr_int32_t errchk;\n    apr_uid_t   uid;\n    apr_gid_t   gid;\n};\n\n#endif  /* ! THREAD_PROC_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_arch_atime.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ATIME_H\n#define ATIME_H\n\n#include \"apr_private.h\"\n#include \"apr_time.h\"\n#if APR_HAVE_TIME_H\n#include <time.h>\n#endif\n\nstruct atime_t {\n    apr_pool_t *cntxt;\n    apr_time_t currtime;\n    SYSTEMTIME *explodedtime;\n};\n\n\n/* Number of micro-seconds between the beginning of the Windows epoch\n * (Jan. 1, 1601) and the Unix epoch (Jan. 1, 1970) \n */\n#define APR_DELTA_EPOCH_IN_USEC   APR_TIME_C(11644473600000000);\n\n\nstatic APR_INLINE void FileTimeToAprTime(apr_time_t *result, FILETIME *input)\n{\n    /* Convert FILETIME one 64 bit number so we can work with it. */\n    *result = input->dwHighDateTime;\n    *result = (*result) << 32;\n    *result |= input->dwLowDateTime;\n    *result /= 10;    /* Convert from 100 nano-sec periods to micro-seconds. */\n    *result -= APR_DELTA_EPOCH_IN_USEC;  /* Convert from Windows epoch to Unix epoch */\n    return;\n}\n\n\nstatic APR_INLINE void AprTimeToFileTime(LPFILETIME pft, apr_time_t t)\n{\n    LONGLONG ll;\n    t += APR_DELTA_EPOCH_IN_USEC;\n    ll = t * 10;\n    pft->dwLowDateTime = (DWORD)ll;\n    pft->dwHighDateTime = (DWORD) (ll >> 32);\n    return;\n}\n\n\n#endif  /* ! ATIME_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_arch_dso.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef DSO_H\n#define DSO_H\n\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_pools.h\"\n#include \"apr_dso.h\"\n#include \"apr.h\"\n\n#if APR_HAS_DSO\n\nstruct apr_dso_handle_t {\n    apr_pool_t  *cont;\n    void          *handle;\n    apr_status_t   load_error;\n};\n\n#endif\n\n#endif\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_arch_file_io.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef FILE_IO_H\n#define FILE_IO_H\n\n#include \"apr.h\"\n#include \"apr_private.h\"\n#include \"apr_pools.h\"\n#include \"apr_general.h\"\n#include \"apr_tables.h\"\n#include \"apr_thread_mutex.h\"\n#include \"apr_file_io.h\"\n#include \"apr_file_info.h\"\n#include \"apr_errno.h\"\n#include \"apr_arch_misc.h\"\n#include \"apr_poll.h\"\n\n#ifdef HAVE_SYS_STAT_H\n#include <sys/stat.h>\n#endif\n#if APR_HAVE_SYS_TYPES_H\n#include <sys/types.h>\n#endif\n#ifdef HAVE_SYS_FCNTL_H\n#include <fcntl.h>\n#endif\n#ifdef HAVE_TIME_H\n#include <time.h>\n#endif\n#if APR_HAVE_DIRENT_H\n#include <dirent.h>\n#endif\n#ifdef HAVE_MALLOC_H\n#include <malloc.h>\n#endif\n\n#if APR_HAS_UNICODE_FS\n#include \"arch/win32/apr_arch_utf8.h\"\n#include <wchar.h>\n\n/* Helper functions for the WinNT ApiW() functions.  APR treats all\n * resource identifiers (files, etc) by their UTF-8 name, to provide \n * access to all named identifiers.  [UTF-8 completely maps Unicode \n * into char type strings.]\n *\n * The _path flavors below provide us fast mappings of the\n * Unicode filename //?/D:/path and //?/UNC/mach/share/path mappings,\n * which allow unlimited (well, 32000 wide character) length names.\n * These prefixes may appear in Unicode, but must not appear in the\n * Ascii API calls.  So we tack them on in utf8_to_unicode_path, and\n * strip them right back off in unicode_to_utf8_path.\n */\napr_status_t utf8_to_unicode_path(apr_wchar_t* dststr, apr_size_t dstchars, \n                                  const char* srcstr);\napr_status_t unicode_to_utf8_path(char* dststr, apr_size_t dstchars, \n                                  const apr_wchar_t* srcstr);\n\n#endif /* APR_HAS_UNICODE_FS */\n\n/* Another Helper functions for the WinNT ApiW() functions.  We need to\n * derive some 'resource' names (max length 255 characters, prefixed with\n * Global/ or Local/ on WinNT) from something that looks like a filename.\n * Since 'resource' names never contain slashes, convert these to '_'s\n * and return the appropriate char* or wchar* for ApiA or ApiW calls.\n */\n\nvoid *res_name_from_filename(const char *file, int global, apr_pool_t *pool);\n\n#define APR_FILE_MAX MAX_PATH\n\n#define APR_FILE_DEFAULT_BUFSIZE 4096\n/* For backwards-compat */\n#define APR_FILE_BUFSIZE APR_FILE_DEFAULT_BUFSIZE\n\n/* obscure ommissions from msvc's sys/stat.h */\n#ifdef _MSC_VER\n#define S_IFIFO        _S_IFIFO /* pipe */\n#define S_IFBLK        0060000  /* Block Special */\n#define S_IFLNK        0120000  /* Symbolic Link */\n#define S_IFSOCK       0140000  /* Socket */\n#define S_IFWHT        0160000  /* Whiteout */\n#endif\n\n/* Internal Flags for apr_file_open */\n#define APR_OPENINFO     0x00100000 /* Open without READ or WRITE access */\n#define APR_OPENLINK     0x00200000 /* Open a link itself, if supported */\n#define APR_READCONTROL  0x00400000 /* Read the file's owner/perms */\n#define APR_WRITECONTROL 0x00800000 /* Modify the file's owner/perms */\n/* #define APR_INHERIT   0x01000000 -- Defined in apr_arch_inherit.h! */\n#define APR_STDIN_FLAG   0x02000000 /* Obtained via apr_file_open_stdin() */\n#define APR_STDOUT_FLAG  0x04000000 /* Obtained via apr_file_open_stdout() */\n#define APR_STDERR_FLAG  0x06000000 /* Obtained via apr_file_open_stderr() */\n#define APR_STD_FLAGS    (APR_STDIN_FLAG | APR_STDOUT_FLAG | APR_STDERR_FLAG)\n#define APR_WRITEATTRS   0x08000000 /* Modify the file's attributes */\n\n/* Entries missing from the MSVC 5.0 Win32 SDK:\n */\n#ifndef FILE_ATTRIBUTE_DEVICE\n#define FILE_ATTRIBUTE_DEVICE        0x00000040\n#endif\n#ifndef FILE_ATTRIBUTE_REPARSE_POINT\n#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400\n#endif\n#ifndef FILE_FLAG_OPEN_NO_RECALL\n#define FILE_FLAG_OPEN_NO_RECALL     0x00100000\n#endif\n#ifndef FILE_FLAG_OPEN_REPARSE_POINT\n#define FILE_FLAG_OPEN_REPARSE_POINT 0x00200000\n#endif\n#ifndef TRUSTEE_IS_WELL_KNOWN_GROUP\n#define TRUSTEE_IS_WELL_KNOWN_GROUP  5\n#endif\n\n/* Information bits available from the WIN32 FindFirstFile function */\n#define APR_FINFO_WIN32_DIR (APR_FINFO_NAME  | APR_FINFO_TYPE \\\n                           | APR_FINFO_CTIME | APR_FINFO_ATIME \\\n                           | APR_FINFO_MTIME | APR_FINFO_SIZE)\n\n/* Sneak the Readonly bit through finfo->protection for internal use _only_ */\n#define APR_FREADONLY 0x10000000 \n\n/* Private function for apr_stat/lstat/getfileinfo/dir_read */\nint fillin_fileinfo(apr_finfo_t *finfo, WIN32_FILE_ATTRIBUTE_DATA *wininfo, \n                    int byhandle, apr_int32_t wanted);\n\n/* Private function that extends apr_stat/lstat/getfileinfo/dir_read */\napr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile, \n                        apr_int32_t wanted, int whatfile);\n\n/* whatfile types for the ufile arg */\n#define MORE_OF_HANDLE 0\n#define MORE_OF_FSPEC  1\n#define MORE_OF_WFSPEC 2\n\n/* quick run-down of fields in windows' apr_file_t structure that may have \n * obvious uses.\n * fname --  the filename as passed to the open call.\n * dwFileAttricutes -- Attributes used to open the file.\n * append -- Windows doesn't support the append concept when opening files.\n *           APR needs to keep track of this, and always make sure we append\n *           correctly when writing to a file with this flag set TRUE.\n */\n\n/* for apr_poll.c */\n#define filedes filehand\n\nstruct apr_file_t {\n    apr_pool_t *pool;\n    HANDLE filehand;\n    BOOLEAN pipe;              /* Is this a pipe of a file? */\n    OVERLAPPED *pOverlapped;\n    apr_interval_time_t timeout;\n    apr_int32_t flags;\n\n    /* File specific info */\n    apr_finfo_t *finfo;\n    char *fname;\n    DWORD dwFileAttributes;\n    int eof_hit;\n    BOOLEAN buffered;          /* Use buffered I/O? */\n    int ungetchar;             /* Last char provided by an unget op. (-1 = no char) */\n    int append; \n\n    /* Stuff for buffered mode */\n    char *buffer;\n    apr_size_t bufpos;         /* Read/Write position in buffer */\n    apr_size_t bufsize;        /* The size of the buffer */\n    apr_size_t dataRead;       /* amount of valid data read into buffer */\n    int direction;             /* buffer being used for 0 = read, 1 = write */\n    apr_off_t filePtr;         /* position in file of handle */\n    apr_thread_mutex_t *mutex; /* mutex semaphore, must be owned to access\n                                * the above fields                          */\n\n#if APR_FILES_AS_SOCKETS\n    /* if there is a timeout set, then this pollset is used */\n    apr_pollset_t *pollset;\n#endif\n    /* Pipe specific info */    \n};\n\nstruct apr_dir_t {\n    apr_pool_t *pool;\n    HANDLE dirhand;\n    apr_size_t rootlen;\n    char *dirname;\n    char *name;\n    union {\n#if APR_HAS_UNICODE_FS\n        struct {\n            WIN32_FIND_DATAW *entry;\n        } w;\n#endif\n#if APR_HAS_ANSI_FS\n        struct {\n            WIN32_FIND_DATAA *entry;\n        } n;\n#endif        \n    };\n    int bof;\n};\n\n/* There are many goofy characters the filesystem can't accept\n * or can confound the cmd.exe shell.  Here's the list\n * [declared in filesys.c]\n */\nextern const char apr_c_is_fnchar[256];\n\n#define IS_FNCHAR(c) (apr_c_is_fnchar[(unsigned char)(c)] & 1)\n#define IS_SHCHAR(c) ((apr_c_is_fnchar[(unsigned char)(c)] & 2) == 2)\n\n\n/* If the user passes APR_FILEPATH_TRUENAME to either\n * apr_filepath_root or apr_filepath_merge, this fn determines\n * that the root really exists.  It's expensive, wouldn't want\n * to do this too frequenly.\n */\napr_status_t filepath_root_test(char *path, apr_pool_t *p);\n\n\n/* The apr_filepath_merge wants to canonicalize the cwd to the \n * addpath if the user passes NULL as the old root path (this\n * isn't true of an empty string \"\", which won't be concatenated.\n *\n * But we need to figure out what the cwd of a given volume is,\n * when the user passes D:foo.  This fn will determine D:'s cwd.\n *\n * If flags includes the bit APR_FILEPATH_NATIVE, the path returned\n * is in the os-native format.\n */\napr_status_t filepath_drive_get(char **rootpath, char drive, \n                                apr_int32_t flags, apr_pool_t *p);\n\n\n/* If the user passes d: vs. D: (or //mach/share vs. //MACH/SHARE),\n * we need to fold the case to canonical form.  This function is\n * supposed to do so.\n */\napr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p);\n\n\napr_status_t file_cleanup(void *);\n\nextern apr_status_t\napr_file_socket_pipe_create(apr_file_t **in,\n                            apr_file_t **out,\n                            apr_pool_t *p);\n\nextern apr_status_t\napr_file_socket_pipe_close(apr_file_t *file);\n\n#endif  /* ! FILE_IO_H */\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_arch_inherit.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef INHERIT_H\n#define INHERIT_H\n\n#include \"apr_inherit.h\"\n\n#define APR_INHERIT (1 << 24)    /* Must not conflict with other bits */\n\n#if APR_HAS_UNICODE_FS && APR_HAS_ANSI_FS\n/* !defined(_WIN32_WCE) is implicit here */\n\n#define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup)        \\\nAPR_DECLARE(apr_status_t) apr_##name##_inherit_set(apr_##name##_t *the##name) \\\n{                                                                   \\\n    IF_WIN_OS_IS_UNICODE                                            \\\n    {                                                               \\\n/*     if (!SetHandleInformation(the##name->filehand,              \\\n *                                HANDLE_FLAG_INHERIT,              \\\n *                                HANDLE_FLAG_INHERIT))             \\\n *          return apr_get_os_error();                              \\\n */  }                                                               \\\n    ELSE_WIN_OS_IS_ANSI                                             \\\n    {                                                               \\\n        HANDLE temp, hproc = GetCurrentProcess();                   \\\n        if (!DuplicateHandle(hproc, the##name->filehand,            \\\n                             hproc, &temp, 0, TRUE,                 \\\n                             DUPLICATE_SAME_ACCESS))                \\\n            return apr_get_os_error();                              \\\n        CloseHandle(the##name->filehand);                           \\\n        the##name->filehand = temp;                                 \\\n    }                                                               \\\n    return APR_SUCCESS;                                             \\\n}\n\n#define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup)      \\\nAPR_DECLARE(apr_status_t) apr_##name##_inherit_unset(apr_##name##_t *the##name)\\\n{                                                                   \\\n    IF_WIN_OS_IS_UNICODE                                            \\\n    {                                                               \\\n/*      if (!SetHandleInformation(the##name->filehand,              \\\n *                                HANDLE_FLAG_INHERIT, 0))          \\\n *          return apr_get_os_error();                              \\\n */ }                                                               \\\n    ELSE_WIN_OS_IS_ANSI                                             \\\n    {                                                               \\\n        HANDLE temp, hproc = GetCurrentProcess();                   \\\n        if (!DuplicateHandle(hproc, the##name->filehand,            \\\n                             hproc, &temp, 0, FALSE,                \\\n                             DUPLICATE_SAME_ACCESS))                \\\n            return apr_get_os_error();                              \\\n        CloseHandle(the##name->filehand);                           \\\n        the##name->filehand = temp;                                 \\\n    }                                                               \\\n    return APR_SUCCESS;                                             \\\n}\n\n#elif APR_HAS_ANSI_FS || defined(_WIN32_WCE)\n\n#define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup)        \\\nAPR_DECLARE(apr_status_t) apr_##name##_inherit_set(apr_##name##_t *the##name) \\\n{                                                                   \\\n    HANDLE temp, hproc = GetCurrentProcess();                       \\\n    if (!DuplicateHandle(hproc, the##name->filehand,                \\\n                         hproc, &temp, 0, TRUE,                     \\\n                         DUPLICATE_SAME_ACCESS))                    \\\n        return apr_get_os_error();                                  \\\n    CloseHandle(the##name->filehand);                               \\\n    the##name->filehand = temp;                                     \\\n    return APR_SUCCESS;                                             \\\n}\n\n#define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup)      \\\nAPR_DECLARE(apr_status_t) apr_##name##_inherit_unset(apr_##name##_t *the##name)\\\n{                                                                   \\\n    HANDLE temp, hproc = GetCurrentProcess();                       \\\n    if (!DuplicateHandle(hproc, the##name->filehand,                \\\n                         hproc, &temp, 0, FALSE,                    \\\n                         DUPLICATE_SAME_ACCESS))                    \\\n        return apr_get_os_error();                                  \\\n    CloseHandle(the##name->filehand);                               \\\n    the##name->filehand = temp;                                     \\\n    return APR_SUCCESS;                                             \\\n}\n\n#else /* APR_HAS_UNICODE_FS && !APR_HAS_ANSI_FS && !defined(_WIN32_WCE) */\n\n#define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup)        \\\nAPR_DECLARE(apr_status_t) apr_##name##_inherit_set(apr_##name##_t *the##name) \\\n{                                                                   \\\n/*  if (!SetHandleInformation(the##name->filehand,                  \\\n *                            HANDLE_FLAG_INHERIT,                  \\\n *                            HANDLE_FLAG_INHERIT))                 \\\n *      return apr_get_os_error();                                  \\\n */ return APR_SUCCESS;                                             \\\n}\n\n#define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup)      \\\nAPR_DECLARE(apr_status_t) apr_##name##_inherit_unset(apr_##name##_t *the##name)\\\n{                                                                   \\\n/*  if (!SetHandleInformation(the##name->filehand,                  \\\n *                            HANDLE_FLAG_INHERIT, 0))              \\\n *      return apr_get_os_error();                                  \\\n */ return APR_SUCCESS;                                             \\\n}\n\n#endif /* defined(APR_HAS_UNICODE_FS) */\n\n#endif\t/* ! INHERIT_H */\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_arch_misc.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef MISC_H\n#define MISC_H\n\n#include \"apr.h\"\n#include \"apr_portable.h\"\n#include \"apr_private.h\"\n#include \"apr_general.h\"\n#include \"apr_pools.h\"\n#include \"apr_getopt.h\"\n#include \"apr_thread_proc.h\"\n#include \"apr_file_io.h\"\n#include \"apr_errno.h\"\n#include \"apr_getopt.h\"\n\n#if APR_HAVE_STDIO_H\n#include <stdio.h>\n#endif\n#if APR_HAVE_SIGNAL_H\n#include <signal.h>\n#endif\n#if APR_HAVE_PTHREAD_H\n#include <pthread.h>\n#endif\n#if APR_HAVE_STDLIB_H\n#include <stdlib.h>\n#endif\n#if APR_HAVE_STRING_H\n#include <string.h>\n#endif\n#ifndef _WIN32_WCE\n#include <tlhelp32.h>\n#endif\n\nstruct apr_other_child_rec_t {\n    apr_pool_t *p;\n    struct apr_other_child_rec_t *next;\n    apr_proc_t *proc;\n    void (*maintenance) (int, void *, int);\n    void *data;\n    apr_os_file_t write_fd;\n};\n\n#define WSAHighByte 2\n#define WSALowByte 0\n\n/* start.c and apr_app.c helpers and communication within misc.c\n *\n * They are not for public consumption, although apr_app_init_complete\n * must be an exported symbol to avoid reinitialization.\n */\nextern int APR_DECLARE_DATA apr_app_init_complete;\n\nint apr_wastrtoastr(char const * const * *retarr,\n                    wchar_t const * const *arr, int args);\n\n/* Platform specific designation of run time os version.\n * Gaps allow for specific service pack levels that\n * export new kernel or winsock functions or behavior.\n */\ntypedef enum {\n    APR_WIN_UNK =       0,\n    APR_WIN_UNSUP =     1,\n    APR_WIN_95 =       10,\n    APR_WIN_95_B =     11,\n    APR_WIN_95_OSR2 =  12,\n    APR_WIN_98 =       14,\n    APR_WIN_98_SE =    16,\n    APR_WIN_ME =       18,\n\n    APR_WIN_UNICODE =  20, /* Prior versions support only narrow chars */\n\n    APR_WIN_CE_3 =     23, /* CE is an odd beast, not supporting */\n                           /* some pre-NT features, such as the    */\n    APR_WIN_NT =       30, /* narrow charset APIs (fooA fns), while  */\n    APR_WIN_NT_3_5 =   35, /* not supporting some NT-family features.  */\n    APR_WIN_NT_3_51 =  36,\n\n    APR_WIN_NT_4 =     40,\n    APR_WIN_NT_4_SP2 = 42,\n    APR_WIN_NT_4_SP3 = 43,\n    APR_WIN_NT_4_SP4 = 44,\n    APR_WIN_NT_4_SP5 = 45,\n    APR_WIN_NT_4_SP6 = 46,\n\n    APR_WIN_2000 =     50,\n    APR_WIN_2000_SP1 = 51,\n    APR_WIN_2000_SP2 = 52,\n    APR_WIN_XP =       60,\n    APR_WIN_XP_SP1 =   61,\n    APR_WIN_XP_SP2 =   62,\n    APR_WIN_2003 =     70,\n    APR_WIN_VISTA =    80,\n    APR_WIN_7 =        90\n} apr_oslevel_e;\n\nextern APR_DECLARE_DATA apr_oslevel_e apr_os_level;\n\napr_status_t apr_get_oslevel(apr_oslevel_e *);\n\n/* The APR_HAS_ANSI_FS symbol is PRIVATE, and internal to APR.\n * APR only supports char data for filenames.  Like most applications,\n * characters >127 are essentially undefined.  APR_HAS_UNICODE_FS lets\n * the application know that utf-8 is the encoding method of APR, and\n * only incidently hints that we have Wide OS calls.\n *\n * APR_HAS_ANSI_FS is simply an OS flag to tell us all calls must be\n * the unicode eqivilant.\n */\n\n#if defined(_WIN32_WCE) || defined(WINNT)\n#define APR_HAS_ANSI_FS           0\n#else\n#define APR_HAS_ANSI_FS           1\n#endif\n\n/* IF_WIN_OS_IS_UNICODE / ELSE_WIN_OS_IS_ANSI help us keep the code trivial\n * where have runtime tests for unicode-ness, that aren't needed in any\n * build which supports only WINNT or WCE.\n */\n#if APR_HAS_ANSI_FS && APR_HAS_UNICODE_FS\n#define IF_WIN_OS_IS_UNICODE if (apr_os_level >= APR_WIN_UNICODE)\n#define ELSE_WIN_OS_IS_ANSI else\n#else /* APR_HAS_UNICODE_FS */\n#define IF_WIN_OS_IS_UNICODE\n#define ELSE_WIN_OS_IS_ANSI\n#endif /* WINNT */\n\n#if defined(_MSC_VER) && !defined(_WIN32_WCE)\n#include \"crtdbg.h\"\n\nstatic APR_INLINE void* apr_malloc_dbg(size_t size, const char* filename,\n                                       int linenumber)\n{\n    return _malloc_dbg(size, _CRT_BLOCK, filename, linenumber);\n}\n\nstatic APR_INLINE void* apr_realloc_dbg(void* userData, size_t newSize,\n                                        const char* filename, int linenumber)\n{\n    return _realloc_dbg(userData, newSize, _CRT_BLOCK, filename, linenumber);\n}\n\n#else\n\nstatic APR_INLINE void* apr_malloc_dbg(size_t size, const char* filename,\n                                       int linenumber)\n{\n    return malloc(size);\n}\n\nstatic APR_INLINE void* apr_realloc_dbg(void* userData, size_t newSize,\n                                        const char* filename, int linenumber)\n{\n    return realloc(userData, newSize);\n}\n\n#endif  /* ! _MSC_VER */\n\ntypedef enum {\n    DLL_WINBASEAPI = 0,    /* kernel32 From WinBase.h       */\n    DLL_WINADVAPI = 1,     /* advapi32 From WinBase.h       */\n    DLL_WINSOCKAPI = 2,    /* mswsock  From WinSock.h       */\n    DLL_WINSOCK2API = 3,   /* ws2_32   From WinSock2.h      */\n    DLL_SHSTDAPI = 4,      /* shell32  From ShellAPI.h      */\n    DLL_NTDLL = 5,         /* shell32  From our real kernel */\n    DLL_defined = 6        /* must define as last idx_ + 1  */\n} apr_dlltoken_e;\n\nFARPROC apr_load_dll_func(apr_dlltoken_e fnLib, char *fnName, int ordinal);\n\n/* The apr_load_dll_func call WILL return 0 set error to\n * ERROR_INVALID_FUNCTION if the function cannot be loaded\n */\n#define APR_DECLARE_LATE_DLL_FUNC(lib, rettype, calltype, fn, ord, args, names) \\\n    typedef rettype (calltype *apr_winapi_fpt_##fn) args; \\\n    static apr_winapi_fpt_##fn apr_winapi_pfn_##fn = NULL; \\\n    static int apr_winapi_chk_##fn = 0; \\\n    static APR_INLINE int apr_winapi_ld_##fn(void) \\\n    {   if (apr_winapi_pfn_##fn) return 1; \\\n        if (apr_winapi_chk_##fn ++) return 0; \\\n        if (!apr_winapi_pfn_##fn) \\\n            apr_winapi_pfn_##fn = (apr_winapi_fpt_##fn) \\\n                                      apr_load_dll_func(lib, #fn, ord); \\\n        if (apr_winapi_pfn_##fn) return 1; else return 0; }; \\\n    static APR_INLINE rettype apr_winapi_##fn args \\\n    {   if (apr_winapi_ld_##fn()) \\\n            return (*(apr_winapi_pfn_##fn)) names; \\\n        else { SetLastError(ERROR_INVALID_FUNCTION); return 0;} }; \\\n\n#define APR_HAVE_LATE_DLL_FUNC(fn) apr_winapi_ld_##fn()\n\n/* Provide late bound declarations of every API function missing from\n * one or more supported releases of the Win32 API\n *\n * lib is the enumerated token from apr_dlltoken_e, and must correspond\n * to the string table entry in start.c used by the apr_load_dll_func().\n * Token names (attempt to) follow Windows.h declarations prefixed by DLL_\n * in order to facilitate comparison.  Use the exact declaration syntax\n * and names from Windows.h to prevent ambigutity and bugs.\n *\n * rettype and calltype follow the original declaration in Windows.h\n * fn is the true function name - beware Ansi/Unicode #defined macros\n * ord is the ordinal within the library, use 0 if it varies between versions\n * args is the parameter list following the original declaration, in parens\n * names is the parameter list sans data types, enclosed in parens\n *\n * #undef/re#define the Ansi/Unicode generic name to abate confusion\n * In the case of non-text functions, simply #define the original name\n */\n\n#if !defined(_WIN32_WCE) && !defined(WINNT)\n/* This group is available to all versions of WINNT 4.0 SP6 and later */\n\n#ifdef GetFileAttributesExA\n#undef GetFileAttributesExA\n#endif\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, GetFileAttributesExA, 0, (\n    IN LPCSTR lpFileName,\n    IN GET_FILEEX_INFO_LEVELS fInfoLevelId,\n    OUT LPVOID lpFileInformation),\n    (lpFileName, fInfoLevelId, lpFileInformation));\n#define GetFileAttributesExA apr_winapi_GetFileAttributesExA\n#undef GetFileAttributesEx\n#define GetFileAttributesEx apr_winapi_GetFileAttributesExA\n\n#ifdef GetFileAttributesExW\n#undef GetFileAttributesExW\n#endif\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, GetFileAttributesExW, 0, (\n    IN LPCWSTR lpFileName,\n    IN GET_FILEEX_INFO_LEVELS fInfoLevelId,\n    OUT LPVOID lpFileInformation),\n    (lpFileName, fInfoLevelId, lpFileInformation));\n#define GetFileAttributesExW apr_winapi_GetFileAttributesExW\n\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, CancelIo, 0, (\n    IN HANDLE hFile),\n    (hFile));\n#define CancelIo apr_winapi_CancelIo\n\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, TryEnterCriticalSection, 0, (\n    LPCRITICAL_SECTION lpCriticalSection),\n    (lpCriticalSection));\n#define TryEnterCriticalSection apr_winapi_TryEnterCriticalSection\n\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, SwitchToThread, 0, (\n    void),\n    ());\n#define SwitchToThread apr_winapi_SwitchToThread\n\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI, BOOL, WINAPI, GetEffectiveRightsFromAclW, 0, (\n    IN PACL pacl,\n    IN PTRUSTEE_W pTrustee,\n    OUT PACCESS_MASK pAccessRights),\n    (pacl, pTrustee, pAccessRights));\n#define GetEffectiveRightsFromAclW apr_winapi_GetEffectiveRightsFromAclW\n\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI, BOOL, WINAPI, GetNamedSecurityInfoW, 0, (\n    IN LPWSTR pObjectName,\n    IN SE_OBJECT_TYPE ObjectType,\n    IN SECURITY_INFORMATION SecurityInfo,\n    OUT PSID *ppsidOwner,\n    OUT PSID *ppsidGroup,\n    OUT PACL *ppDacl,\n    OUT PACL *ppSacl,\n    OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor),\n    (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,\n        ppDacl, ppSacl, ppSecurityDescriptor));\n#define GetNamedSecurityInfoW apr_winapi_GetNamedSecurityInfoW\n\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI, BOOL, WINAPI, GetNamedSecurityInfoA, 0, (\n    IN LPSTR pObjectName,\n    IN SE_OBJECT_TYPE ObjectType,\n    IN SECURITY_INFORMATION SecurityInfo,\n    OUT PSID *ppsidOwner,\n    OUT PSID *ppsidGroup,\n    OUT PACL *ppDacl,\n    OUT PACL *ppSacl,\n    OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor),\n    (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,\n        ppDacl, ppSacl, ppSecurityDescriptor));\n#define GetNamedSecurityInfoA apr_winapi_GetNamedSecurityInfoA\n#undef GetNamedSecurityInfo\n#define GetNamedSecurityInfo apr_winapi_GetNamedSecurityInfoA\n\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI, BOOL, WINAPI, GetSecurityInfo, 0, (\n    IN HANDLE handle,\n    IN SE_OBJECT_TYPE ObjectType,\n    IN SECURITY_INFORMATION SecurityInfo,\n    OUT PSID *ppsidOwner,\n    OUT PSID *ppsidGroup,\n    OUT PACL *ppDacl,\n    OUT PACL *ppSacl,\n    OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor),\n    (handle, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,\n        ppDacl, ppSacl, ppSecurityDescriptor));\n#define GetSecurityInfo apr_winapi_GetSecurityInfo\n\nAPR_DECLARE_LATE_DLL_FUNC(DLL_SHSTDAPI, LPWSTR *, WINAPI, CommandLineToArgvW, 0, (\n    LPCWSTR lpCmdLine,\n    int *pNumArgs),\n    (lpCmdLine, pNumArgs));\n#define CommandLineToArgvW apr_winapi_CommandLineToArgvW\n\n#endif /* !defined(_WIN32_WCE) && !defined(WINNT) */\n\n#if !defined(_WIN32_WCE)\n/* This group is NOT available to all versions of WinNT,\n * these we must always look up\n */\n\n#ifdef GetCompressedFileSizeA\n#undef GetCompressedFileSizeA\n#endif\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, DWORD, WINAPI, GetCompressedFileSizeA, 0, (\n    IN LPCSTR lpFileName,\n    OUT LPDWORD lpFileSizeHigh),\n    (lpFileName, lpFileSizeHigh));\n#define GetCompressedFileSizeA apr_winapi_GetCompressedFileSizeA\n#undef GetCompressedFileSize\n#define GetCompressedFileSize apr_winapi_GetCompressedFileSizeA\n\n#ifdef GetCompressedFileSizeW\n#undef GetCompressedFileSizeW\n#endif\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, DWORD, WINAPI, GetCompressedFileSizeW, 0, (\n    IN LPCWSTR lpFileName,\n    OUT LPDWORD lpFileSizeHigh),\n    (lpFileName, lpFileSizeHigh));\n#define GetCompressedFileSizeW apr_winapi_GetCompressedFileSizeW\n\n\nAPR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, LONG, WINAPI, NtQueryTimerResolution, 0, (\n    ULONG *pMaxRes,  /* Minimum NS Resolution */\n    ULONG *pMinRes,  /* Maximum NS Resolution */\n    ULONG *pCurRes), /* Current NS Resolution */\n    (pMaxRes, pMinRes, pCurRes));\n#define QueryTimerResolution apr_winapi_NtQueryTimerResolution\n\nAPR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, LONG, WINAPI, NtSetTimerResolution, 0, (\n    ULONG ReqRes,    /* Requested NS Clock Resolution */\n    BOOL  Acquire,   /* Aquire (1) or Release (0) our interest */\n    ULONG *pNewRes), /* The NS Clock Resolution granted */\n    (ReqRes, Acquire, pNewRes));\n#define SetTimerResolution apr_winapi_NtSetTimerResolution\n\ntypedef struct PBI {\n    LONG      ExitStatus;\n    PVOID     PebBaseAddress;\n    apr_uintptr_t AffinityMask;\n    LONG      BasePriority;\n    apr_uintptr_t UniqueProcessId;\n    apr_uintptr_t InheritedFromUniqueProcessId;\n} PBI, *PPBI;\n\nAPR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, LONG, WINAPI, NtQueryInformationProcess, 0, (\n    HANDLE hProcess,  /* Obvious */\n    INT   info,       /* Use 0 for PBI documented above */\n    PVOID pPI,        /* The PIB buffer */\n    ULONG LenPI,      /* Use sizeof(PBI) */\n    ULONG *pSizePI),  /* returns pPI buffer used (may pass NULL) */\n    (hProcess, info, pPI, LenPI, pSizePI));\n#define QueryInformationProcess apr_winapi_NtQueryInformationProcess\n\nAPR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, LONG, WINAPI, NtQueryObject, 0, (\n    HANDLE hObject,   /* Obvious */\n    INT   info,       /* Use 0 for PBI documented above */\n    PVOID pOI,        /* The PIB buffer */\n    ULONG LenOI,      /* Use sizeof(PBI) */\n    ULONG *pSizeOI),  /* returns pPI buffer used (may pass NULL) */\n    (hObject, info, pOI, LenOI, pSizeOI));\n#define QueryObject apr_winapi_NtQueryObject\n\ntypedef struct IOSB {\n    union {\n    UINT Status;\n    PVOID reserved;\n    };\n    apr_uintptr_t Information; /* Varies by op, consumed buffer size for FSI below */\n} IOSB, *PIOSB;\n\ntypedef struct FSI {\n    LONGLONG AllocationSize;\n    LONGLONG EndOfFile;\n    ULONG    NumberOfLinks;\n    BOOL     DeletePending;\n    BOOL     Directory;\n} FSI, *PFSI;\n\nAPR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, LONG, WINAPI, ZwQueryInformationFile, 0, (\n    HANDLE hObject,    /* Obvious */\n    PVOID  pIOSB,      /* Point to the IOSB buffer for detailed return results */\n    PVOID  pFI,        /* The buffer, using FIB above */\n    ULONG  LenFI,      /* Use sizeof(FI) */\n    ULONG  info),      /* Use 5 for FSI documented above*/\n    (hObject, pIOSB, pFI, LenFI, info));\n#define ZwQueryInformationFile apr_winapi_ZwQueryInformationFile\n\n#ifdef CreateToolhelp32Snapshot\n#undef CreateToolhelp32Snapshot\n#endif\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, HANDLE, WINAPI, CreateToolhelp32Snapshot, 0, (\n    DWORD dwFlags,\n    DWORD th32ProcessID),\n    (dwFlags, th32ProcessID));\n#define CreateToolhelp32Snapshot apr_winapi_CreateToolhelp32Snapshot\n\n#ifdef Process32FirstW\n#undef Process32FirstW\n#endif\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, Process32FirstW, 0, (\n    HANDLE hSnapshot,\n    LPPROCESSENTRY32W lppe),\n    (hSnapshot, lppe));\n#define Process32FirstW apr_winapi_Process32FirstW\n\n#ifdef Process32NextW\n#undef Process32NextW\n#endif\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, Process32NextW, 0, (\n    HANDLE hSnapshot,\n    LPPROCESSENTRY32W lppe),\n    (hSnapshot, lppe));\n#define Process32NextW apr_winapi_Process32NextW\n\n#if !defined(POLLERR)\n/* Event flag definitions for WSAPoll(). */\n#define POLLRDNORM  0x0100\n#define POLLRDBAND  0x0200\n#define POLLIN      (POLLRDNORM | POLLRDBAND)\n#define POLLPRI     0x0400\n\n#define POLLWRNORM  0x0010\n#define POLLOUT     (POLLWRNORM)\n#define POLLWRBAND  0x0020\n\n#define POLLERR     0x0001\n#define POLLHUP     0x0002\n#define POLLNVAL    0x0004\n\ntypedef struct pollfd {\n    SOCKET  fd;\n    SHORT   events;\n    SHORT   revents;\n\n} WSAPOLLFD, *PWSAPOLLFD, FAR *LPWSAPOLLFD;\n\n#endif /* !defined(POLLERR) */\n#ifdef WSAPoll\n#undef WSAPoll\n#endif\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINSOCK2API, int, WSAAPI, WSAPoll, 0, (\n    IN OUT LPWSAPOLLFD fdArray,\n    IN ULONG fds,\n    IN INT timeout),\n    (fdArray, fds, timeout));\n#define WSAPoll apr_winapi_WSAPoll\n#define HAVE_POLL   1\n\n#ifdef SetDllDirectoryW\n#undef SetDllDirectoryW\n#endif\nAPR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, SetDllDirectoryW, 0, (\n    IN LPCWSTR lpPathName),\n    (lpPathName));\n#define SetDllDirectoryW apr_winapi_SetDllDirectoryW\n\n#endif /* !defined(_WIN32_WCE) */\n\n#endif  /* ! MISC_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_arch_networkio.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef NETWORK_IO_H\n#define NETWORK_IO_H\n\n#include \"apr_network_io.h\"\n#include \"apr_general.h\"\n#include \"apr_poll.h\"\n\ntypedef struct sock_userdata_t sock_userdata_t;\nstruct sock_userdata_t {\n    sock_userdata_t *next;\n    const char *key;\n    void *data;\n};\n\nstruct apr_socket_t {\n    apr_pool_t         *pool;\n    SOCKET              socketdes;\n    int                 type; /* SOCK_STREAM, SOCK_DGRAM */\n    int                 protocol;\n    apr_sockaddr_t     *local_addr;\n    apr_sockaddr_t     *remote_addr;\n    int                 timeout_ms; /* MUST MATCH if timeout > 0 */\n    apr_interval_time_t timeout;\n    apr_int32_t         disconnected;\n    int                 local_port_unknown;\n    int                 local_interface_unknown;\n    int                 remote_addr_unknown;\n    apr_int32_t         options;\n    apr_int32_t         inherit;\n#if APR_HAS_SENDFILE\n    /* As of 07.20.04, the overlapped structure is only used by \n     * apr_socket_sendfile and that's where it will be allocated \n     * and initialized.\n     */\n    OVERLAPPED         *overlapped;\n#endif\n    sock_userdata_t    *userdata;\n\n    /* if there is a timeout set, then this pollset is used */\n    apr_pollset_t *pollset;\n};\n\n#ifdef _WIN32_WCE\n#ifndef WSABUF\ntypedef struct _WSABUF {\n    u_long      len;     /* the length of the buffer */\n    char FAR *  buf;     /* the pointer to the buffer */\n} WSABUF, FAR * LPWSABUF;\n#endif\n#else\n#ifdef _MSC_VER\n#define HAVE_STRUCT_IPMREQ\n#endif\n#endif\n\napr_status_t status_from_res_error(int);\n\nconst char *apr_inet_ntop(int af, const void *src, char *dst, apr_size_t size);\nint apr_inet_pton(int af, const char *src, void *dst);\nvoid apr_sockaddr_vars_set(apr_sockaddr_t *, int, apr_port_t);\n\n#define apr_is_option_set(skt, option)  \\\n    (((skt)->options & (option)) == (option))\n\n#define apr_set_option(skt, option, on) \\\n    do {                                 \\\n        if (on)                          \\\n            (skt)->options |= (option);         \\\n        else                             \\\n            (skt)->options &= ~(option);        \\\n    } while (0)\n\n#endif  /* ! NETWORK_IO_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_arch_proc_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef PROC_MUTEX_H\n#define PROC_MUTEX_H\n\n#include \"apr_proc_mutex.h\"\n\nstruct apr_proc_mutex_t {\n    apr_pool_t *pool;\n    HANDLE handle;\n    const char *fname;\n};\n\n#endif  /* PROC_MUTEX_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_arch_thread_cond.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_COND_H\n#define THREAD_COND_H\n\n#include \"apr_thread_cond.h\"\n\nstruct apr_thread_cond_t {\n    apr_pool_t *pool;\n    HANDLE semaphore;\n    CRITICAL_SECTION csection;\n    unsigned long num_waiting;\n    unsigned long num_wake;\n    unsigned long generation;\n};\n\n#endif  /* THREAD_COND_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_arch_thread_mutex.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_MUTEX_H\n#define THREAD_MUTEX_H\n\n#include \"apr_pools.h\"\n\ntypedef enum thread_mutex_type {\n    thread_mutex_critical_section,\n    thread_mutex_unnested_event,\n    thread_mutex_nested_mutex\n} thread_mutex_type;\n\n/* handle applies only to unnested_event on all platforms \n * and nested_mutex on Win9x only.  Otherwise critical_section \n * is used for NT nexted mutexes providing optimal performance.\n */\nstruct apr_thread_mutex_t {\n    apr_pool_t       *pool;\n    thread_mutex_type type;\n    HANDLE            handle;\n    CRITICAL_SECTION  section;\n};\n\n#endif  /* THREAD_MUTEX_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_arch_thread_rwlock.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef THREAD_RWLOCK_H\n#define THREAD_RWLOCK_H\n\n#include \"apr_thread_rwlock.h\"\n\nstruct apr_thread_rwlock_t {\n    apr_pool_t *pool;\n    HANDLE      write_mutex;\n    HANDLE      read_event;\n    LONG        readers;\n};\n\n#endif  /* THREAD_RWLOCK_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_arch_threadproc.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"apr_private.h\"\n#include \"apr_thread_proc.h\"\n#include \"apr_file_io.h\"\n\n#ifndef THREAD_PROC_H\n#define THREAD_PROC_H\n\n#define SHELL_PATH \"cmd.exe\"\n\nstruct apr_thread_t {\n    apr_pool_t *pool;\n    HANDLE td;\n    apr_int32_t cancel;\n    apr_int32_t cancel_how;\n    void *data;\n    apr_thread_start_t func;\n    apr_status_t exitval;\n};\n\nstruct apr_threadattr_t {\n    apr_pool_t *pool;\n    apr_int32_t detach;\n    apr_size_t stacksize;\n};\n\nstruct apr_threadkey_t {\n    apr_pool_t *pool;\n    DWORD key;\n};\n\nstruct apr_procattr_t {\n    apr_pool_t *pool;\n    apr_file_t *parent_in;\n    apr_file_t *child_in;\n    apr_file_t *parent_out;\n    apr_file_t *child_out;\n    apr_file_t *parent_err;\n    apr_file_t *child_err;\n    char *currdir;\n    apr_int32_t cmdtype;\n    apr_int32_t detached;\n    apr_child_errfn_t *errfn;\n    apr_int32_t errchk;\n#ifndef _WIN32_WCE\n    HANDLE     user_token;\n    LPSECURITY_ATTRIBUTES   sa;\n    LPVOID                  sd;\n#endif\n};\n\nstruct apr_thread_once_t {\n    long value;\n};\n\nextern apr_status_t apr_threadproc_init(apr_pool_t *pool);\n\n#endif  /* ! THREAD_PROC_H */\n\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_arch_utf8.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef UTF8_H\n#define UTF8_H\n\n#include \"apr.h\"\n#include \"apr_lib.h\"\n#include \"apr_errno.h\"\n\n/* If we ever support anything more exciting than char... this could move.\n */\ntypedef apr_uint16_t apr_wchar_t;\n\n/**\n * An APR internal function for fast utf-8 octet-encoded Unicode conversion\n * to the ucs-2 wide Unicode format.  This function is used for filename and \n * other resource conversions for platforms providing native Unicode support.\n *\n * @tip Only the errors APR_EINVAL and APR_INCOMPLETE may occur, the former\n * when the character code is invalid (in or out of context) and the later\n * when more characters were expected, but insufficient characters remain.\n */\nAPR_DECLARE(apr_status_t) apr_conv_utf8_to_ucs2(const char *in, \n                                                apr_size_t *inbytes,\n                                                apr_wchar_t *out, \n                                                apr_size_t *outwords);\n\n/**\n * An APR internal function for fast ucs-2 wide Unicode format conversion to \n * the utf-8 octet-encoded Unicode.  This function is used for filename and \n * other resource conversions for platforms providing native Unicode support.\n *\n * @tip Only the errors APR_EINVAL and APR_INCOMPLETE may occur, the former\n * when the character code is invalid (in or out of context) and the later\n * when more words were expected, but insufficient words remain.\n */\nAPR_DECLARE(apr_status_t) apr_conv_ucs2_to_utf8(const apr_wchar_t *in, \n                                                apr_size_t *inwords,\n                                                char *out, \n                                                apr_size_t *outbytes);\n\n#endif /* def UTF8_H */\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_dbg_win32_handles.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_DBG_WIN32_HANDLES_H\n#define APR_DBG_WIN32_HANDLES_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* USAGE:\n * \n * Add the following include to apr_private.h for internal debugging,\n * or copy this header into apr/include add the include below to apr.h\n * for really global debugging;\n *\n *   #include \"apr_dbg_win32_handles.h\"\n *\n * apr_dbg_log is the crux of this function ... it uses Win32 API and\n * no apr calls itself to log all activity to a file named for the\n * executing application with a .pid suffix.  Ergo several instances\n * may be executing and logged at once.\n *\n * HANDLE apr_dbg_log(char* fn, HANDLE ha, char* fl, int ln, int nh \n *                           [, HANDLE *hv, char *dsc...])\n *\n * returns: the handle passed in ha, which is cast back to the real return type.\n *\n * formats one line into the debug log file if nh is zero;\n * ha (hex) seq(hex) tid(hex) fn     fl         ln\n * xxxxxxxx xxxxxxxx xxxxxxxx func() sourcefile:lineno\n * The macro apr_dbg_rv makes this simple to implement for many APIs\n * that simply take args that don't interest us, and return a handle.\n *\n * formats multiple lines (nh) into the debug log file for each hv/dsc pair\n * (nh must correspond to the number of pairs);\n * hv (hex) seq(hex) tid(hex) fn   dsc  fl         ln\n * xxxxxxxx xxxxxxxx xxxxxxxx func(arg) sourcefile:lineno\n * In this later usage, hv is the still the return value but is not\n * treated as a handle.\n */\n\nAPR_DECLARE_NONSTD(HANDLE) apr_dbg_log(char* fn, HANDLE ha, char* fl, int ln, \n                                       int nh,/* HANDLE *hv, char *dsc */...);\n\n#define apr_dbg_rv(fn, args) (apr_dbg_log(#fn,(fn) args,__FILE__,__LINE__,0))\n\n#define CloseHandle(h) \\\n    ((BOOL)apr_dbg_log(\"CloseHandle\", \\\n                       (HANDLE)(CloseHandle)(h), \\\n                       __FILE__,__LINE__,1, \\\n                       &(h),\"\"))\n\n#define CreateEventA(sd,b1,b2,nm) apr_dbg_rv(CreateEventA,(sd,b1,b2,nm))\n#define CreateEventW(sd,b1,b2,nm) apr_dbg_rv(CreateEventW,(sd,b1,b2,nm))\n\n#define CreateFileA(nm,d1,d2,sd,d3,d4,h) apr_dbg_rv(CreateFileA,(nm,d1,d2,sd,d3,d4,h))\n#define CreateFileW(nm,d1,d2,sd,d3,d4,h) apr_dbg_rv(CreateFileW,(nm,d1,d2,sd,d3,d4,h))\n\n#define CreateFileMappingA(fh,sd,d1,d2,d3,nm) apr_dbg_rv(CreateFileMappingA,(fh,sd,d1,d2,d3,nm))\n#define CreateFileMappingW(fh,sd,d1,d2,d3,nm) apr_dbg_rv(CreateFileMappingW,(fh,sd,d1,d2,d3,nm))\n\n#define CreateMutexA(sd,b,nm) apr_dbg_rv(CreateMutexA,(sd,b,nm))\n#define CreateMutexW(sd,b,nm) apr_dbg_rv(CreateMutexW,(sd,b,nm))\n\n#define CreateIoCompletionPort(h1,h2,pd1,d2) apr_dbg_rv(CreateIoCompletionPort,(h1,h2,pd1,d2))\n\n#define CreateNamedPipeA(nm,d1,d2,d3,d4,d5,d6,sd) apr_dbg_rv(CreateNamedPipeA,(nm,d1,d2,d3,d4,d5,d6,sd))\n#define CreateNamedPipeW(nm,d1,d2,d3,d4,d5,d6,sd) apr_dbg_rv(CreateNamedPipeW,(nm,d1,d2,d3,d4,d5,d6,sd))\n\n#define CreatePipe(ph1,ph2,sd,d) \\\n    ((BOOL)apr_dbg_log(\"CreatePipe\", \\\n                       (HANDLE)(CreatePipe)(ph1,ph2,sd,d), \\\n                       __FILE__,__LINE__,2, \\\n                       (ph1),\"hRead\", \\\n                       (ph2),\"hWrite\"))\n\n#define CreateProcessA(s1,s2,sd1,sd2,b,d1,s3,s4,pd2,hr) \\\n    ((BOOL)apr_dbg_log(\"CreateProcessA\", \\\n                       (HANDLE)(CreateProcessA)(s1,s2,sd1,sd2,b,d1,s3,s4,pd2,hr), \\\n                       __FILE__,__LINE__,2, \\\n                       &((hr)->hProcess),\"hProcess\", \\\n                       &((hr)->hThread),\"hThread\"))\n#define CreateProcessW(s1,s2,sd1,sd2,b,d1,s3,s4,pd2,hr) \\\n    ((BOOL)apr_dbg_log(\"CreateProcessW\", \\\n                       (HANDLE)(CreateProcessW)(s1,s2,sd1,sd2,b,d1,s3,s4,pd2,hr), \\\n                       __FILE__,__LINE__,2, \\\n                       &((hr)->hProcess),\"hProcess\", \\\n                       &((hr)->hThread),\"hThread\"))\n\n#define CreateSemaphoreA(sd,d1,d2,nm) apr_dbg_rv(CreateSemaphoreA,(sd,d1,d2,nm))\n#define CreateSemaphoreW(sd,d1,d2,nm) apr_dbg_rv(CreateSemaphoreW,(sd,d1,d2,nm))\n\n#define CreateThread(sd,d1,fn,pv,d2,pd3) apr_dbg_rv(CreateThread,(sd,d1,fn,pv,d2,pd3))\n\n#define DeregisterEventSource(h) \\\n    ((BOOL)apr_dbg_log(\"DeregisterEventSource\", \\\n                       (HANDLE)(DeregisterEventSource)(h), \\\n                       __FILE__,__LINE__,1, \\\n                       &(h),\"\"))\n\n#define DuplicateHandle(h1,h2,h3,ph4,d1,b,d2) \\\n    ((BOOL)apr_dbg_log(\"DuplicateHandle\", \\\n                       (HANDLE)(DuplicateHandle)(h1,h2,h3,ph4,d1,b,d2), \\\n                       __FILE__,__LINE__,2, \\\n                       (ph4),((h3)==GetCurrentProcess()) \\\n                                   ? \"Target\" : \"EXTERN Target\", \\\n                       &(h2),((h1)==GetCurrentProcess()) \\\n                                 ? \"Source\" : \"EXTERN Source\"))\n\n#define GetCurrentProcess() \\\n    (apr_dbg_log(\"GetCurrentProcess\", \\\n                 (GetCurrentProcess)(),__FILE__,__LINE__,0))\n\n#define GetCurrentThread() \\\n    (apr_dbg_log(\"GetCurrentThread\", \\\n                 (GetCurrentThread)(),__FILE__,__LINE__,0))\n\n#define GetModuleHandleA(nm) apr_dbg_rv(GetModuleHandleA,(nm))\n#define GetModuleHandleW(nm) apr_dbg_rv(GetModuleHandleW,(nm))\n\n#define GetStdHandle(d) apr_dbg_rv(GetStdHandle,(d))\n\n#define LoadLibraryA(nm) apr_dbg_rv(LoadLibraryA,(nm))\n#define LoadLibraryW(nm) apr_dbg_rv(LoadLibraryW,(nm))\n\n#define LoadLibraryExA(nm,h,d) apr_dbg_rv(LoadLibraryExA,(nm,h,d))\n#define LoadLibraryExW(nm,h,d) apr_dbg_rv(LoadLibraryExW,(nm,h,d))\n\n#define OpenEventA(d,b,nm) apr_dbg_rv(OpenEventA,(d,b,nm))\n#define OpenEventW(d,b,nm) apr_dbg_rv(OpenEventW,(d,b,nm))\n\n#define OpenFileMappingA(d,b,nm) apr_dbg_rv(OpenFileMappingA,(d,b,nm))\n#define OpenFileMappingW(d,b,nm) apr_dbg_rv(OpenFileMappingW,(d,b,nm))\n\n#define RegisterEventSourceA(s1,s2) apr_dbg_rv(RegisterEventSourceA,(s1,s2))\n#define RegisterEventSourceW(s1,s2) apr_dbg_rv(RegisterEventSourceW,(s1,s2))\n\n#define SetEvent(h) \\\n    ((BOOL)apr_dbg_log(\"SetEvent\", \\\n                       (HANDLE)(SetEvent)(h), \\\n                       __FILE__,__LINE__,1, \\\n                       &(h),\"\"))\n\n#define SetStdHandle(d,h) \\\n    ((BOOL)apr_dbg_log(\"SetStdHandle\", \\\n                       (HANDLE)(SetStdHandle)(d,h), \\\n                       __FILE__,__LINE__,1,&(h),\"\"))\n\n#define socket(i1,i2,i3) \\\n    ((SOCKET)apr_dbg_log(\"socket\", \\\n                         (HANDLE)(socket)(i1,i2,i3), \\\n                       __FILE__,__LINE__,0))\n\n#define WaitForSingleObject(h,d) \\\n    ((DWORD)apr_dbg_log(\"WaitForSingleObject\", \\\n                        (HANDLE)(WaitForSingleObject)(h,d), \\\n                        __FILE__,__LINE__,1,&(h),\"Signaled\"))\n\n#define WaitForSingleObjectEx(h,d,b) \\\n    ((DWORD)apr_dbg_log(\"WaitForSingleObjectEx\", \\\n                        (HANDLE)(WaitForSingleObjectEx)(h,d,b), \\\n                        __FILE__,__LINE__,1,&(h),\"Signaled\"))\n\n#define WaitForMultipleObjects(d1,ah,b,d2) \\\n    ((DWORD)apr_dbg_log(\"WaitForMultipleObjects\", \\\n                        (HANDLE)(WaitForMultipleObjects)(d1,ah,b,d2), \\\n                        __FILE__,__LINE__,1,ah,\"Signaled\"))\n\n#define WaitForMultipleObjectsEx(d1,ah,b1,d2,b2) \\\n    ((DWORD)apr_dbg_log(\"WaitForMultipleObjectsEx\", \\\n                        (HANDLE)(WaitForMultipleObjectsEx)(d1,ah,b1,d2,b2), \\\n                        __FILE__,__LINE__,1,ah,\"Signaled\"))\n\n#define WSASocketA(i1,i2,i3,pi,g,dw) \\\n    ((SOCKET)apr_dbg_log(\"WSASocketA\", \\\n                         (HANDLE)(WSASocketA)(i1,i2,i3,pi,g,dw), \\\n                       __FILE__,__LINE__,0))\n\n#define WSASocketW(i1,i2,i3,pi,g,dw) \\\n    ((SOCKET)apr_dbg_log(\"WSASocketW\", \\\n                         (HANDLE)(WSASocketW)(i1,i2,i3,pi,g,dw), \\\n                       __FILE__,__LINE__,0))\n\n#define closesocket(sh) \\\n    ((int)apr_dbg_log(\"closesocket\", \\\n                      (HANDLE)(closesocket)(sh), \\\n                      __FILE__,__LINE__,1,&(sh),\"\"))\n\n#define _beginthread(fn,d,pv) \\\n    ((unsigned long)apr_dbg_log(\"_beginthread\", \\\n                                (HANDLE)(_beginthread)(fn,d,pv), \\\n                                __FILE__,__LINE__,0))\n\n#define _beginthreadex(sd,d1,fn,pv,d2,pd3) \\\n    ((unsigned long)apr_dbg_log(\"_beginthreadex\", \\\n                                (HANDLE)(_beginthreadex)(sd,d1,fn,pv,d2,pd3), \\\n                                __FILE__,__LINE__,0))\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* !defined(APR_DBG_WIN32_HANDLES_H) */\n"
  },
  {
    "path": "third_party/include/apr/arch/win32/apr_private.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Note: \n * This is the windows specific autoconf-like config file\n * which unix would create at build time.\n */\n\n#ifdef WIN32\n\n#ifndef APR_PRIVATE_H\n#define APR_PRIVATE_H\n\n/* Include the public APR symbols, include our idea of the 'right'\n * subset of the Windows.h header.  This saves us repetition.\n */\n#include \"apr.h\"\n\n/* \n * Add a _very_few_ declarations missing from the restricted set of headers\n * (If this list becomes extensive, re-enable the required headers above!)\n * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now\n */\n#ifndef SW_HIDE\n#define SW_HIDE             0\n#endif\n\n/* For the misc.h late-loaded dynamic symbols, we need some obscure types \n * Avoid dragging in wtypes.h unless it's absolutely necessary [generally\n * not with APR itself, until some GUI-related security is introduced.]\n */\n#ifndef _WIN32_WCE\n#define HAVE_ACLAPI 1\n#ifdef __wtypes_h__\n#include <accctrl.h>\n#else\n#define __wtypes_h__\n#include <accctrl.h>\n#undef __wtypes_h__\n#endif\n#else\n#define HAVE_ACLAPI 0\n#endif\n\n#if APR_HAVE_SYS_TYPES_H\n#include <sys/types.h>\n#endif\n#if APR_HAVE_STDDEF_H\n#include <stddef.h>\n#endif\n#include <stdio.h>\n#if APR_HAVE_TIME_H\n#include <time.h>\n#endif\n\n/* Use this section to define all of the HAVE_FOO_H\n * that are required to build properly.\n */\n#define HAVE_LIMITS_H 1\n#define HAVE_MALLOC_H 1\n#define HAVE_SIGNAL_H 1\n/* #define HAVE_STDDEF_H 1 why not? */\n#define HAVE_STDLIB_H 1\n\n#define HAVE_STRICMP  1\n#define HAVE_STRNICMP 1\n#define HAVE_STRDUP   1\n#define HAVE_STRSTR   1\n#define HAVE_MEMCHR   1\n\n#define SIGHUP     1\n/* 2 is used for SIGINT on windows */\n#define SIGQUIT    3\n/* 4 is used for SIGILL on windows */\n#define SIGTRAP    5\n#define SIGIOT     6\n#define SIGBUS     7\n/* 8 is used for SIGFPE on windows */\n#define SIGKILL    9\n#define SIGUSR1    10\n/* 11 is used for SIGSEGV on windows */\n#define SIGUSR2    12\n#define SIGPIPE    13\n#define SIGALRM    14\n/* 15 is used for SIGTERM on windows */\n#define SIGSTKFLT  16\n#define SIGCHLD    17 \n#define SIGCONT    18\n#define SIGSTOP    19\n#define SIGTSTP    20\n/* 21 is used for SIGBREAK on windows */\n/* 22 is used for SIGABRT on windows */\n#define SIGTTIN    23\n#define SIGTTOU    24\n#define SIGURG     25\n#define SIGXCPU    26\n#define SIGXFSZ    27\n#define SIGVTALRM  28\n#define SIGPROF    29\n#define SIGWINCH   30\n#define SIGIO      31\n\n/* APR COMPATABILITY FUNCTIONS\n * This section should be used to define functions and\n * macros which are need to make Windows features look\n * like POSIX features.\n */\ntypedef void (Sigfunc)(int);\n\n#define sleep(t)                 Sleep((t) * 1000)\n\n#define SIZEOF_SHORT           2\n#define SIZEOF_INT             4\n#define SIZEOF_LONGLONG        8\n#define SIZEOF_CHAR            1\n#define SIZEOF_SSIZE_T         SIZEOF_INT\n\nunsigned __stdcall SignalHandling(void *);\nint thread_ready(void);\n\n#if !APR_HAVE_ERRNO_H\nAPR_DECLARE_DATA int errno;\n#define ENOSPC 1\n#endif\n\n#if APR_HAVE_IPV6\n#define HAVE_GETADDRINFO 1\n#define HAVE_GETNAMEINFO 1\n#endif\n\n/* MSVC 7.0 introduced _strtoi64 */\n#if _MSC_VER >= 1300 && _INTEGRAL_MAX_BITS >= 64 && !defined(_WIN32_WCE)\n#define APR_INT64_STRFN\t      _strtoi64\n#endif\n\n#if APR_HAS_LARGE_FILES\n#ifdef APR_INT64_STRFN\n#define APR_OFF_T_STRFN         APR_INT64_STRFN\n#else\n#define APR_OFF_T_STRFN         apr_strtoi64\n#endif\n#else\n#if defined(_WIN32_WCE)\n#define APR_OFF_T_STRFN         strtol\n#else\n#define APR_OFF_T_STRFN         strtoi\n#endif\n#endif\n\n/* used to check for DWORD overflow in 64bit compiles */\n#define APR_DWORD_MAX 0xFFFFFFFFUL\n\n/*\n * Include common private declarations.\n */\n#include \"../apr_private_common.h\"\n\n#endif  /*APR_PRIVATE_H*/\n#endif  /*WIN32*/\n"
  },
  {
    "path": "third_party/include/aprutil/apr_anylock.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @file apr_anylock.h\n * @brief APR-Util transparent any lock flavor wrapper\n */\n#ifndef APR_ANYLOCK_H\n#define APR_ANYLOCK_H\n\n#include \"apr_proc_mutex.h\"\n#include \"apr_thread_mutex.h\"\n#include \"apr_thread_rwlock.h\"\n\n/** Structure that may contain any APR lock type */\ntypedef struct apr_anylock_t {\n    /** Indicates what type of lock is in lock */\n    enum tm_lock {\n        apr_anylock_none,           /**< None */\n        apr_anylock_procmutex,      /**< Process-based */\n        apr_anylock_threadmutex,    /**< Thread-based */\n        apr_anylock_readlock,       /**< Read lock */\n        apr_anylock_writelock       /**< Write lock */\n    } type;\n    /** Union of all possible APR locks */\n    union apr_anylock_u_t {\n        apr_proc_mutex_t *pm;       /**< Process mutex */\n#if APR_HAS_THREADS\n        apr_thread_mutex_t *tm;     /**< Thread mutex */\n        apr_thread_rwlock_t *rw;    /**< Read-write lock */\n#endif\n    } lock;\n} apr_anylock_t;\n\n#if APR_HAS_THREADS\n\n/** Lock an apr_anylock_t structure */\n#define APR_ANYLOCK_LOCK(lck)                \\\n    (((lck)->type == apr_anylock_none)         \\\n      ? APR_SUCCESS                              \\\n      : (((lck)->type == apr_anylock_threadmutex)  \\\n          ? apr_thread_mutex_lock((lck)->lock.tm)    \\\n          : (((lck)->type == apr_anylock_procmutex)    \\\n              ? apr_proc_mutex_lock((lck)->lock.pm)      \\\n              : (((lck)->type == apr_anylock_readlock)     \\\n                  ? apr_thread_rwlock_rdlock((lck)->lock.rw) \\\n                  : (((lck)->type == apr_anylock_writelock)    \\\n                      ? apr_thread_rwlock_wrlock((lck)->lock.rw) \\\n                      : APR_EINVAL)))))\n\n#else /* APR_HAS_THREADS */\n\n#define APR_ANYLOCK_LOCK(lck)                \\\n    (((lck)->type == apr_anylock_none)         \\\n      ? APR_SUCCESS                              \\\n          : (((lck)->type == apr_anylock_procmutex)    \\\n              ? apr_proc_mutex_lock((lck)->lock.pm)      \\\n                      : APR_EINVAL))\n\n#endif /* APR_HAS_THREADS */\n\n#if APR_HAS_THREADS\n\n/** Try to lock an apr_anylock_t structure */\n#define APR_ANYLOCK_TRYLOCK(lck)                \\\n    (((lck)->type == apr_anylock_none)            \\\n      ? APR_SUCCESS                                 \\\n      : (((lck)->type == apr_anylock_threadmutex)     \\\n          ? apr_thread_mutex_trylock((lck)->lock.tm)    \\\n          : (((lck)->type == apr_anylock_procmutex)       \\\n              ? apr_proc_mutex_trylock((lck)->lock.pm)      \\\n              : (((lck)->type == apr_anylock_readlock)        \\\n                  ? apr_thread_rwlock_tryrdlock((lck)->lock.rw) \\\n                  : (((lck)->type == apr_anylock_writelock)       \\\n                      ? apr_thread_rwlock_trywrlock((lck)->lock.rw) \\\n                          : APR_EINVAL)))))\n\n#else /* APR_HAS_THREADS */\n\n#define APR_ANYLOCK_TRYLOCK(lck)                \\\n    (((lck)->type == apr_anylock_none)            \\\n      ? APR_SUCCESS                                 \\\n          : (((lck)->type == apr_anylock_procmutex)       \\\n              ? apr_proc_mutex_trylock((lck)->lock.pm)      \\\n                          : APR_EINVAL))\n\n#endif /* APR_HAS_THREADS */\n\n#if APR_HAS_THREADS\n\n/** Unlock an apr_anylock_t structure */\n#define APR_ANYLOCK_UNLOCK(lck)              \\\n    (((lck)->type == apr_anylock_none)         \\\n      ? APR_SUCCESS                              \\\n      : (((lck)->type == apr_anylock_threadmutex)  \\\n          ? apr_thread_mutex_unlock((lck)->lock.tm)  \\\n          : (((lck)->type == apr_anylock_procmutex)    \\\n              ? apr_proc_mutex_unlock((lck)->lock.pm)    \\\n              : ((((lck)->type == apr_anylock_readlock) || \\\n                  ((lck)->type == apr_anylock_writelock))    \\\n                  ? apr_thread_rwlock_unlock((lck)->lock.rw)   \\\n                      : APR_EINVAL))))\n\n#else /* APR_HAS_THREADS */\n\n#define APR_ANYLOCK_UNLOCK(lck)              \\\n    (((lck)->type == apr_anylock_none)         \\\n      ? APR_SUCCESS                              \\\n          : (((lck)->type == apr_anylock_procmutex)    \\\n              ? apr_proc_mutex_unlock((lck)->lock.pm)    \\\n                      : APR_EINVAL))\n\n#endif /* APR_HAS_THREADS */\n\n#endif /* !APR_ANYLOCK_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_base64.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * The apr_vsnprintf/apr_snprintf functions are based on, and used with the\n * permission of, the  SIO stdio-replacement strx_* functions by Panos\n * Tsirigotis <panos@alumni.cs.colorado.edu> for xinetd.\n */\n\n/**\n * @file apr_base64.h\n * @brief APR-UTIL Base64 Encoding\n */\n#ifndef APR_BASE64_H\n#define APR_BASE64_H\n\n#include \"apu.h\"\n#include \"apr_general.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @defgroup APR_Util_Base64 Base64 Encoding\n * @ingroup APR_Util\n * @{\n */\n\n/* Simple BASE64 encode/decode functions.\n * \n * As we might encode binary strings, hence we require the length of\n * the incoming plain source. And return the length of what we decoded.\n *\n * The decoding function takes any non valid char (i.e. whitespace, \\0\n * or anything non A-Z,0-9 etc as terminal.\n * \n * plain strings/binary sequences are not assumed '\\0' terminated. Encoded\n * strings are neither. But probably should.\n *\n */\n\n/**\n * Given the length of an un-encoded string, get the length of the\n * encoded string.\n * @param len the length of an unencoded string.\n * @return the length of the string after it is encoded, including the\n * trailing \\0\n */ \nAPU_DECLARE(int) apr_base64_encode_len(int len);\n\n/**\n * Encode a text string using base64encoding.\n * @param coded_dst The destination string for the encoded string.\n * @param plain_src The original string in plain text\n * @param len_plain_src The length of the plain text string\n * @return the length of the encoded string\n */ \nAPU_DECLARE(int) apr_base64_encode(char * coded_dst, const char *plain_src, \n                                 int len_plain_src);\n\n/**\n * Encode an EBCDIC string using base64encoding.\n * @param coded_dst The destination string for the encoded string.\n * @param plain_src The original string in plain text\n * @param len_plain_src The length of the plain text string\n * @return the length of the encoded string\n */ \nAPU_DECLARE(int) apr_base64_encode_binary(char * coded_dst, \n                                        const unsigned char *plain_src,\n                                        int len_plain_src);\n\n/**\n * Determine the maximum buffer length required to decode the plain text\n * string given the encoded string.\n * @param coded_src The encoded string\n * @return the maximum required buffer length for the plain text string\n */ \nAPU_DECLARE(int) apr_base64_decode_len(const char * coded_src);\n\n/**\n * Decode a string to plain text\n * @param plain_dst The destination string for the plain text\n * @param coded_src The encoded string \n * @return the length of the plain text string\n */ \nAPU_DECLARE(int) apr_base64_decode(char * plain_dst, const char *coded_src);\n\n/**\n * Decode an EBCDIC string to plain text\n * @param plain_dst The destination string for the plain text\n * @param coded_src The encoded string \n * @return the length of the plain text string\n */ \nAPU_DECLARE(int) apr_base64_decode_binary(unsigned char * plain_dst, \n                                        const char *coded_src);\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif\t/* !APR_BASE64_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_buckets.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file apr_buckets.h\n * @brief APR-UTIL Buckets/Bucket Brigades\n */\n\n#ifndef APR_BUCKETS_H\n#define APR_BUCKETS_H\n\n#if defined(APR_BUCKET_DEBUG) && !defined(APR_RING_DEBUG)\n#define APR_RING_DEBUG\n#endif\n\n#include \"apu.h\"\n#include \"apr_network_io.h\"\n#include \"apr_file_io.h\"\n#include \"apr_general.h\"\n#include \"apr_mmap.h\"\n#include \"apr_errno.h\"\n#include \"apr_ring.h\"\n#include \"apr.h\"\n#if APR_HAVE_SYS_UIO_H\n#include <sys/uio.h>\t/* for struct iovec */\n#endif\n#if APR_HAVE_STDARG_H\n#include <stdarg.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @defgroup APR_Util_Bucket_Brigades Bucket Brigades\n * @ingroup APR_Util\n * @{ \n */\n\n/** default bucket buffer size - 8KB minus room for memory allocator headers */\n#define APR_BUCKET_BUFF_SIZE 8000\n\n/** Determines how a bucket or brigade should be read */\ntypedef enum {\n    APR_BLOCK_READ,   /**< block until data becomes available */\n    APR_NONBLOCK_READ /**< return immediately if no data is available */\n} apr_read_type_e;\n\n/**\n * The one-sentence buzzword-laden overview: Bucket brigades represent\n * a complex data stream that can be passed through a layered IO\n * system without unnecessary copying. A longer overview follows...\n *\n * A bucket brigade is a doubly linked list (ring) of buckets, so we\n * aren't limited to inserting at the front and removing at the end.\n * Buckets are only passed around as members of a brigade, although\n * singleton buckets can occur for short periods of time.\n *\n * Buckets are data stores of various types. They can refer to data in\n * memory, or part of a file or mmap area, or the output of a process,\n * etc. Buckets also have some type-dependent accessor functions:\n * read, split, copy, setaside, and destroy.\n *\n * read returns the address and size of the data in the bucket. If the\n * data isn't in memory then it is read in and the bucket changes type\n * so that it can refer to the new location of the data. If all the\n * data doesn't fit in the bucket then a new bucket is inserted into\n * the brigade to hold the rest of it.\n *\n * split divides the data in a bucket into two regions. After a split\n * the original bucket refers to the first part of the data and a new\n * bucket inserted into the brigade after the original bucket refers\n * to the second part of the data. Reference counts are maintained as\n * necessary.\n *\n * setaside ensures that the data in the bucket has a long enough\n * lifetime. Sometimes it is convenient to create a bucket referring\n * to data on the stack in the expectation that it will be consumed\n * (output to the network) before the stack is unwound. If that\n * expectation turns out not to be valid, the setaside function is\n * called to move the data somewhere safer.\n *\n * copy makes a duplicate of the bucket structure as long as it's\n * possible to have multiple references to a single copy of the\n * data itself.  Not all bucket types can be copied.\n *\n * destroy maintains the reference counts on the resources used by a\n * bucket and frees them if necessary.\n *\n * Note: all of the above functions have wrapper macros (apr_bucket_read(),\n * apr_bucket_destroy(), etc), and those macros should be used rather\n * than using the function pointers directly.\n *\n * To write a bucket brigade, they are first made into an iovec, so that we\n * don't write too little data at one time.  Currently we ignore compacting the\n * buckets into as few buckets as possible, but if we really want good\n * performance, then we need to compact the buckets before we convert to an\n * iovec, or possibly while we are converting to an iovec.\n */\n\n/*\n * Forward declaration of the main types.\n */\n\n/** @see apr_bucket_brigade */\ntypedef struct apr_bucket_brigade apr_bucket_brigade;\n/** @see apr_bucket */\ntypedef struct apr_bucket apr_bucket;\n/** @see apr_bucket_alloc_t */\ntypedef struct apr_bucket_alloc_t apr_bucket_alloc_t;\n\n/** @see apr_bucket_type_t */\ntypedef struct apr_bucket_type_t apr_bucket_type_t;\n\n/**\n * Basic bucket type\n */\nstruct apr_bucket_type_t {\n    /**\n     * The name of the bucket type\n     */\n    const char *name;\n    /** \n     * The number of functions this bucket understands.  Can not be less than\n     * five.\n     */\n    int num_func;\n    /**\n     * Whether the bucket contains metadata (ie, information that\n     * describes the regular contents of the brigade).  The metadata\n     * is not returned by apr_bucket_read() and is not indicated by\n     * the ->length of the apr_bucket itself.  In other words, an\n     * empty bucket is safe to arbitrarily remove if and only if it\n     * contains no metadata.  In this sense, \"data\" is just raw bytes\n     * that are the \"content\" of the brigade and \"metadata\" describes\n     * that data but is not a proper part of it.\n     */\n    enum {\n        /** This bucket type represents actual data to send to the client. */\n        APR_BUCKET_DATA = 0,\n        /** This bucket type represents metadata. */\n        APR_BUCKET_METADATA = 1\n    } is_metadata;\n    /**\n     * Free the private data and any resources used by the bucket (if they\n     *  aren't shared with another bucket).  This function is required to be\n     *  implemented for all bucket types, though it might be a no-op on some\n     *  of them (namely ones that never allocate any private data structures).\n     * @param data The private data pointer from the bucket to be destroyed\n     */\n    void (*destroy)(void *data);\n\n    /**\n     * Read the data from the bucket. This is required to be implemented\n     *  for all bucket types.\n     * @param b The bucket to read from\n     * @param str A place to store the data read.  Allocation should only be\n     *            done if absolutely necessary. \n     * @param len The amount of data read.\n     * @param block Should this read function block if there is more data that\n     *              cannot be read immediately.\n     */\n    apr_status_t (*read)(apr_bucket *b, const char **str, apr_size_t *len, \n                         apr_read_type_e block);\n    \n    /**\n     * Make it possible to set aside the data for at least as long as the\n     *  given pool. Buckets containing data that could potentially die before\n     *  this pool (e.g. the data resides on the stack, in a child pool of\n     *  the given pool, or in a disjoint pool) must somehow copy, shift, or\n     *  transform the data to have the proper lifetime.\n     * @param e The bucket to convert\n     * @remark Some bucket types contain data that will always outlive the\n     *         bucket itself. For example no data (EOS and FLUSH), or the data\n     *         resides in global, constant memory (IMMORTAL), or the data is on\n     *      the heap (HEAP). For these buckets, apr_bucket_setaside_noop can\n     *      be used.\n     */\n    apr_status_t (*setaside)(apr_bucket *e, apr_pool_t *pool);\n\n    /**\n     * Split one bucket in two at the specified position by duplicating\n     *  the bucket structure (not the data) and modifying any necessary\n     *  start/end/offset information.  If it's not possible to do this\n     *  for the bucket type (perhaps the length of the data is indeterminate,\n     *  as with pipe and socket buckets), then APR_ENOTIMPL is returned.\n     * @param e The bucket to split\n     * @param point The offset of the first byte in the new bucket\n     */\n    apr_status_t (*split)(apr_bucket *e, apr_size_t point);\n\n    /**\n     * Copy the bucket structure (not the data), assuming that this is\n     *  possible for the bucket type. If it's not, APR_ENOTIMPL is returned.\n     * @param e The bucket to copy\n     * @param c Returns a pointer to the new bucket\n     */\n    apr_status_t (*copy)(apr_bucket *e, apr_bucket **c);\n\n};\n\n/**\n * apr_bucket structures are allocated on the malloc() heap and\n * their lifetime is controlled by the parent apr_bucket_brigade\n * structure. Buckets can move from one brigade to another e.g. by\n * calling APR_BRIGADE_CONCAT(). In general the data in a bucket has\n * the same lifetime as the bucket and is freed when the bucket is\n * destroyed; if the data is shared by more than one bucket (e.g.\n * after a split) the data is freed when the last bucket goes away.\n */\nstruct apr_bucket {\n    /** Links to the rest of the brigade */\n    APR_RING_ENTRY(apr_bucket) link;\n    /** The type of bucket.  */\n    const apr_bucket_type_t *type;\n    /** The length of the data in the bucket.  This could have been implemented\n     *  with a function, but this is an optimization, because the most\n     *  common thing to do will be to get the length.  If the length is unknown,\n     *  the value of this field will be (apr_size_t)(-1).\n     */\n    apr_size_t length;\n    /** The start of the data in the bucket relative to the private base\n     *  pointer.  The vast majority of bucket types allow a fixed block of\n     *  data to be referenced by multiple buckets, each bucket pointing to\n     *  a different segment of the data.  That segment starts at base+start\n     *  and ends at base+start+length.  \n     *  If the length == (apr_size_t)(-1), then start == -1.\n     */\n    apr_off_t start;\n    /** type-dependent data hangs off this pointer */\n    void *data;\t\n    /**\n     * Pointer to function used to free the bucket. This function should\n     * always be defined and it should be consistent with the memory\n     * function used to allocate the bucket. For example, if malloc() is \n     * used to allocate the bucket, this pointer should point to free().\n     * @param e Pointer to the bucket being freed\n     */\n    void (*free)(void *e);\n    /** The freelist from which this bucket was allocated */\n    apr_bucket_alloc_t *list;\n};\n\n/** A list of buckets */\nstruct apr_bucket_brigade {\n    /** The pool to associate the brigade with.  The data is not allocated out\n     *  of the pool, but a cleanup is registered with this pool.  If the \n     *  brigade is destroyed by some mechanism other than pool destruction,\n     *  the destroying function is responsible for killing the cleanup.\n     */\n    apr_pool_t *p;\n    /** The buckets in the brigade are on this list. */\n    /*\n     * The apr_bucket_list structure doesn't actually need a name tag\n     * because it has no existence independent of struct apr_bucket_brigade;\n     * the ring macros are designed so that you can leave the name tag\n     * argument empty in this situation but apparently the Windows compiler\n     * doesn't like that.\n     */\n    APR_RING_HEAD(apr_bucket_list, apr_bucket) list;\n    /** The freelist from which this bucket was allocated */\n    apr_bucket_alloc_t *bucket_alloc;\n};\n\n\n/**\n * Function called when a brigade should be flushed\n */\ntypedef apr_status_t (*apr_brigade_flush)(apr_bucket_brigade *bb, void *ctx);\n\n/*\n * define APR_BUCKET_DEBUG if you want your brigades to be checked for\n * validity at every possible instant.  this will slow your code down\n * substantially but is a very useful debugging tool.\n */\n#ifdef APR_BUCKET_DEBUG\n\n#define APR_BRIGADE_CHECK_CONSISTENCY(b)\t\t\t\t\\\n        APR_RING_CHECK_CONSISTENCY(&(b)->list, apr_bucket, link)\n\n#define APR_BUCKET_CHECK_CONSISTENCY(e)\t\t\t\t\t\\\n        APR_RING_CHECK_ELEM_CONSISTENCY((e), apr_bucket, link)\n\n#else\n/**\n * checks the ring pointers in a bucket brigade for consistency.  an\n * abort() will be triggered if any inconsistencies are found.\n *   note: this is a no-op unless APR_BUCKET_DEBUG is defined.\n * @param b The brigade\n */\n#define APR_BRIGADE_CHECK_CONSISTENCY(b)\n/**\n * checks the brigade a bucket is in for ring consistency.  an\n * abort() will be triggered if any inconsistencies are found.\n *   note: this is a no-op unless APR_BUCKET_DEBUG is defined.\n * @param e The bucket\n */\n#define APR_BUCKET_CHECK_CONSISTENCY(e)\n#endif\n\n\n/**\n * Wrappers around the RING macros to reduce the verbosity of the code\n * that handles bucket brigades.\n */\n/**\n * The magic pointer value that indicates the head of the brigade\n * @remark This is used to find the beginning and end of the brigade, eg:\n * <pre>\n *      while (e != APR_BRIGADE_SENTINEL(b)) {\n *          ...\n *          e = APR_BUCKET_NEXT(e);\n *      }\n * </pre>\n * @param  b The brigade\n * @return The magic pointer value\n */\n#define APR_BRIGADE_SENTINEL(b)\tAPR_RING_SENTINEL(&(b)->list, apr_bucket, link)\n\n/**\n * Determine if the bucket brigade is empty\n * @param b The brigade to check\n * @return true or false\n */\n#define APR_BRIGADE_EMPTY(b)\tAPR_RING_EMPTY(&(b)->list, apr_bucket, link)\n\n/**\n * Return the first bucket in a brigade\n * @param b The brigade to query\n * @return The first bucket in the brigade\n */\n#define APR_BRIGADE_FIRST(b)\tAPR_RING_FIRST(&(b)->list)\n/**\n * Return the last bucket in a brigade\n * @param b The brigade to query\n * @return The last bucket in the brigade\n */\n#define APR_BRIGADE_LAST(b)\tAPR_RING_LAST(&(b)->list)\n\n/**\n * Insert a single bucket at the front of a brigade\n * @param b The brigade to add to\n * @param e The bucket to insert\n */\n#define APR_BRIGADE_INSERT_HEAD(b, e) do {\t\t\t\t\\\n\tapr_bucket *ap__b = (e);                                        \\\n\tAPR_RING_INSERT_HEAD(&(b)->list, ap__b, apr_bucket, link);\t\\\n        APR_BRIGADE_CHECK_CONSISTENCY((b));\t\t\t\t\\\n    } while (0)\n\n/**\n * Insert a single bucket at the end of a brigade\n * @param b The brigade to add to\n * @param e The bucket to insert\n */\n#define APR_BRIGADE_INSERT_TAIL(b, e) do {\t\t\t\t\\\n\tapr_bucket *ap__b = (e);\t\t\t\t\t\\\n\tAPR_RING_INSERT_TAIL(&(b)->list, ap__b, apr_bucket, link);\t\\\n        APR_BRIGADE_CHECK_CONSISTENCY((b));\t\t\t\t\\\n    } while (0)\n\n/**\n * Concatenate brigade b onto the end of brigade a, leaving brigade b empty\n * @param a The first brigade\n * @param b The second brigade\n */\n#define APR_BRIGADE_CONCAT(a, b) do {\t\t\t\t\t\\\n        APR_RING_CONCAT(&(a)->list, &(b)->list, apr_bucket, link);\t\\\n        APR_BRIGADE_CHECK_CONSISTENCY((a));\t\t\t\t\\\n    } while (0)\n\n/**\n * Prepend brigade b onto the beginning of brigade a, leaving brigade b empty\n * @param a The first brigade\n * @param b The second brigade\n */\n#define APR_BRIGADE_PREPEND(a, b) do {\t\t\t\t\t\\\n        APR_RING_PREPEND(&(a)->list, &(b)->list, apr_bucket, link);\t\\\n        APR_BRIGADE_CHECK_CONSISTENCY((a));\t\t\t\t\\\n    } while (0)\n\n/**\n * Insert a single bucket before a specified bucket\n * @param a The bucket to insert before\n * @param b The bucket to insert\n */\n#define APR_BUCKET_INSERT_BEFORE(a, b) do {\t\t\t\t\\\n\tapr_bucket *ap__a = (a), *ap__b = (b);\t\t\t\t\\\n\tAPR_RING_INSERT_BEFORE(ap__a, ap__b, link);\t\t\t\\\n        APR_BUCKET_CHECK_CONSISTENCY(ap__a);\t\t\t\t\\\n    } while (0)\n\n/**\n * Insert a single bucket after a specified bucket\n * @param a The bucket to insert after\n * @param b The bucket to insert\n */\n#define APR_BUCKET_INSERT_AFTER(a, b) do {\t\t\t\t\\\n\tapr_bucket *ap__a = (a), *ap__b = (b);\t\t\t\t\\\n\tAPR_RING_INSERT_AFTER(ap__a, ap__b, link);\t\t\t\\\n        APR_BUCKET_CHECK_CONSISTENCY(ap__a);\t\t\t\t\\\n    } while (0)\n\n/**\n * Get the next bucket in the list\n * @param e The current bucket\n * @return The next bucket\n */\n#define APR_BUCKET_NEXT(e)\tAPR_RING_NEXT((e), link)\n/**\n * Get the previous bucket in the list\n * @param e The current bucket\n * @return The previous bucket\n */\n#define APR_BUCKET_PREV(e)\tAPR_RING_PREV((e), link)\n\n/**\n * Remove a bucket from its bucket brigade\n * @param e The bucket to remove\n */\n#define APR_BUCKET_REMOVE(e)\tAPR_RING_REMOVE((e), link)\n\n/**\n * Initialize a new bucket's prev/next pointers\n * @param e The bucket to initialize\n */\n#define APR_BUCKET_INIT(e)\tAPR_RING_ELEM_INIT((e), link)\n\n/**\n * Determine if a bucket contains metadata.  An empty bucket is\n * safe to arbitrarily remove if and only if this is false.\n * @param e The bucket to inspect\n * @return true or false\n */\n#define APR_BUCKET_IS_METADATA(e)    ((e)->type->is_metadata)\n\n/**\n * Determine if a bucket is a FLUSH bucket\n * @param e The bucket to inspect\n * @return true or false\n */\n#define APR_BUCKET_IS_FLUSH(e)       ((e)->type == &apr_bucket_type_flush)\n/**\n * Determine if a bucket is an EOS bucket\n * @param e The bucket to inspect\n * @return true or false\n */\n#define APR_BUCKET_IS_EOS(e)         ((e)->type == &apr_bucket_type_eos)\n/**\n * Determine if a bucket is a FILE bucket\n * @param e The bucket to inspect\n * @return true or false\n */\n#define APR_BUCKET_IS_FILE(e)        ((e)->type == &apr_bucket_type_file)\n/**\n * Determine if a bucket is a PIPE bucket\n * @param e The bucket to inspect\n * @return true or false\n */\n#define APR_BUCKET_IS_PIPE(e)        ((e)->type == &apr_bucket_type_pipe)\n/**\n * Determine if a bucket is a SOCKET bucket\n * @param e The bucket to inspect\n * @return true or false\n */\n#define APR_BUCKET_IS_SOCKET(e)      ((e)->type == &apr_bucket_type_socket)\n/**\n * Determine if a bucket is a HEAP bucket\n * @param e The bucket to inspect\n * @return true or false\n */\n#define APR_BUCKET_IS_HEAP(e)        ((e)->type == &apr_bucket_type_heap)\n/**\n * Determine if a bucket is a TRANSIENT bucket\n * @param e The bucket to inspect\n * @return true or false\n */\n#define APR_BUCKET_IS_TRANSIENT(e)   ((e)->type == &apr_bucket_type_transient)\n/**\n * Determine if a bucket is a IMMORTAL bucket\n * @param e The bucket to inspect\n * @return true or false\n */\n#define APR_BUCKET_IS_IMMORTAL(e)    ((e)->type == &apr_bucket_type_immortal)\n#if APR_HAS_MMAP\n/**\n * Determine if a bucket is a MMAP bucket\n * @param e The bucket to inspect\n * @return true or false\n */\n#define APR_BUCKET_IS_MMAP(e)        ((e)->type == &apr_bucket_type_mmap)\n#endif\n/**\n * Determine if a bucket is a POOL bucket\n * @param e The bucket to inspect\n * @return true or false\n */\n#define APR_BUCKET_IS_POOL(e)        ((e)->type == &apr_bucket_type_pool)\n\n/*\n * General-purpose reference counting for the various bucket types.\n *\n * Any bucket type that keeps track of the resources it uses (i.e.\n * most of them except for IMMORTAL, TRANSIENT, and EOS) needs to\n * attach a reference count to the resource so that it can be freed\n * when the last bucket that uses it goes away. Resource-sharing may\n * occur because of bucket splits or buckets that refer to globally\n * cached data. */\n\n/** @see apr_bucket_refcount */\ntypedef struct apr_bucket_refcount apr_bucket_refcount;\n/**\n * The structure used to manage the shared resource must start with an\n * apr_bucket_refcount which is updated by the general-purpose refcount\n * code. A pointer to the bucket-type-dependent private data structure\n * can be cast to a pointer to an apr_bucket_refcount and vice versa.\n */\nstruct apr_bucket_refcount {\n    /** The number of references to this bucket */\n    int          refcount;\n};\n\n/*  *****  Reference-counted bucket types  *****  */\n\n/** @see apr_bucket_heap */\ntypedef struct apr_bucket_heap apr_bucket_heap;\n/**\n * A bucket referring to data allocated off the heap.\n */\nstruct apr_bucket_heap {\n    /** Number of buckets using this memory */\n    apr_bucket_refcount  refcount;\n    /** The start of the data actually allocated.  This should never be\n     * modified, it is only used to free the bucket.\n     */\n    char    *base;\n    /** how much memory was allocated */\n    apr_size_t  alloc_len;\n    /** function to use to delete the data */\n    void (*free_func)(void *data);\n};\n\n/** @see apr_bucket_pool */\ntypedef struct apr_bucket_pool apr_bucket_pool;\n/**\n * A bucket referring to data allocated from a pool\n */\nstruct apr_bucket_pool {\n    /** The pool bucket must be able to be easily morphed to a heap\n     * bucket if the pool gets cleaned up before all references are\n     * destroyed.  This apr_bucket_heap structure is populated automatically\n     * when the pool gets cleaned up, and subsequent calls to pool_read()\n     * will result in the apr_bucket in question being morphed into a\n     * regular heap bucket.  (To avoid having to do many extra refcount\n     * manipulations and b->data manipulations, the apr_bucket_pool\n     * struct actually *contains* the apr_bucket_heap struct that it\n     * will become as its first element; the two share their\n     * apr_bucket_refcount members.)\n     */\n    apr_bucket_heap  heap;\n    /** The block of data actually allocated from the pool.\n     * Segments of this block are referenced by adjusting\n     * the start and length of the apr_bucket accordingly.\n     * This will be NULL after the pool gets cleaned up.\n     */\n    const char *base;\n    /** The pool the data was allocated from.  When the pool\n     * is cleaned up, this gets set to NULL as an indicator\n     * to pool_read() that the data is now on the heap and\n     * so it should morph the bucket into a regular heap\n     * bucket before continuing.\n     */\n    apr_pool_t *pool;\n    /** The freelist this structure was allocated from, which is\n     * needed in the cleanup phase in order to allocate space on the heap\n     */\n    apr_bucket_alloc_t *list;\n};\n\n#if APR_HAS_MMAP\n/** @see apr_bucket_mmap */\ntypedef struct apr_bucket_mmap apr_bucket_mmap;\n/**\n * A bucket referring to an mmap()ed file\n */\nstruct apr_bucket_mmap {\n    /** Number of buckets using this memory */\n    apr_bucket_refcount  refcount;\n    /** The mmap this sub_bucket refers to */\n    apr_mmap_t *mmap;\n};\n#endif\n\n/** @see apr_bucket_file */\ntypedef struct apr_bucket_file apr_bucket_file;\n/**\n * A bucket referring to an file\n */\nstruct apr_bucket_file {\n    /** Number of buckets using this memory */\n    apr_bucket_refcount  refcount;\n    /** The file this bucket refers to */\n    apr_file_t *fd;\n    /** The pool into which any needed structures should\n     *  be created while reading from this file bucket */\n    apr_pool_t *readpool;\n#if APR_HAS_MMAP\n    /** Whether this bucket should be memory-mapped if\n     *  a caller tries to read from it */\n    int can_mmap;\n#endif /* APR_HAS_MMAP */\n};\n\n/** @see apr_bucket_structs */\ntypedef union apr_bucket_structs apr_bucket_structs;\n/**\n * A union of all bucket structures so we know what\n * the max size is.\n */\nunion apr_bucket_structs {\n    apr_bucket      b;      /**< Bucket */\n    apr_bucket_heap heap;   /**< Heap */\n    apr_bucket_pool pool;   /**< Pool */\n#if APR_HAS_MMAP\n    apr_bucket_mmap mmap;   /**< MMap */\n#endif\n    apr_bucket_file file;   /**< File */\n};\n\n/**\n * The amount that apr_bucket_alloc() should allocate in the common case.\n * Note: this is twice as big as apr_bucket_structs to allow breathing\n * room for third-party bucket types.\n */\n#define APR_BUCKET_ALLOC_SIZE  APR_ALIGN_DEFAULT(2*sizeof(apr_bucket_structs))\n\n/*  *****  Bucket Brigade Functions  *****  */\n/**\n * Create a new bucket brigade.  The bucket brigade is originally empty.\n * @param p The pool to associate with the brigade.  Data is not allocated out\n *          of the pool, but a cleanup is registered.\n * @param list The bucket allocator to use\n * @return The empty bucket brigade\n */\nAPU_DECLARE(apr_bucket_brigade *) apr_brigade_create(apr_pool_t *p,\n                                                     apr_bucket_alloc_t *list);\n\n/**\n * destroy an entire bucket brigade.  This includes destroying all of the\n * buckets within the bucket brigade's bucket list. \n * @param b The bucket brigade to destroy\n */\nAPU_DECLARE(apr_status_t) apr_brigade_destroy(apr_bucket_brigade *b);\n\n/**\n * empty out an entire bucket brigade.  This includes destroying all of the\n * buckets within the bucket brigade's bucket list.  This is similar to\n * apr_brigade_destroy(), except that it does not deregister the brigade's\n * pool cleanup function.\n * @param data The bucket brigade to clean up\n * @remark Generally, you should use apr_brigade_destroy().  This function\n *         can be useful in situations where you have a single brigade that\n *         you wish to reuse many times by destroying all of the buckets in\n *         the brigade and putting new buckets into it later.\n */\nAPU_DECLARE(apr_status_t) apr_brigade_cleanup(void *data);\n\n/**\n * Move the buckets from the tail end of the existing brigade @a b into\n * the brigade @a a. If @a a is NULL a new brigade is created. Buckets\n * from @a e to the last bucket (inclusively) of brigade @a b are moved\n * from @a b to the returned brigade @a a.\n *\n * @param b The brigade to split\n * @param e The first bucket to move\n * @param a The brigade which should be used for the result or NULL if\n *          a new brigade should be created. The brigade @a a will be\n *          cleared if it is not empty.\n * @return The brigade supplied in @a a or a new one if @a a was NULL.\n * @warning Note that this function allocates a new brigade if @a a is\n * NULL so memory consumption should be carefully considered.\n */\nAPU_DECLARE(apr_bucket_brigade *) apr_brigade_split_ex(apr_bucket_brigade *b,\n                                                       apr_bucket *e,\n                                                       apr_bucket_brigade *a);\n\n/**\n * Create a new bucket brigade and move the buckets from the tail end\n * of an existing brigade into the new brigade.  Buckets from \n * @a e to the last bucket (inclusively) of brigade @a b\n * are moved from @a b to the returned brigade.\n * @param b The brigade to split \n * @param e The first bucket to move\n * @return The new brigade\n * @warning Note that this function always allocates a new brigade\n * so memory consumption should be carefully considered.\n */\nAPU_DECLARE(apr_bucket_brigade *) apr_brigade_split(apr_bucket_brigade *b,\n                                                    apr_bucket *e);\n\n/**\n * Partition a bucket brigade at a given offset (in bytes from the start of\n * the brigade).  This is useful whenever a filter wants to use known ranges\n * of bytes from the brigade; the ranges can even overlap.\n * @param b The brigade to partition\n * @param point The offset at which to partition the brigade\n * @param after_point Returns a pointer to the first bucket after the partition\n * @return APR_SUCCESS on success, APR_INCOMPLETE if the contents of the\n * brigade were shorter than @a point, or an error code.\n * @remark if APR_INCOMPLETE is returned, @a after_point will be set to\n * the brigade sentinel.\n */\nAPU_DECLARE(apr_status_t) apr_brigade_partition(apr_bucket_brigade *b,\n                                                apr_off_t point,\n                                                apr_bucket **after_point);\n\n/**\n * Return the total length of the brigade.\n * @param bb The brigade to compute the length of\n * @param read_all Read unknown-length buckets to force a size\n * @param length Returns the length of the brigade (up to the end, or up\n *               to a bucket read error), or -1 if the brigade has buckets\n *               of indeterminate length and read_all is 0.\n */\nAPU_DECLARE(apr_status_t) apr_brigade_length(apr_bucket_brigade *bb,\n                                             int read_all,\n                                             apr_off_t *length);\n\n/**\n * Take a bucket brigade and store the data in a flat char*\n * @param bb The bucket brigade to create the char* from\n * @param c The char* to write into\n * @param len The maximum length of the char array. On return, it is the\n *            actual length of the char array.\n */\nAPU_DECLARE(apr_status_t) apr_brigade_flatten(apr_bucket_brigade *bb,\n                                              char *c,\n                                              apr_size_t *len);\n\n/**\n * Creates a pool-allocated string representing a flat bucket brigade\n * @param bb The bucket brigade to create the char array from\n * @param c On return, the allocated char array\n * @param len On return, the length of the char array.\n * @param pool The pool to allocate the string from.\n */\nAPU_DECLARE(apr_status_t) apr_brigade_pflatten(apr_bucket_brigade *bb, \n                                               char **c,\n                                               apr_size_t *len,\n                                               apr_pool_t *pool);\n\n/**\n * Split a brigade to represent one LF line.\n * @param bbOut The bucket brigade that will have the LF line appended to.\n * @param bbIn The input bucket brigade to search for a LF-line.\n * @param block The blocking mode to be used to split the line.\n * @param maxbytes The maximum bytes to read.  If this many bytes are seen\n *                 without a LF, the brigade will contain a partial line.\n */\nAPU_DECLARE(apr_status_t) apr_brigade_split_line(apr_bucket_brigade *bbOut,\n                                                 apr_bucket_brigade *bbIn,\n                                                 apr_read_type_e block,\n                                                 apr_off_t maxbytes);\n\n/**\n * Create an iovec of the elements in a bucket_brigade... return number \n * of elements used.  This is useful for writing to a file or to the\n * network efficiently.\n * @param b The bucket brigade to create the iovec from\n * @param vec The iovec to create\n * @param nvec The number of elements in the iovec. On return, it is the\n *             number of iovec elements actually filled out.\n */\nAPU_DECLARE(apr_status_t) apr_brigade_to_iovec(apr_bucket_brigade *b, \n                                               struct iovec *vec, int *nvec);\n\n/**\n * This function writes a list of strings into a bucket brigade. \n * @param b The bucket brigade to add to\n * @param flush The flush function to use if the brigade is full\n * @param ctx The structure to pass to the flush function\n * @param va A list of strings to add\n * @return APR_SUCCESS or error code.\n */\nAPU_DECLARE(apr_status_t) apr_brigade_vputstrs(apr_bucket_brigade *b,\n                                               apr_brigade_flush flush,\n                                               void *ctx,\n                                               va_list va);\n\n/**\n * This function writes a string into a bucket brigade.\n *\n * The apr_brigade_write function attempts to be efficient with the\n * handling of heap buckets. Regardless of the amount of data stored\n * inside a heap bucket, heap buckets are a fixed size to promote their\n * reuse.\n *\n * If an attempt is made to write a string to a brigade that already \n * ends with a heap bucket, this function will attempt to pack the\n * string into the remaining space in the previous heap bucket, before\n * allocating a new heap bucket.\n *\n * This function always returns APR_SUCCESS, unless a flush function is\n * passed, in which case the return value of the flush function will be\n * returned if used.\n * @param b The bucket brigade to add to\n * @param flush The flush function to use if the brigade is full\n * @param ctx The structure to pass to the flush function\n * @param str The string to add\n * @param nbyte The number of bytes to write\n * @return APR_SUCCESS or error code\n */\nAPU_DECLARE(apr_status_t) apr_brigade_write(apr_bucket_brigade *b,\n                                            apr_brigade_flush flush, void *ctx,\n                                            const char *str, apr_size_t nbyte);\n\n/**\n * This function writes multiple strings into a bucket brigade.\n * @param b The bucket brigade to add to\n * @param flush The flush function to use if the brigade is full\n * @param ctx The structure to pass to the flush function\n * @param vec The strings to add (address plus length for each)\n * @param nvec The number of entries in iovec\n * @return APR_SUCCESS or error code\n */\nAPU_DECLARE(apr_status_t) apr_brigade_writev(apr_bucket_brigade *b,\n                                             apr_brigade_flush flush,\n                                             void *ctx,\n                                             const struct iovec *vec,\n                                             apr_size_t nvec);\n\n/**\n * This function writes a string into a bucket brigade.\n * @param bb The bucket brigade to add to\n * @param flush The flush function to use if the brigade is full\n * @param ctx The structure to pass to the flush function\n * @param str The string to add\n * @return APR_SUCCESS or error code\n */\nAPU_DECLARE(apr_status_t) apr_brigade_puts(apr_bucket_brigade *bb,\n                                           apr_brigade_flush flush, void *ctx,\n                                           const char *str);\n\n/**\n * This function writes a character into a bucket brigade.\n * @param b The bucket brigade to add to\n * @param flush The flush function to use if the brigade is full\n * @param ctx The structure to pass to the flush function\n * @param c The character to add\n * @return APR_SUCCESS or error code\n */\nAPU_DECLARE(apr_status_t) apr_brigade_putc(apr_bucket_brigade *b,\n                                           apr_brigade_flush flush, void *ctx,\n                                           const char c);\n\n/**\n * This function writes an unspecified number of strings into a bucket brigade.\n * @param b The bucket brigade to add to\n * @param flush The flush function to use if the brigade is full\n * @param ctx The structure to pass to the flush function\n * @param ... The strings to add\n * @return APR_SUCCESS or error code\n */\nAPU_DECLARE_NONSTD(apr_status_t) apr_brigade_putstrs(apr_bucket_brigade *b,\n                                                     apr_brigade_flush flush,\n                                                     void *ctx, ...);\n\n/**\n * Evaluate a printf and put the resulting string at the end \n * of the bucket brigade.\n * @param b The brigade to write to\n * @param flush The flush function to use if the brigade is full\n * @param ctx The structure to pass to the flush function\n * @param fmt The format of the string to write\n * @param ... The arguments to fill out the format\n * @return APR_SUCCESS or error code\n */\nAPU_DECLARE_NONSTD(apr_status_t) apr_brigade_printf(apr_bucket_brigade *b, \n                                                    apr_brigade_flush flush,\n                                                    void *ctx,\n                                                    const char *fmt, ...)\n        __attribute__((format(printf,4,5)));\n\n/**\n * Evaluate a printf and put the resulting string at the end \n * of the bucket brigade.\n * @param b The brigade to write to\n * @param flush The flush function to use if the brigade is full\n * @param ctx The structure to pass to the flush function\n * @param fmt The format of the string to write\n * @param va The arguments to fill out the format\n * @return APR_SUCCESS or error code\n */\nAPU_DECLARE(apr_status_t) apr_brigade_vprintf(apr_bucket_brigade *b, \n                                              apr_brigade_flush flush,\n                                              void *ctx,\n                                              const char *fmt, va_list va);\n\n/**\n * Utility function to insert a file (or a segment of a file) onto the\n * end of the brigade.  The file is split into multiple buckets if it\n * is larger than the maximum size which can be represented by a\n * single bucket.\n * @param bb the brigade to insert into\n * @param f the file to insert\n * @param start the offset of the start of the segment\n * @param len the length of the segment of the file to insert\n * @param p pool from which file buckets are allocated\n * @return the last bucket inserted\n */\nAPU_DECLARE(apr_bucket *) apr_brigade_insert_file(apr_bucket_brigade *bb,\n                                                  apr_file_t *f,\n                                                  apr_off_t start,\n                                                  apr_off_t len,\n                                                  apr_pool_t *p);\n\n\n\n/*  *****  Bucket freelist functions *****  */\n/**\n * Create a bucket allocator.\n * @param p This pool's underlying apr_allocator_t is used to allocate memory\n *          for the bucket allocator.  When the pool is destroyed, the bucket\n *          allocator's cleanup routine will free all memory that has been\n *          allocated from it.\n * @remark  The reason the allocator gets its memory from the pool's\n *          apr_allocator_t rather than from the pool itself is because\n *          the bucket allocator will free large memory blocks back to the\n *          allocator when it's done with them, thereby preventing memory\n *          footprint growth that would occur if we allocated from the pool.\n * @warning The allocator must never be used by more than one thread at a time.\n */\nAPU_DECLARE_NONSTD(apr_bucket_alloc_t *) apr_bucket_alloc_create(apr_pool_t *p);\n\n/**\n * Create a bucket allocator.\n * @param allocator This apr_allocator_t is used to allocate both the bucket\n *          allocator and all memory handed out by the bucket allocator.  The\n *          caller is responsible for destroying the bucket allocator and the\n *          apr_allocator_t -- no automatic cleanups will happen.\n * @warning The allocator must never be used by more than one thread at a time.\n */\nAPU_DECLARE_NONSTD(apr_bucket_alloc_t *) apr_bucket_alloc_create_ex(apr_allocator_t *allocator);\n\n/**\n * Destroy a bucket allocator.\n * @param list The allocator to be destroyed\n */\nAPU_DECLARE_NONSTD(void) apr_bucket_alloc_destroy(apr_bucket_alloc_t *list);\n\n/**\n * Allocate memory for use by the buckets.\n * @param size The amount to allocate.\n * @param list The allocator from which to allocate the memory.\n */\nAPU_DECLARE_NONSTD(void *) apr_bucket_alloc(apr_size_t size, apr_bucket_alloc_t *list);\n\n/**\n * Free memory previously allocated with apr_bucket_alloc().\n * @param block The block of memory to be freed.\n */\nAPU_DECLARE_NONSTD(void) apr_bucket_free(void *block);\n\n\n/*  *****  Bucket Functions  *****  */\n/**\n * Free the resources used by a bucket. If multiple buckets refer to\n * the same resource it is freed when the last one goes away.\n * @see apr_bucket_delete()\n * @param e The bucket to destroy\n */\n#define apr_bucket_destroy(e) do {\t\t\t\t\t\\\n        (e)->type->destroy((e)->data);\t\t\t\t\t\\\n        (e)->free(e);\t\t\t\t\t\t\t\\\n    } while (0)\n\n/**\n * Delete a bucket by removing it from its brigade (if any) and then\n * destroying it.\n * @remark This mainly acts as an aid in avoiding code verbosity.  It is\n * the preferred exact equivalent to:\n * <pre>\n *      APR_BUCKET_REMOVE(e);\n *      apr_bucket_destroy(e);\n * </pre>\n * @param e The bucket to delete\n */\n#define apr_bucket_delete(e) do {\t\t\t\t\t\\\n        APR_BUCKET_REMOVE(e);\t\t\t\t\t\t\\\n        apr_bucket_destroy(e);\t\t\t\t\t\t\\\n    } while (0)\n\n/**\n * Read some data from the bucket.\n *\n * The apr_bucket_read function returns a convenient amount of data\n * from the bucket provided, writing the address and length of the\n * data to the pointers provided by the caller. The function tries\n * as hard as possible to avoid a memory copy.\n *\n * Buckets are expected to be a member of a brigade at the time they\n * are read.\n *\n * In typical application code, buckets are read in a loop, and after\n * each bucket is read and processed, it is moved or deleted from the\n * brigade and the next bucket read.\n *\n * The definition of \"convenient\" depends on the type of bucket that\n * is being read, and is decided by APR. In the case of memory based\n * buckets such as heap and immortal buckets, a pointer will be\n * returned to the location of the buffer containing the complete\n * contents of the bucket.\n *\n * Some buckets, such as the socket bucket, might have no concept\n * of length. If an attempt is made to read such a bucket, the\n * apr_bucket_read function will read a convenient amount of data\n * from the socket. The socket bucket is magically morphed into a\n * heap bucket containing the just-read data, and a new socket bucket\n * is inserted just after this heap bucket.\n *\n * To understand why apr_bucket_read might do this, consider the loop\n * described above to read and process buckets. The current bucket\n * is magically morphed into a heap bucket and returned to the caller.\n * The caller processes the data, and deletes the heap bucket, moving\n * onto the next bucket, the new socket bucket. This process repeats,\n * giving the illusion of a bucket brigade that contains potentially\n * infinite amounts of data. It is up to the caller to decide at what\n * point to stop reading buckets.\n *\n * Some buckets, such as the file bucket, might have a fixed size,\n * but be significantly larger than is practical to store in RAM in\n * one go. As with the socket bucket, if an attempt is made to read\n * from a file bucket, the file bucket is magically morphed into a\n * heap bucket containing a convenient amount of data read from the\n * current offset in the file. During the read, the offset will be\n * moved forward on the file, and a new file bucket will be inserted\n * directly after the current bucket representing the remainder of the\n * file. If the heap bucket was large enough to store the whole\n * remainder of the file, no more file buckets are inserted, and the\n * file bucket will disappear completely.\n *\n * The pattern for reading buckets described above does create the\n * illusion that the code is willing to swallow buckets that might be\n * too large for the system to handle in one go. This however is just\n * an illusion: APR will always ensure that large (file) or infinite\n * (socket) buckets are broken into convenient bite sized heap buckets\n * before data is returned to the caller.\n *\n * There is a potential gotcha to watch for: if buckets are read in a\n * loop, and aren't deleted after being processed, the potentially large\n * bucket will slowly be converted into RAM resident heap buckets. If\n * the file is larger than available RAM, an out of memory condition\n * could be caused if the application is not careful to manage this.\n *\n * @param e The bucket to read from\n * @param str The location to store a pointer to the data in\n * @param len The location to store the amount of data read\n * @param block Whether the read function blocks\n */\n#define apr_bucket_read(e,str,len,block) (e)->type->read(e, str, len, block)\n\n/**\n * Setaside data so that stack data is not destroyed on returning from\n * the function\n * @param e The bucket to setaside\n * @param p The pool to setaside into\n */\n#define apr_bucket_setaside(e,p) (e)->type->setaside(e,p)\n\n/**\n * Split one bucket in two at the point provided.\n * \n * Once split, the original bucket becomes the first of the two new buckets.\n * \n * (It is assumed that the bucket is a member of a brigade when this\n * function is called).\n * @param e The bucket to split\n * @param point The offset to split the bucket at\n */\n#define apr_bucket_split(e,point) (e)->type->split(e, point)\n\n/**\n * Copy a bucket.\n * @param e The bucket to copy\n * @param c Returns a pointer to the new bucket\n */\n#define apr_bucket_copy(e,c) (e)->type->copy(e, c)\n\n/* Bucket type handling */\n\n/**\n * This function simply returns APR_SUCCESS to denote that the bucket does\n * not require anything to happen for its setaside() function. This is\n * appropriate for buckets that have \"immortal\" data -- the data will live\n * at least as long as the bucket.\n * @param data The bucket to setaside\n * @param pool The pool defining the desired lifetime of the bucket data\n * @return APR_SUCCESS\n */ \nAPU_DECLARE_NONSTD(apr_status_t) apr_bucket_setaside_noop(apr_bucket *data,\n                                                          apr_pool_t *pool);\n\n/**\n * A place holder function that signifies that the setaside function was not\n * implemented for this bucket\n * @param data The bucket to setaside\n * @param pool The pool defining the desired lifetime of the bucket data\n * @return APR_ENOTIMPL\n */ \nAPU_DECLARE_NONSTD(apr_status_t) apr_bucket_setaside_notimpl(apr_bucket *data,\n                                                             apr_pool_t *pool);\n\n/**\n * A place holder function that signifies that the split function was not\n * implemented for this bucket\n * @param data The bucket to split\n * @param point The location to split the bucket\n * @return APR_ENOTIMPL\n */ \nAPU_DECLARE_NONSTD(apr_status_t) apr_bucket_split_notimpl(apr_bucket *data,\n                                                          apr_size_t point);\n\n/**\n * A place holder function that signifies that the copy function was not\n * implemented for this bucket\n * @param e The bucket to copy\n * @param c Returns a pointer to the new bucket\n * @return APR_ENOTIMPL\n */\nAPU_DECLARE_NONSTD(apr_status_t) apr_bucket_copy_notimpl(apr_bucket *e,\n                                                         apr_bucket **c);\n\n/**\n * A place holder function that signifies that this bucket does not need\n * to do anything special to be destroyed.  That's only the case for buckets\n * that either have no data (metadata buckets) or buckets whose data pointer\n * points to something that's not a bucket-type-specific structure, as with\n * simple buckets where data points to a string and pipe buckets where data\n * points directly to the apr_file_t.\n * @param data The bucket data to destroy\n */ \nAPU_DECLARE_NONSTD(void) apr_bucket_destroy_noop(void *data);\n\n/**\n * There is no apr_bucket_destroy_notimpl, because destruction is required\n * to be implemented (it could be a noop, but only if that makes sense for\n * the bucket type)\n */\n\n/* There is no apr_bucket_read_notimpl, because it is a required function\n */\n\n\n/* All of the bucket types implemented by the core */\n/**\n * The flush bucket type.  This signifies that all data should be flushed to\n * the next filter.  The flush bucket should be sent with the other buckets.\n */\nAPU_DECLARE_DATA extern const apr_bucket_type_t apr_bucket_type_flush;\n/**\n * The EOS bucket type.  This signifies that there will be no more data, ever.\n * All filters MUST send all data to the next filter when they receive a\n * bucket of this type\n */\nAPU_DECLARE_DATA extern const apr_bucket_type_t apr_bucket_type_eos;\n/**\n * The FILE bucket type.  This bucket represents a file on disk\n */\nAPU_DECLARE_DATA extern const apr_bucket_type_t apr_bucket_type_file;\n/**\n * The HEAP bucket type.  This bucket represents a data allocated from the\n * heap.\n */\nAPU_DECLARE_DATA extern const apr_bucket_type_t apr_bucket_type_heap;\n#if APR_HAS_MMAP\n/**\n * The MMAP bucket type.  This bucket represents an MMAP'ed file\n */\nAPU_DECLARE_DATA extern const apr_bucket_type_t apr_bucket_type_mmap;\n#endif\n/**\n * The POOL bucket type.  This bucket represents a data that was allocated\n * from a pool.  IF this bucket is still available when the pool is cleared,\n * the data is copied on to the heap.\n */\nAPU_DECLARE_DATA extern const apr_bucket_type_t apr_bucket_type_pool;\n/**\n * The PIPE bucket type.  This bucket represents a pipe to another program.\n */\nAPU_DECLARE_DATA extern const apr_bucket_type_t apr_bucket_type_pipe;\n/**\n * The IMMORTAL bucket type.  This bucket represents a segment of data that\n * the creator is willing to take responsibility for.  The core will do\n * nothing with the data in an immortal bucket\n */\nAPU_DECLARE_DATA extern const apr_bucket_type_t apr_bucket_type_immortal;\n/**\n * The TRANSIENT bucket type.  This bucket represents a data allocated off\n * the stack.  When the setaside function is called, this data is copied on\n * to the heap\n */\nAPU_DECLARE_DATA extern const apr_bucket_type_t apr_bucket_type_transient;\n/**\n * The SOCKET bucket type.  This bucket represents a socket to another machine\n */\nAPU_DECLARE_DATA extern const apr_bucket_type_t apr_bucket_type_socket;\n\n\n/*  *****  Simple buckets  *****  */\n\n/**\n * Split a simple bucket into two at the given point.  Most non-reference\n * counting buckets that allow multiple references to the same block of\n * data (eg transient and immortal) will use this as their split function\n * without any additional type-specific handling.\n * @param b The bucket to be split\n * @param point The offset of the first byte in the new bucket\n * @return APR_EINVAL if the point is not within the bucket;\n *         APR_ENOMEM if allocation failed;\n *         or APR_SUCCESS\n */\nAPU_DECLARE_NONSTD(apr_status_t) apr_bucket_simple_split(apr_bucket *b,\n                                                         apr_size_t point);\n\n/**\n * Copy a simple bucket.  Most non-reference-counting buckets that allow\n * multiple references to the same block of data (eg transient and immortal)\n * will use this as their copy function without any additional type-specific\n * handling.\n * @param a The bucket to copy\n * @param b Returns a pointer to the new bucket\n * @return APR_ENOMEM if allocation failed;\n *         or APR_SUCCESS\n */\nAPU_DECLARE_NONSTD(apr_status_t) apr_bucket_simple_copy(apr_bucket *a,\n                                                        apr_bucket **b);\n\n\n/*  *****  Shared, reference-counted buckets  *****  */\n\n/**\n * Initialize a bucket containing reference-counted data that may be\n * shared. The caller must allocate the bucket if necessary and\n * initialize its type-dependent fields, and allocate and initialize\n * its own private data structure. This function should only be called\n * by type-specific bucket creation functions.\n * @param b The bucket to initialize\n * @param data A pointer to the private data structure\n *             with the reference count at the start\n * @param start The start of the data in the bucket\n *              relative to the private base pointer\n * @param length The length of the data in the bucket\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_shared_make(apr_bucket *b, void *data,\n\t\t\t\t                 apr_off_t start, \n                                                 apr_size_t length);\n\n/**\n * Decrement the refcount of the data in the bucket. This function\n * should only be called by type-specific bucket destruction functions.\n * @param data The private data pointer from the bucket to be destroyed\n * @return TRUE or FALSE; TRUE if the reference count is now\n *         zero, indicating that the shared resource itself can\n *         be destroyed by the caller.\n */\nAPU_DECLARE(int) apr_bucket_shared_destroy(void *data);\n\n/**\n * Split a bucket into two at the given point, and adjust the refcount\n * to the underlying data. Most reference-counting bucket types will\n * be able to use this function as their split function without any\n * additional type-specific handling.\n * @param b The bucket to be split\n * @param point The offset of the first byte in the new bucket\n * @return APR_EINVAL if the point is not within the bucket;\n *         APR_ENOMEM if allocation failed;\n *         or APR_SUCCESS\n */\nAPU_DECLARE_NONSTD(apr_status_t) apr_bucket_shared_split(apr_bucket *b,\n                                                         apr_size_t point);\n\n/**\n * Copy a refcounted bucket, incrementing the reference count. Most\n * reference-counting bucket types will be able to use this function\n * as their copy function without any additional type-specific handling.\n * @param a The bucket to copy\n * @param b Returns a pointer to the new bucket\n * @return APR_ENOMEM if allocation failed;\n           or APR_SUCCESS\n */\nAPU_DECLARE_NONSTD(apr_status_t) apr_bucket_shared_copy(apr_bucket *a,\n                                                        apr_bucket **b);\n\n\n/*  *****  Functions to Create Buckets of varying types  *****  */\n/*\n * Each bucket type foo has two initialization functions:\n * apr_bucket_foo_make which sets up some already-allocated memory as a\n * bucket of type foo; and apr_bucket_foo_create which allocates memory\n * for the bucket, calls apr_bucket_make_foo, and initializes the\n * bucket's list pointers. The apr_bucket_foo_make functions are used\n * inside the bucket code to change the type of buckets in place;\n * other code should call apr_bucket_foo_create. All the initialization\n * functions change nothing if they fail.\n */\n\n/**\n * Create an End of Stream bucket.  This indicates that there is no more data\n * coming from down the filter stack.  All filters should flush at this point.\n * @param list The freelist from which this bucket should be allocated\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_eos_create(apr_bucket_alloc_t *list);\n\n/**\n * Make the bucket passed in an EOS bucket.  This indicates that there is no \n * more data coming from down the filter stack.  All filters should flush at \n * this point.\n * @param b The bucket to make into an EOS bucket\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_eos_make(apr_bucket *b);\n\n/**\n * Create a flush  bucket.  This indicates that filters should flush their\n * data.  There is no guarantee that they will flush it, but this is the\n * best we can do.\n * @param list The freelist from which this bucket should be allocated\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_flush_create(apr_bucket_alloc_t *list);\n\n/**\n * Make the bucket passed in a FLUSH  bucket.  This indicates that filters \n * should flush their data.  There is no guarantee that they will flush it, \n * but this is the best we can do.\n * @param b The bucket to make into a FLUSH bucket\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_flush_make(apr_bucket *b);\n\n/**\n * Create a bucket referring to long-lived data.\n * @param buf The data to insert into the bucket\n * @param nbyte The size of the data to insert.\n * @param list The freelist from which this bucket should be allocated\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_immortal_create(const char *buf, \n                                                     apr_size_t nbyte,\n                                                     apr_bucket_alloc_t *list);\n\n/**\n * Make the bucket passed in a bucket refer to long-lived data\n * @param b The bucket to make into a IMMORTAL bucket\n * @param buf The data to insert into the bucket\n * @param nbyte The size of the data to insert.\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_immortal_make(apr_bucket *b, \n                                                   const char *buf, \n                                                   apr_size_t nbyte);\n\n/**\n * Create a bucket referring to data on the stack.\n * @param buf The data to insert into the bucket\n * @param nbyte The size of the data to insert.\n * @param list The freelist from which this bucket should be allocated\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_transient_create(const char *buf, \n                                                      apr_size_t nbyte,\n                                                      apr_bucket_alloc_t *list);\n\n/**\n * Make the bucket passed in a bucket refer to stack data\n * @param b The bucket to make into a TRANSIENT bucket\n * @param buf The data to insert into the bucket\n * @param nbyte The size of the data to insert.\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_transient_make(apr_bucket *b, \n                                                    const char *buf,\n                                                    apr_size_t nbyte);\n\n/**\n * Create a bucket referring to memory on the heap. If the caller asks\n * for the data to be copied, this function always allocates 4K of\n * memory so that more data can be added to the bucket without\n * requiring another allocation. Therefore not all the data may be put\n * into the bucket. If copying is not requested then the bucket takes\n * over responsibility for free()ing the memory.\n * @param buf The buffer to insert into the bucket\n * @param nbyte The size of the buffer to insert.\n * @param free_func Function to use to free the data; NULL indicates that the\n *                  bucket should make a copy of the data\n * @param list The freelist from which this bucket should be allocated\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_heap_create(const char *buf, \n                                                 apr_size_t nbyte,\n                                                 void (*free_func)(void *data),\n                                                 apr_bucket_alloc_t *list);\n/**\n * Make the bucket passed in a bucket refer to heap data\n * @param b The bucket to make into a HEAP bucket\n * @param buf The buffer to insert into the bucket\n * @param nbyte The size of the buffer to insert.\n * @param free_func Function to use to free the data; NULL indicates that the\n *                  bucket should make a copy of the data\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_heap_make(apr_bucket *b, const char *buf,\n                                               apr_size_t nbyte,\n                                               void (*free_func)(void *data));\n\n/**\n * Create a bucket referring to memory allocated from a pool.\n *\n * @param buf The buffer to insert into the bucket\n * @param length The number of bytes referred to by this bucket\n * @param pool The pool the memory was allocated from\n * @param list The freelist from which this bucket should be allocated\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_pool_create(const char *buf, \n                                                 apr_size_t length,\n                                                 apr_pool_t *pool,\n                                                 apr_bucket_alloc_t *list);\n\n/**\n * Make the bucket passed in a bucket refer to pool data\n * @param b The bucket to make into a pool bucket\n * @param buf The buffer to insert into the bucket\n * @param length The number of bytes referred to by this bucket\n * @param pool The pool the memory was allocated from\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_pool_make(apr_bucket *b, const char *buf,\n                                               apr_size_t length, \n                                               apr_pool_t *pool);\n\n#if APR_HAS_MMAP\n/**\n * Create a bucket referring to mmap()ed memory.\n * @param mm The mmap to insert into the bucket\n * @param start The offset of the first byte in the mmap\n *              that this bucket refers to\n * @param length The number of bytes referred to by this bucket\n * @param list The freelist from which this bucket should be allocated\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_mmap_create(apr_mmap_t *mm, \n                                                 apr_off_t start,\n                                                 apr_size_t length,\n                                                 apr_bucket_alloc_t *list);\n\n/**\n * Make the bucket passed in a bucket refer to an MMAP'ed file\n * @param b The bucket to make into a MMAP bucket\n * @param mm The mmap to insert into the bucket\n * @param start The offset of the first byte in the mmap\n *              that this bucket refers to\n * @param length The number of bytes referred to by this bucket\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_mmap_make(apr_bucket *b, apr_mmap_t *mm,\n                                               apr_off_t start, \n                                               apr_size_t length);\n#endif\n\n/**\n * Create a bucket referring to a socket.\n * @param thissock The socket to put in the bucket\n * @param list The freelist from which this bucket should be allocated\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_socket_create(apr_socket_t *thissock,\n                                                   apr_bucket_alloc_t *list);\n/**\n * Make the bucket passed in a bucket refer to a socket\n * @param b The bucket to make into a SOCKET bucket\n * @param thissock The socket to put in the bucket\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_socket_make(apr_bucket *b, \n                                                 apr_socket_t *thissock);\n\n/**\n * Create a bucket referring to a pipe.\n * @param thispipe The pipe to put in the bucket\n * @param list The freelist from which this bucket should be allocated\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_pipe_create(apr_file_t *thispipe,\n                                                 apr_bucket_alloc_t *list);\n\n/**\n * Make the bucket passed in a bucket refer to a pipe\n * @param b The bucket to make into a PIPE bucket\n * @param thispipe The pipe to put in the bucket\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_pipe_make(apr_bucket *b, \n                                               apr_file_t *thispipe);\n\n/**\n * Create a bucket referring to a file.\n * @param fd The file to put in the bucket\n * @param offset The offset where the data of interest begins in the file\n * @param len The amount of data in the file we are interested in\n * @param p The pool into which any needed structures should be created\n *          while reading from this file bucket\n * @param list The freelist from which this bucket should be allocated\n * @return The new bucket, or NULL if allocation failed\n * @remark If the file is truncated such that the segment of the file\n * referenced by the bucket no longer exists, an attempt to read\n * from the bucket will fail with APR_EOF. \n * @remark apr_brigade_insert_file() should generally be used to\n * insert files into brigades, since that function can correctly\n * handle large file issues.\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_file_create(apr_file_t *fd,\n                                                 apr_off_t offset,\n                                                 apr_size_t len, \n                                                 apr_pool_t *p,\n                                                 apr_bucket_alloc_t *list);\n\n/**\n * Make the bucket passed in a bucket refer to a file\n * @param b The bucket to make into a FILE bucket\n * @param fd The file to put in the bucket\n * @param offset The offset where the data of interest begins in the file\n * @param len The amount of data in the file we are interested in\n * @param p The pool into which any needed structures should be created\n *          while reading from this file bucket\n * @return The new bucket, or NULL if allocation failed\n */\nAPU_DECLARE(apr_bucket *) apr_bucket_file_make(apr_bucket *b, apr_file_t *fd,\n                                               apr_off_t offset,\n                                               apr_size_t len, apr_pool_t *p);\n\n/**\n * Enable or disable memory-mapping for a FILE bucket (default is enabled)\n * @param b The bucket\n * @param enabled Whether memory-mapping should be enabled\n * @return APR_SUCCESS normally, or an error code if the operation fails\n */\nAPU_DECLARE(apr_status_t) apr_bucket_file_enable_mmap(apr_bucket *b,\n                                                      int enabled);\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* !APR_BUCKETS_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_crypto.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_CRYPTO_H\n#define APR_CRYPTO_H\n\n#include \"apu.h\"\n#include \"apr_pools.h\"\n#include \"apr_tables.h\"\n#include \"apr_hash.h\"\n#include \"apu_errno.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @file apr_crypto.h\n * @brief APR-UTIL Crypto library\n */\n/**\n * @defgroup APR_Util_Crypto Crypto routines\n * @ingroup APR_Util\n * @{\n */\n\n#if APU_HAVE_CRYPTO\n\n#ifndef APU_CRYPTO_RECOMMENDED_DRIVER\n#if APU_HAVE_OPENSSL\n#define APU_CRYPTO_RECOMMENDED_DRIVER \"openssl\"\n#else\n#if APU_HAVE_NSS\n#define APU_CRYPTO_RECOMMENDED_DRIVER \"nss\"\n#else\n#if APU_HAVE_MSCNG\n#define APU_CRYPTO_RECOMMENDED_DRIVER \"mscng\"\n#else\n#if APU_HAVE_MSCAPI\n#define APU_CRYPTO_RECOMMENDED_DRIVER \"mscapi\"\n#else\n#endif\n#endif\n#endif\n#endif\n#endif\n\n/**\n * Symmetric Key types understood by the library.\n *\n * NOTE: It is expected that this list will grow over time.\n *\n * Interoperability Matrix:\n *\n * The matrix is based on the testcrypto.c unit test, which attempts to\n * test whether a simple encrypt/decrypt will succeed, as well as testing\n * whether an encrypted string by one library can be decrypted by the\n * others.\n *\n * Some libraries will successfully encrypt and decrypt their own data,\n * but won't decrypt data from another library. It is hoped that over\n * time these anomalies will be found and fixed, but until then it is\n * recommended that ciphers are chosen that interoperate across platform.\n *\n * An X below means the test passes, it does not necessarily mean that\n * encryption performed is correct or secure. Applications should stick\n * to ciphers that pass the interoperablity tests on the right hand side\n * of the table.\n *\n * Aligned data is data whose length is a multiple of the block size for\n * the chosen cipher. Padded data is data that is not aligned by block\n * size and must be padded by the crypto library.\n *\n *                  OpenSSL      NSS      Interop\n *                 Align Pad  Align Pad  Align Pad\n * 3DES_192/CBC    X     X    X     X    X     X\n * 3DES_192/ECB    X     X\n * AES_256/CBC     X     X    X     X    X     X\n * AES_256/ECB     X     X    X          X\n * AES_192/CBC     X     X    X     X\n * AES_192/ECB     X     X    X\n * AES_128/CBC     X     X    X     X\n * AES_128/ECB     X     X    X\n *\n * Conclusion: for padded data, use 3DES_192/CBC or AES_256/CBC. For\n * aligned data, use 3DES_192/CBC, AES_256/CBC or AES_256/ECB.\n */\n\ntypedef enum\n{\n    APR_KEY_NONE, APR_KEY_3DES_192, /** 192 bit (3-Key) 3DES */\n    APR_KEY_AES_128, /** 128 bit AES */\n    APR_KEY_AES_192, /** 192 bit AES */\n    APR_KEY_AES_256\n/** 256 bit AES */\n} apr_crypto_block_key_type_e;\n\ntypedef enum\n{\n    APR_MODE_NONE, /** An error condition */\n    APR_MODE_ECB, /** Electronic Code Book */\n    APR_MODE_CBC\n/** Cipher Block Chaining */\n} apr_crypto_block_key_mode_e;\n\n/* These are opaque structs.  Instantiation is up to each backend */\ntypedef struct apr_crypto_driver_t apr_crypto_driver_t;\ntypedef struct apr_crypto_t apr_crypto_t;\ntypedef struct apr_crypto_config_t apr_crypto_config_t;\ntypedef struct apr_crypto_key_t apr_crypto_key_t;\ntypedef struct apr_crypto_block_t apr_crypto_block_t;\n\n/**\n * @brief Perform once-only initialisation. Call once only.\n *\n * @param pool - pool to register any shutdown cleanups, etc\n * @return APR_NOTIMPL in case of no crypto support.\n */\nAPU_DECLARE(apr_status_t) apr_crypto_init(apr_pool_t *pool);\n\n/**\n * @brief Register a cleanup to zero out the buffer provided\n * when the pool is cleaned up.\n *\n * @param pool - pool to register the cleanup\n * @param buffer - buffer to zero out\n * @param size - size of the buffer to zero out\n */\nAPU_DECLARE(apr_status_t) apr_crypto_clear(apr_pool_t *pool, void *buffer,\n        apr_size_t size);\n\n/**\n * @brief Get the driver struct for a name\n *\n * @param driver - pointer to driver struct.\n * @param name - driver name\n * @param params - array of initialisation parameters\n * @param result - result and error message on failure\n * @param pool - (process) pool to register cleanup\n * @return APR_SUCCESS for success\n * @return APR_ENOTIMPL for no driver (when DSO not enabled)\n * @return APR_EDSOOPEN if DSO driver file can't be opened\n * @return APR_ESYMNOTFOUND if the driver file doesn't contain a driver\n * @remarks NSS: the params can have \"dir\", \"key3\", \"cert7\" and \"secmod\"\n *  keys, each followed by an equal sign and a value. Such key/value pairs can\n *  be delimited by space or tab. If the value contains a space, surround the\n *  whole key value pair in quotes: \"dir=My Directory\".\n * @remarks OpenSSL: currently no params are supported.\n */\nAPU_DECLARE(apr_status_t) apr_crypto_get_driver(\n        const apr_crypto_driver_t **driver,\n        const char *name, const char *params, const apu_err_t **result,\n        apr_pool_t *pool);\n\n/**\n * @brief Return the name of the driver.\n *\n * @param driver - The driver in use.\n * @return The name of the driver.\n */\nAPU_DECLARE(const char *) apr_crypto_driver_name(\n        const apr_crypto_driver_t *driver);\n\n/**\n * @brief Get the result of the last operation on a context. If the result\n *        is NULL, the operation was successful.\n * @param result - the result structure\n * @param f - context pointer\n * @return APR_SUCCESS for success\n */\nAPU_DECLARE(apr_status_t) apr_crypto_error(const apu_err_t **result,\n        const apr_crypto_t *f);\n\n/**\n * @brief Create a context for supporting encryption. Keys, certificates,\n *        algorithms and other parameters will be set per context. More than\n *        one context can be created at one time. A cleanup will be automatically\n *        registered with the given pool to guarantee a graceful shutdown.\n * @param f - context pointer will be written here\n * @param driver - driver to use\n * @param params - array of key parameters\n * @param pool - process pool\n * @return APR_ENOENGINE when the engine specified does not exist. APR_EINITENGINE\n * if the engine cannot be initialised.\n * @remarks NSS: currently no params are supported.\n * @remarks OpenSSL: the params can have \"engine\" as a key, followed by an equal\n *  sign and a value.\n */\nAPU_DECLARE(apr_status_t) apr_crypto_make(apr_crypto_t **f,\n        const apr_crypto_driver_t *driver, const char *params,\n        apr_pool_t *pool);\n\n/**\n * @brief Get a hash table of key types, keyed by the name of the type against\n * an integer pointer constant.\n *\n * @param types - hashtable of key types keyed to constants.\n * @param f - encryption context\n * @return APR_SUCCESS for success\n */\nAPU_DECLARE(apr_status_t) apr_crypto_get_block_key_types(apr_hash_t **types,\n        const apr_crypto_t *f);\n\n/**\n * @brief Get a hash table of key modes, keyed by the name of the mode against\n * an integer pointer constant.\n *\n * @param modes - hashtable of key modes keyed to constants.\n * @param f - encryption context\n * @return APR_SUCCESS for success\n */\nAPU_DECLARE(apr_status_t) apr_crypto_get_block_key_modes(apr_hash_t **modes,\n        const apr_crypto_t *f);\n\n/**\n * @brief Create a key from the given passphrase. By default, the PBKDF2\n *        algorithm is used to generate the key from the passphrase. It is expected\n *        that the same pass phrase will generate the same key, regardless of the\n *        backend crypto platform used. The key is cleaned up when the context\n *        is cleaned, and may be reused with multiple encryption or decryption\n *        operations.\n * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If\n *       *key is not NULL, *key must point at a previously created structure.\n * @param key The key returned, see note.\n * @param ivSize The size of the initialisation vector will be returned, based\n *               on whether an IV is relevant for this type of crypto.\n * @param pass The passphrase to use.\n * @param passLen The passphrase length in bytes\n * @param salt The salt to use.\n * @param saltLen The salt length in bytes\n * @param type 3DES_192, AES_128, AES_192, AES_256.\n * @param mode Electronic Code Book / Cipher Block Chaining.\n * @param doPad Pad if necessary.\n * @param iterations Number of iterations to use in algorithm\n * @param f The context to use.\n * @param p The pool to use.\n * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend\n *         error occurred while generating the key. APR_ENOCIPHER if the type or mode\n *         is not supported by the particular backend. APR_EKEYTYPE if the key type is\n *         not known. APR_EPADDING if padding was requested but is not supported.\n *         APR_ENOTIMPL if not implemented.\n */\nAPU_DECLARE(apr_status_t) apr_crypto_passphrase(apr_crypto_key_t **key,\n        apr_size_t *ivSize, const char *pass, apr_size_t passLen,\n        const unsigned char * salt, apr_size_t saltLen,\n        const apr_crypto_block_key_type_e type,\n        const apr_crypto_block_key_mode_e mode, const int doPad,\n        const int iterations, const apr_crypto_t *f, apr_pool_t *p);\n\n/**\n * @brief Initialise a context for encrypting arbitrary data using the given key.\n * @note If *ctx is NULL, a apr_crypto_block_t will be created from a pool. If\n *       *ctx is not NULL, *ctx must point at a previously created structure.\n * @param ctx The block context returned, see note.\n * @param iv Optional initialisation vector. If the buffer pointed to is NULL,\n *           an IV will be created at random, in space allocated from the pool.\n *           If the buffer pointed to is not NULL, the IV in the buffer will be\n *           used.\n * @param key The key structure to use.\n * @param blockSize The block size of the cipher.\n * @param p The pool to use.\n * @return Returns APR_ENOIV if an initialisation vector is required but not specified.\n *         Returns APR_EINIT if the backend failed to initialise the context. Returns\n *         APR_ENOTIMPL if not implemented.\n */\nAPU_DECLARE(apr_status_t) apr_crypto_block_encrypt_init(\n        apr_crypto_block_t **ctx, const unsigned char **iv,\n        const apr_crypto_key_t *key, apr_size_t *blockSize, apr_pool_t *p);\n\n/**\n * @brief Encrypt data provided by in, write it to out.\n * @note The number of bytes written will be written to outlen. If\n *       out is NULL, outlen will contain the maximum size of the\n *       buffer needed to hold the data, including any data\n *       generated by apr_crypto_block_encrypt_finish below. If *out points\n *       to NULL, a buffer sufficiently large will be created from\n *       the pool provided. If *out points to a not-NULL value, this\n *       value will be used as a buffer instead.\n * @param out Address of a buffer to which data will be written,\n *        see note.\n * @param outlen Length of the output will be written here.\n * @param in Address of the buffer to read.\n * @param inlen Length of the buffer to read.\n * @param ctx The block context to use.\n * @return APR_ECRYPT if an error occurred. Returns APR_ENOTIMPL if\n *         not implemented.\n */\nAPU_DECLARE(apr_status_t) apr_crypto_block_encrypt(unsigned char **out,\n        apr_size_t *outlen, const unsigned char *in, apr_size_t inlen,\n        apr_crypto_block_t *ctx);\n\n/**\n * @brief Encrypt final data block, write it to out.\n * @note If necessary the final block will be written out after being\n *       padded. Typically the final block will be written to the\n *       same buffer used by apr_crypto_block_encrypt, offset by the\n *       number of bytes returned as actually written by the\n *       apr_crypto_block_encrypt() call. After this call, the context\n *       is cleaned and can be reused by apr_crypto_block_encrypt_init().\n * @param out Address of a buffer to which data will be written. This\n *            buffer must already exist, and is usually the same\n *            buffer used by apr_evp_crypt(). See note.\n * @param outlen Length of the output will be written here.\n * @param ctx The block context to use.\n * @return APR_ECRYPT if an error occurred.\n * @return APR_EPADDING if padding was enabled and the block was incorrectly\n *         formatted.\n * @return APR_ENOTIMPL if not implemented.\n */\nAPU_DECLARE(apr_status_t) apr_crypto_block_encrypt_finish(unsigned char *out,\n        apr_size_t *outlen, apr_crypto_block_t *ctx);\n\n/**\n * @brief Initialise a context for decrypting arbitrary data using the given key.\n * @note If *ctx is NULL, a apr_crypto_block_t will be created from a pool. If\n *       *ctx is not NULL, *ctx must point at a previously created structure.\n * @param ctx The block context returned, see note.\n * @param blockSize The block size of the cipher.\n * @param iv Optional initialisation vector.\n * @param key The key structure to use.\n * @param p The pool to use.\n * @return Returns APR_ENOIV if an initialisation vector is required but not specified.\n *         Returns APR_EINIT if the backend failed to initialise the context. Returns\n *         APR_ENOTIMPL if not implemented.\n */\nAPU_DECLARE(apr_status_t) apr_crypto_block_decrypt_init(\n        apr_crypto_block_t **ctx, apr_size_t *blockSize,\n        const unsigned char *iv, const apr_crypto_key_t *key, apr_pool_t *p);\n\n/**\n * @brief Decrypt data provided by in, write it to out.\n * @note The number of bytes written will be written to outlen. If\n *       out is NULL, outlen will contain the maximum size of the\n *       buffer needed to hold the data, including any data\n *       generated by apr_crypto_block_decrypt_finish below. If *out points\n *       to NULL, a buffer sufficiently large will be created from\n *       the pool provided. If *out points to a not-NULL value, this\n *       value will be used as a buffer instead.\n * @param out Address of a buffer to which data will be written,\n *        see note.\n * @param outlen Length of the output will be written here.\n * @param in Address of the buffer to read.\n * @param inlen Length of the buffer to read.\n * @param ctx The block context to use.\n * @return APR_ECRYPT if an error occurred. Returns APR_ENOTIMPL if\n *         not implemented.\n */\nAPU_DECLARE(apr_status_t) apr_crypto_block_decrypt(unsigned char **out,\n        apr_size_t *outlen, const unsigned char *in, apr_size_t inlen,\n        apr_crypto_block_t *ctx);\n\n/**\n * @brief Decrypt final data block, write it to out.\n * @note If necessary the final block will be written out after being\n *       padded. Typically the final block will be written to the\n *       same buffer used by apr_crypto_block_decrypt, offset by the\n *       number of bytes returned as actually written by the\n *       apr_crypto_block_decrypt() call. After this call, the context\n *       is cleaned and can be reused by apr_crypto_block_decrypt_init().\n * @param out Address of a buffer to which data will be written. This\n *            buffer must already exist, and is usually the same\n *            buffer used by apr_evp_crypt(). See note.\n * @param outlen Length of the output will be written here.\n * @param ctx The block context to use.\n * @return APR_ECRYPT if an error occurred.\n * @return APR_EPADDING if padding was enabled and the block was incorrectly\n *         formatted.\n * @return APR_ENOTIMPL if not implemented.\n */\nAPU_DECLARE(apr_status_t) apr_crypto_block_decrypt_finish(unsigned char *out,\n        apr_size_t *outlen, apr_crypto_block_t *ctx);\n\n/**\n * @brief Clean encryption / decryption context.\n * @note After cleanup, a context is free to be reused if necessary.\n * @param ctx The block context to use.\n * @return Returns APR_ENOTIMPL if not supported.\n */\nAPU_DECLARE(apr_status_t) apr_crypto_block_cleanup(apr_crypto_block_t *ctx);\n\n/**\n * @brief Clean encryption / decryption context.\n * @note After cleanup, a context is free to be reused if necessary.\n * @param f The context to use.\n * @return Returns APR_ENOTIMPL if not supported.\n */\nAPU_DECLARE(apr_status_t) apr_crypto_cleanup(apr_crypto_t *f);\n\n/**\n * @brief Shutdown the crypto library.\n * @note After shutdown, it is expected that the init function can be called again.\n * @param driver - driver to use\n * @return Returns APR_ENOTIMPL if not supported.\n */\nAPU_DECLARE(apr_status_t) apr_crypto_shutdown(\n        const apr_crypto_driver_t *driver);\n\n#endif /* APU_HAVE_CRYPTO */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "third_party/include/aprutil/apr_date.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_DATE_H\n#define APR_DATE_H\n\n/**\n * @file apr_date.h\n * @brief APR-UTIL date routines\n */\n\n/**\n * @defgroup APR_Util_Date Date routines\n * @ingroup APR_Util\n * @{\n */\n\n/*\n * apr_date.h: prototypes for date parsing utility routines\n */\n\n#include \"apu.h\"\n#include \"apr_time.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** A bad date. */\n#define APR_DATE_BAD ((apr_time_t)0)\n\n/**\n * Compare a string to a mask\n * @param data The string to compare\n * @param mask Mask characters (arbitrary maximum is 256 characters):\n * <PRE>\n *   '\\@' - uppercase letter\n *   '\\$' - lowercase letter\n *   '\\&' - hex digit\n *   '#' - digit\n *   '~' - digit or space\n *   '*' - swallow remaining characters\n * </PRE>\n * @remark The mask tests for an exact match for any other character\n * @return 1 if the string matches, 0 otherwise\n */\nAPU_DECLARE(int) apr_date_checkmask(const char *data, const char *mask);\n\n/**\n * Parses an HTTP date in one of three standard forms:\n * <PRE>\n *     Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 822, updated by RFC 1123\n *     Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036\n *     Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format\n * </PRE>\n * @param date The date in one of the three formats above\n * @return the apr_time_t number of microseconds since 1 Jan 1970 GMT, or\n *         0 if this would be out of range or if the date is invalid.\n */\nAPU_DECLARE(apr_time_t) apr_date_parse_http(const char *date);\n\n/**\n * Parses a string resembling an RFC 822 date.  This is meant to be\n * leinent in its parsing of dates.  Hence, this will parse a wider \n * range of dates than apr_date_parse_http.\n *\n * The prominent mailer (or poster, if mailer is unknown) that has\n * been seen in the wild is included for the unknown formats.\n * <PRE>\n *     Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 822, updated by RFC 1123\n *     Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036\n *     Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format\n *     Sun, 6 Nov 1994 08:49:37 GMT   ; RFC 822, updated by RFC 1123\n *     Sun, 06 Nov 94 08:49:37 GMT    ; RFC 822\n *     Sun, 6 Nov 94 08:49:37 GMT     ; RFC 822\n *     Sun, 06 Nov 94 08:49 GMT       ; Unknown [drtr\\@ast.cam.ac.uk] \n *     Sun, 6 Nov 94 08:49 GMT        ; Unknown [drtr\\@ast.cam.ac.uk]\n *     Sun, 06 Nov 94 8:49:37 GMT     ; Unknown [Elm 70.85]\n *     Sun, 6 Nov 94 8:49:37 GMT      ; Unknown [Elm 70.85] \n * </PRE>\n *\n * @param date The date in one of the formats above\n * @return the apr_time_t number of microseconds since 1 Jan 1970 GMT, or\n *         0 if this would be out of range or if the date is invalid.\n */\nAPU_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date);\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif\t/* !APR_DATE_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_dbd.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Overview of what this is and does:\n * http://www.apache.org/~niq/dbd.html\n */\n\n#ifndef APR_DBD_H\n#define APR_DBD_H\n\n#include \"apu.h\"\n#include \"apr_pools.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @file apr_dbd.h\n * @brief APR-UTIL DBD library\n */\n/**\n * @defgroup APR_Util_DBD DBD routines\n * @ingroup APR_Util\n * @{\n */\n\n/**\n * Mapping of C to SQL types, used for prepared statements.\n * @remarks\n * For apr_dbd_p[v]query/select functions, in and out parameters are always\n * const char * (i.e. regular nul terminated strings). LOB types are passed\n * with four (4) arguments: payload, length, table and column, all as const\n * char *, where table and column are reserved for future use by Oracle.\n * @remarks\n * For apr_dbd_p[v]bquery/select functions, in and out parameters are\n * described next to each enumeration constant and are generally native binary\n * types or some APR data type. LOB types are passed with four (4) arguments:\n * payload (char*), length (apr_size_t*), table (char*) and column (char*).\n * Table and column are reserved for future use by Oracle.\n */\ntypedef enum {\n    APR_DBD_TYPE_NONE,\n    APR_DBD_TYPE_TINY,       /**< \\%hhd : in, out: char* */\n    APR_DBD_TYPE_UTINY,      /**< \\%hhu : in, out: unsigned char* */\n    APR_DBD_TYPE_SHORT,      /**< \\%hd  : in, out: short* */\n    APR_DBD_TYPE_USHORT,     /**< \\%hu  : in, out: unsigned short* */\n    APR_DBD_TYPE_INT,        /**< \\%d   : in, out: int* */\n    APR_DBD_TYPE_UINT,       /**< \\%u   : in, out: unsigned int* */\n    APR_DBD_TYPE_LONG,       /**< \\%ld  : in, out: long* */\n    APR_DBD_TYPE_ULONG,      /**< \\%lu  : in, out: unsigned long* */\n    APR_DBD_TYPE_LONGLONG,   /**< \\%lld : in, out: apr_int64_t* */\n    APR_DBD_TYPE_ULONGLONG,  /**< \\%llu : in, out: apr_uint64_t* */\n    APR_DBD_TYPE_FLOAT,      /**< \\%f   : in, out: float* */\n    APR_DBD_TYPE_DOUBLE,     /**< \\%lf  : in, out: double* */\n    APR_DBD_TYPE_STRING,     /**< \\%s   : in: char*, out: char** */\n    APR_DBD_TYPE_TEXT,       /**< \\%pDt : in: char*, out: char** */\n    APR_DBD_TYPE_TIME,       /**< \\%pDi : in: char*, out: char** */\n    APR_DBD_TYPE_DATE,       /**< \\%pDd : in: char*, out: char** */\n    APR_DBD_TYPE_DATETIME,   /**< \\%pDa : in: char*, out: char** */\n    APR_DBD_TYPE_TIMESTAMP,  /**< \\%pDs : in: char*, out: char** */\n    APR_DBD_TYPE_ZTIMESTAMP, /**< \\%pDz : in: char*, out: char** */\n    APR_DBD_TYPE_BLOB,       /**< \\%pDb : in: char* apr_size_t* char* char*, out: apr_bucket_brigade* */\n    APR_DBD_TYPE_CLOB,       /**< \\%pDc : in: char* apr_size_t* char* char*, out: apr_bucket_brigade* */\n    APR_DBD_TYPE_NULL        /**< \\%pDn : in: void*, out: void** */\n} apr_dbd_type_e;\n\n/* These are opaque structs.  Instantiation is up to each backend */\ntypedef struct apr_dbd_driver_t apr_dbd_driver_t;\ntypedef struct apr_dbd_t apr_dbd_t;\ntypedef struct apr_dbd_transaction_t apr_dbd_transaction_t;\ntypedef struct apr_dbd_results_t apr_dbd_results_t;\ntypedef struct apr_dbd_row_t apr_dbd_row_t;\ntypedef struct apr_dbd_prepared_t apr_dbd_prepared_t;\n\n/** apr_dbd_init: perform once-only initialisation.  Call once only.\n *\n *  @param pool - pool to register any shutdown cleanups, etc\n */\nAPU_DECLARE(apr_status_t) apr_dbd_init(apr_pool_t *pool);\n\n/** apr_dbd_get_driver: get the driver struct for a name\n *\n *  @param pool - (process) pool to register cleanup\n *  @param name - driver name\n *  @param driver - pointer to driver struct.\n *  @return APR_SUCCESS for success\n *  @return APR_ENOTIMPL for no driver (when DSO not enabled)\n *  @return APR_EDSOOPEN if DSO driver file can't be opened\n *  @return APR_ESYMNOTFOUND if the driver file doesn't contain a driver\n */\nAPU_DECLARE(apr_status_t) apr_dbd_get_driver(apr_pool_t *pool, const char *name,\n                                             const apr_dbd_driver_t **driver);\n\n/** apr_dbd_open_ex: open a connection to a backend\n *\n *  @param driver - driver struct.\n *  @param pool - working pool\n *  @param params - arguments to driver (implementation-dependent)\n *  @param handle - pointer to handle to return\n *  @param error - descriptive error.\n *  @return APR_SUCCESS for success\n *  @return APR_EGENERAL if driver exists but connection failed\n *  @remarks PostgreSQL: the params is passed directly to the PQconnectdb()\n *  function (check PostgreSQL documentation for more details on the syntax).\n *  @remarks SQLite2: the params is split on a colon, with the first part used\n *  as the filename and second part converted to an integer and used as file\n *  mode.\n *  @remarks SQLite3: the params is passed directly to the sqlite3_open()\n *  function as a filename to be opened (check SQLite3 documentation for more\n *  details).\n *  @remarks Oracle: the params can have \"user\", \"pass\", \"dbname\" and \"server\"\n *  keys, each followed by an equal sign and a value. Such key/value pairs can\n *  be delimited by space, CR, LF, tab, semicolon, vertical bar or comma.\n *  @remarks MySQL: the params can have \"host\", \"port\", \"user\", \"pass\",\n *  \"dbname\", \"sock\", \"flags\" \"fldsz\", \"group\" and \"reconnect\" keys, each\n *  followed by an equal sign and a value. Such key/value pairs can be\n *  delimited by space, CR, LF, tab, semicolon, vertical bar or comma. For\n *  now, \"flags\" can only recognise CLIENT_FOUND_ROWS (check MySQL manual for\n *  details). The value associated with \"fldsz\" determines maximum amount of\n *  memory (in bytes) for each of the fields in the result set of prepared\n *  statements. By default, this value is 1 MB. The value associated with\n *  \"group\" determines which group from configuration file to use (see\n *  MYSQL_READ_DEFAULT_GROUP option of mysql_options() in MySQL manual).\n *  Reconnect is set to 1 by default (i.e. true).\n *  @remarks FreeTDS: the params can have \"username\", \"password\", \"appname\",\n *  \"dbname\", \"host\", \"charset\", \"lang\" and \"server\" keys, each followed by an\n *  equal sign and a value.\n */\nAPU_DECLARE(apr_status_t) apr_dbd_open_ex(const apr_dbd_driver_t *driver,\n                                          apr_pool_t *pool, const char *params,\n                                          apr_dbd_t **handle,\n                                          const char **error);\n\n/** apr_dbd_open: open a connection to a backend\n *\n *  @param driver - driver struct.\n *  @param pool - working pool\n *  @param params - arguments to driver (implementation-dependent)\n *  @param handle - pointer to handle to return\n *  @return APR_SUCCESS for success\n *  @return APR_EGENERAL if driver exists but connection failed\n *  @see apr_dbd_open_ex\n */\nAPU_DECLARE(apr_status_t) apr_dbd_open(const apr_dbd_driver_t *driver,\n                                       apr_pool_t *pool, const char *params,\n                                       apr_dbd_t **handle);\n\n/** apr_dbd_close: close a connection to a backend\n *\n *  @param driver - driver struct.\n *  @param handle - handle to close\n *  @return APR_SUCCESS for success or error status\n */\nAPU_DECLARE(apr_status_t) apr_dbd_close(const apr_dbd_driver_t *driver,\n                                        apr_dbd_t *handle);\n\n/* apr-function-shaped versions of things */\n\n/** apr_dbd_name: get the name of the driver\n *\n *  @param driver - the driver\n *  @return - name\n */\nAPU_DECLARE(const char*) apr_dbd_name(const apr_dbd_driver_t *driver);\n\n/** apr_dbd_native_handle: get native database handle of the underlying db\n *\n *  @param driver - the driver\n *  @param handle - apr_dbd handle\n *  @return - native handle\n */\nAPU_DECLARE(void*) apr_dbd_native_handle(const apr_dbd_driver_t *driver,\n                                         apr_dbd_t *handle);\n\n/** check_conn: check status of a database connection\n *\n *  @param driver - the driver\n *  @param pool - working pool\n *  @param handle - the connection to check\n *  @return APR_SUCCESS or error\n */\nAPU_DECLARE(int) apr_dbd_check_conn(const apr_dbd_driver_t *driver, apr_pool_t *pool,\n                                    apr_dbd_t *handle);\n\n/** apr_dbd_set_dbname: select database name.  May be a no-op if not supported.\n *\n *  @param driver - the driver\n *  @param pool - working pool\n *  @param handle - the connection\n *  @param name - the database to select\n *  @return 0 for success or error code\n */\nAPU_DECLARE(int) apr_dbd_set_dbname(const apr_dbd_driver_t *driver, apr_pool_t *pool,\n                                    apr_dbd_t *handle, const char *name);\n\n/** apr_dbd_transaction_start: start a transaction.  May be a no-op.\n *\n *  @param driver - the driver\n *  @param pool - a pool to use for error messages (if any).\n *  @param handle - the db connection\n *  @param trans - ptr to a transaction.  May be null on entry\n *  @return 0 for success or error code\n *  @remarks Note that transaction modes, set by calling\n *  apr_dbd_transaction_mode_set(), will affect all query/select calls within\n *  a transaction. By default, any error in query/select during a transaction\n *  will cause the transaction to inherit the error code and any further\n *  query/select calls will fail immediately. Put transaction in \"ignore\n *  errors\" mode to avoid that. Use \"rollback\" mode to do explicit rollback.\n */\nAPU_DECLARE(int) apr_dbd_transaction_start(const apr_dbd_driver_t *driver,\n                                           apr_pool_t *pool,\n                                           apr_dbd_t *handle,\n                                           apr_dbd_transaction_t **trans);\n\n/** apr_dbd_transaction_end: end a transaction\n *  (commit on success, rollback on error).\n *  May be a no-op.\n *\n *  @param driver - the driver\n *  @param handle - the db connection\n *  @param trans - the transaction.\n *  @return 0 for success or error code\n */\nAPU_DECLARE(int) apr_dbd_transaction_end(const apr_dbd_driver_t *driver,\n                                         apr_pool_t *pool,\n                                         apr_dbd_transaction_t *trans);\n\n#define APR_DBD_TRANSACTION_COMMIT        0x00  /**< commit the transaction */\n#define APR_DBD_TRANSACTION_ROLLBACK      0x01  /**< rollback the transaction */\n#define APR_DBD_TRANSACTION_IGNORE_ERRORS 0x02  /**< ignore transaction errors */\n\n/** apr_dbd_transaction_mode_get: get the mode of transaction\n *\n *  @param driver - the driver\n *  @param trans  - the transaction\n *  @return mode of transaction\n */\nAPU_DECLARE(int) apr_dbd_transaction_mode_get(const apr_dbd_driver_t *driver,\n                                              apr_dbd_transaction_t *trans);\n\n/** apr_dbd_transaction_mode_set: set the mode of transaction\n *\n *  @param driver - the driver\n *  @param trans  - the transaction\n *  @param mode   - new mode of the transaction\n *  @return the mode of transaction in force after the call\n */\nAPU_DECLARE(int) apr_dbd_transaction_mode_set(const apr_dbd_driver_t *driver,\n                                              apr_dbd_transaction_t *trans,\n                                              int mode);\n\n/** apr_dbd_query: execute an SQL query that doesn't return a result set\n *\n *  @param driver - the driver\n *  @param handle - the connection\n *  @param nrows - number of rows affected.\n *  @param statement - the SQL statement to execute\n *  @return 0 for success or error code\n */\nAPU_DECLARE(int) apr_dbd_query(const apr_dbd_driver_t *driver, apr_dbd_t *handle,\n                               int *nrows, const char *statement);\n\n/** apr_dbd_select: execute an SQL query that returns a result set\n *\n *  @param driver - the driver\n *  @param pool - pool to allocate the result set\n *  @param handle - the connection\n *  @param res - pointer to result set pointer.  May point to NULL on entry\n *  @param statement - the SQL statement to execute\n *  @param random - 1 to support random access to results (seek any row);\n *                  0 to support only looping through results in order\n *                    (async access - faster)\n *  @return 0 for success or error code\n */\nAPU_DECLARE(int) apr_dbd_select(const apr_dbd_driver_t *driver, apr_pool_t *pool,\n                                apr_dbd_t *handle, apr_dbd_results_t **res,\n                                const char *statement, int random);\n\n/** apr_dbd_num_cols: get the number of columns in a results set\n *\n *  @param driver - the driver\n *  @param res - result set.\n *  @return number of columns\n */\nAPU_DECLARE(int) apr_dbd_num_cols(const apr_dbd_driver_t *driver,\n                                  apr_dbd_results_t *res);\n\n/** apr_dbd_num_tuples: get the number of rows in a results set\n *  of a synchronous select\n *\n *  @param driver - the driver\n *  @param res - result set.\n *  @return number of rows, or -1 if the results are asynchronous\n */\nAPU_DECLARE(int) apr_dbd_num_tuples(const apr_dbd_driver_t *driver,\n                                    apr_dbd_results_t *res);\n\n/** apr_dbd_get_row: get a row from a result set\n *\n *  @param driver - the driver\n *  @param pool - pool to allocate the row\n *  @param res - result set pointer\n *  @param row - pointer to row pointer.  May point to NULL on entry\n *  @param rownum - row number (counting from 1), or -1 for \"next row\".\n *                  Ignored if random access is not supported.\n *  @return 0 for success, -1 for rownum out of range or data finished\n */\nAPU_DECLARE(int) apr_dbd_get_row(const apr_dbd_driver_t *driver, apr_pool_t *pool,\n                                 apr_dbd_results_t *res, apr_dbd_row_t **row,\n                                 int rownum);\n\n/** apr_dbd_get_entry: get an entry from a row\n *\n *  @param driver - the driver\n *  @param row - row pointer\n *  @param col - entry number\n *  @return value from the row, or NULL if col is out of bounds.\n */\nAPU_DECLARE(const char*) apr_dbd_get_entry(const apr_dbd_driver_t *driver,\n                                           apr_dbd_row_t *row, int col);\n\n/** apr_dbd_get_name: get an entry name from a result set\n *\n *  @param driver - the driver\n *  @param res - result set pointer\n *  @param col - entry number\n *  @return name of the entry, or NULL if col is out of bounds.\n */\nAPU_DECLARE(const char*) apr_dbd_get_name(const apr_dbd_driver_t *driver,\n                                          apr_dbd_results_t *res, int col);\n\n\n/** apr_dbd_error: get current error message (if any)\n *\n *  @param driver - the driver\n *  @param handle - the connection\n *  @param errnum - error code from operation that returned an error\n *  @return the database current error message, or message for errnum\n *          (implementation-dependent whether errnum is ignored)\n */\nAPU_DECLARE(const char*) apr_dbd_error(const apr_dbd_driver_t *driver,\n                                       apr_dbd_t *handle, int errnum);\n\n/** apr_dbd_escape: escape a string so it is safe for use in query/select\n *\n *  @param driver - the driver\n *  @param pool - pool to alloc the result from\n *  @param string - the string to escape\n *  @param handle - the connection\n *  @return the escaped, safe string\n */\nAPU_DECLARE(const char*) apr_dbd_escape(const apr_dbd_driver_t *driver,\n                                        apr_pool_t *pool, const char *string,\n                                        apr_dbd_t *handle);\n\n/** apr_dbd_prepare: prepare a statement\n *\n *  @param driver - the driver\n *  @param pool - pool to alloc the result from\n *  @param handle - the connection\n *  @param query - the SQL query\n *  @param label - A label for the prepared statement.\n *                 use NULL for temporary prepared statements\n *                 (eg within a Request in httpd)\n *  @param statement - statement to prepare.  May point to null on entry.\n *  @return 0 for success or error code\n *  @remarks To specify parameters of the prepared query, use \\%s, \\%d etc.\n *  (see below for full list) in place of database specific parameter syntax\n *  (e.g.  for PostgreSQL, this would be $1, $2, for SQLite3 this would be ?\n *  etc.).  For instance: \"SELECT name FROM customers WHERE name=%s\" would be\n *  a query that this function understands.\n *  @remarks Here is the full list of format specifiers that this function\n *  understands and what they map to in SQL: \\%hhd (TINY INT), \\%hhu (UNSIGNED\n *  TINY INT), \\%hd (SHORT), \\%hu (UNSIGNED SHORT), \\%d (INT), \\%u (UNSIGNED\n *  INT), \\%ld (LONG), \\%lu (UNSIGNED LONG), \\%lld (LONG LONG), \\%llu\n *  (UNSIGNED LONG LONG), \\%f (FLOAT, REAL), \\%lf (DOUBLE PRECISION), \\%s\n *  (VARCHAR), \\%pDt (TEXT), \\%pDi (TIME), \\%pDd (DATE), \\%pDa (DATETIME),\n *  \\%pDs (TIMESTAMP), \\%pDz (TIMESTAMP WITH TIME ZONE), \\%pDb (BLOB), \\%pDc\n *  (CLOB) and \\%pDn (NULL). Not all databases have support for all these\n *  types, so the underlying driver will attempt the \"best match\" where\n *  possible. A \\% followed by any letter not in the above list will be\n *  interpreted as VARCHAR (i.e. \\%s).\n */\nAPU_DECLARE(int) apr_dbd_prepare(const apr_dbd_driver_t *driver, apr_pool_t *pool,\n                                 apr_dbd_t *handle, const char *query,\n                                 const char *label,\n                                 apr_dbd_prepared_t **statement);\n\n\n/** apr_dbd_pquery: query using a prepared statement + args\n *\n *  @param driver - the driver\n *  @param pool - working pool\n *  @param handle - the connection\n *  @param nrows - number of rows affected.\n *  @param statement - the prepared statement to execute\n *  @param nargs - ignored (for backward compatibility only)\n *  @param args - args to prepared statement\n *  @return 0 for success or error code\n */\nAPU_DECLARE(int) apr_dbd_pquery(const apr_dbd_driver_t *driver, apr_pool_t *pool,\n                                apr_dbd_t *handle, int *nrows,\n                                apr_dbd_prepared_t *statement, int nargs,\n                                const char **args);\n\n/** apr_dbd_pselect: select using a prepared statement + args\n *\n *  @param driver - the driver\n *  @param pool - working pool\n *  @param handle - the connection\n *  @param res - pointer to query results.  May point to NULL on entry\n *  @param statement - the prepared statement to execute\n *  @param random - Whether to support random-access to results\n *  @param nargs - ignored (for backward compatibility only)\n *  @param args - args to prepared statement\n *  @return 0 for success or error code\n */\nAPU_DECLARE(int) apr_dbd_pselect(const apr_dbd_driver_t *driver, apr_pool_t *pool,\n                                 apr_dbd_t *handle, apr_dbd_results_t **res,\n                                 apr_dbd_prepared_t *statement, int random,\n                                 int nargs, const char **args);\n\n/** apr_dbd_pvquery: query using a prepared statement + args\n *\n *  @param driver - the driver\n *  @param pool - working pool\n *  @param handle - the connection\n *  @param nrows - number of rows affected.\n *  @param statement - the prepared statement to execute\n *  @param ... - varargs list\n *  @return 0 for success or error code\n */\nAPU_DECLARE_NONSTD(int) apr_dbd_pvquery(const apr_dbd_driver_t *driver, \n                                        apr_pool_t *pool,\n                                        apr_dbd_t *handle, int *nrows,\n                                        apr_dbd_prepared_t *statement, ...);\n\n/** apr_dbd_pvselect: select using a prepared statement + args\n *\n *  @param driver - the driver\n *  @param pool - working pool\n *  @param handle - the connection\n *  @param res - pointer to query results.  May point to NULL on entry\n *  @param statement - the prepared statement to execute\n *  @param random - Whether to support random-access to results\n *  @param ... - varargs list\n *  @return 0 for success or error code\n */\nAPU_DECLARE_NONSTD(int) apr_dbd_pvselect(const apr_dbd_driver_t *driver,\n                                         apr_pool_t *pool, apr_dbd_t *handle,\n                                         apr_dbd_results_t **res,\n                                         apr_dbd_prepared_t *statement,\n                                         int random, ...);\n\n/** apr_dbd_pbquery: query using a prepared statement + binary args\n *\n *  @param driver - the driver\n *  @param pool - working pool\n *  @param handle - the connection\n *  @param nrows - number of rows affected.\n *  @param statement - the prepared statement to execute\n *  @param args - binary args to prepared statement\n *  @return 0 for success or error code\n */\nAPU_DECLARE(int) apr_dbd_pbquery(const apr_dbd_driver_t *driver,\n                                 apr_pool_t *pool, apr_dbd_t *handle,\n                                 int *nrows, apr_dbd_prepared_t *statement,\n                                 const void **args);\n\n/** apr_dbd_pbselect: select using a prepared statement + binary args\n *\n *  @param driver - the driver\n *  @param pool - working pool\n *  @param handle - the connection\n *  @param res - pointer to query results.  May point to NULL on entry\n *  @param statement - the prepared statement to execute\n *  @param random - Whether to support random-access to results\n *  @param args - binary args to prepared statement\n *  @return 0 for success or error code\n */\nAPU_DECLARE(int) apr_dbd_pbselect(const apr_dbd_driver_t *driver,\n                                  apr_pool_t *pool,\n                                  apr_dbd_t *handle, apr_dbd_results_t **res,\n                                  apr_dbd_prepared_t *statement, int random,\n                                  const void **args);\n\n/** apr_dbd_pvbquery: query using a prepared statement + binary args\n *\n *  @param driver - the driver\n *  @param pool - working pool\n *  @param handle - the connection\n *  @param nrows - number of rows affected.\n *  @param statement - the prepared statement to execute\n *  @param ... - varargs list of binary args\n *  @return 0 for success or error code\n */\nAPU_DECLARE_NONSTD(int) apr_dbd_pvbquery(const apr_dbd_driver_t *driver,\n                                         apr_pool_t *pool,\n                                         apr_dbd_t *handle, int *nrows,\n                                         apr_dbd_prepared_t *statement, ...);\n\n/** apr_dbd_pvbselect: select using a prepared statement + binary args\n *\n *  @param driver - the driver\n *  @param pool - working pool\n *  @param handle - the connection\n *  @param res - pointer to query results.  May point to NULL on entry\n *  @param statement - the prepared statement to execute\n *  @param random - Whether to support random-access to results\n *  @param ... - varargs list of binary args\n *  @return 0 for success or error code\n */\nAPU_DECLARE_NONSTD(int) apr_dbd_pvbselect(const apr_dbd_driver_t *driver,\n                                          apr_pool_t *pool, apr_dbd_t *handle,\n                                          apr_dbd_results_t **res,\n                                          apr_dbd_prepared_t *statement,\n                                          int random, ...);\n\n/** apr_dbd_datum_get: get a binary entry from a row\n *\n *  @param driver - the driver\n *  @param row - row pointer\n *  @param col - entry number\n *  @param type - type of data to get\n *  @param data - pointer to data, allocated by the caller\n *  @return APR_SUCCESS on success, APR_ENOENT if data is NULL or APR_EGENERAL\n */\nAPU_DECLARE(apr_status_t) apr_dbd_datum_get(const apr_dbd_driver_t *driver,\n                                            apr_dbd_row_t *row, int col,\n                                            apr_dbd_type_e type, void *data);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "third_party/include/aprutil/apr_dbm.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_DBM_H\n#define APR_DBM_H\n\n#include \"apu.h\"\n#include \"apr.h\"\n#include \"apr_errno.h\"\n#include \"apr_pools.h\"\n#include \"apr_file_info.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @file apr_dbm.h\n * @brief APR-UTIL DBM library\n */\n/** \n * @defgroup APR_Util_DBM DBM routines\n * @ingroup APR_Util\n * @{\n */\n/**\n * Structure for referencing a dbm\n */\ntypedef struct apr_dbm_t apr_dbm_t;\n\n/**\n * Structure for referencing the datum record within a dbm\n */\ntypedef struct\n{\n    /** pointer to the 'data' to retrieve/store in the DBM */\n    char *dptr;\n    /** size of the 'data' to retrieve/store in the DBM */\n    apr_size_t dsize;\n} apr_datum_t;\n\n/* modes to open the DB */\n#define APR_DBM_READONLY        1       /**< open for read-only access */\n#define APR_DBM_READWRITE       2       /**< open for read-write access */\n#define APR_DBM_RWCREATE        3       /**< open for r/w, create if needed */\n#define APR_DBM_RWTRUNC         4       /**< open for r/w, truncating an existing\n                                          DB if present */\n/**\n * Open a dbm file by file name and type of DBM\n * @param dbm The newly opened database\n * @param type The type of the DBM (not all may be available at run time)\n * <pre>\n *  db   for Berkeley DB files\n *  gdbm for GDBM files\n *  ndbm for NDBM files\n *  sdbm for SDBM files (always available)\n *  default for the default DBM type\n *  </pre>\n * @param name The dbm file name to open\n * @param mode The flag value\n * <PRE>\n *           APR_DBM_READONLY   open for read-only access\n *           APR_DBM_READWRITE  open for read-write access\n *           APR_DBM_RWCREATE   open for r/w, create if needed\n *           APR_DBM_RWTRUNC    open for r/w, truncate if already there\n * </PRE>\n * @param perm Permissions to apply to if created\n * @param cntxt The pool to use when creating the dbm\n * @remark The dbm name may not be a true file name, as many dbm packages\n * append suffixes for seperate data and index files.\n * @bug In apr-util 0.9 and 1.x, the type arg was case insensitive.  This\n * was highly inefficient, and as of 2.x the dbm name must be provided in\n * the correct case (lower case for all bundled providers)\n */\n\nAPU_DECLARE(apr_status_t) apr_dbm_open_ex(apr_dbm_t **dbm, const char* type, \n                                       const char *name, \n                                       apr_int32_t mode, apr_fileperms_t perm,\n                                       apr_pool_t *cntxt);\n\n\n/**\n * Open a dbm file by file name\n * @param dbm The newly opened database\n * @param name The dbm file name to open\n * @param mode The flag value\n * <PRE>\n *           APR_DBM_READONLY   open for read-only access\n *           APR_DBM_READWRITE  open for read-write access\n *           APR_DBM_RWCREATE   open for r/w, create if needed\n *           APR_DBM_RWTRUNC    open for r/w, truncate if already there\n * </PRE>\n * @param perm Permissions to apply to if created\n * @param cntxt The pool to use when creating the dbm\n * @remark The dbm name may not be a true file name, as many dbm packages\n * append suffixes for seperate data and index files.\n */\nAPU_DECLARE(apr_status_t) apr_dbm_open(apr_dbm_t **dbm, const char *name, \n                                       apr_int32_t mode, apr_fileperms_t perm,\n                                       apr_pool_t *cntxt);\n\n/**\n * Close a dbm file previously opened by apr_dbm_open\n * @param dbm The database to close\n */\nAPU_DECLARE(void) apr_dbm_close(apr_dbm_t *dbm);\n\n/**\n * Fetch a dbm record value by key\n * @param dbm The database \n * @param key The key datum to find this record\n * @param pvalue The value datum retrieved for this record\n */\nAPU_DECLARE(apr_status_t) apr_dbm_fetch(apr_dbm_t *dbm, apr_datum_t key,\n                                        apr_datum_t *pvalue);\n/**\n * Store a dbm record value by key\n * @param dbm The database \n * @param key The key datum to store this record by\n * @param value The value datum to store in this record\n */\nAPU_DECLARE(apr_status_t) apr_dbm_store(apr_dbm_t *dbm, apr_datum_t key, \n                                        apr_datum_t value);\n\n/**\n * Delete a dbm record value by key\n * @param dbm The database \n * @param key The key datum of the record to delete\n * @remark It is not an error to delete a non-existent record.\n */\nAPU_DECLARE(apr_status_t) apr_dbm_delete(apr_dbm_t *dbm, apr_datum_t key);\n\n/**\n * Search for a key within the dbm\n * @param dbm The database \n * @param key The datum describing a key to test\n */\nAPU_DECLARE(int) apr_dbm_exists(apr_dbm_t *dbm, apr_datum_t key);\n\n/**\n * Retrieve the first record key from a dbm\n * @param dbm The database \n * @param pkey The key datum of the first record\n */\nAPU_DECLARE(apr_status_t) apr_dbm_firstkey(apr_dbm_t *dbm, apr_datum_t *pkey);\n\n/**\n * Retrieve the next record key from a dbm\n * @param dbm The database \n * @param pkey The key datum of the next record\n */\nAPU_DECLARE(apr_status_t) apr_dbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey);\n\n/**\n * Proactively toss any memory associated with the apr_datum_t.\n * @param dbm The database \n * @param data The datum to free.\n */\nAPU_DECLARE(void) apr_dbm_freedatum(apr_dbm_t *dbm, apr_datum_t data);\n\n/**\n * Report more information when an apr_dbm function fails.\n * @param dbm The database\n * @param errcode A DBM-specific value for the error (for logging). If this\n *                isn't needed, it may be NULL.\n * @param errbuf Location to store the error text\n * @param errbufsize The size of the provided buffer\n * @return The errbuf parameter, for convenience.\n */\nAPU_DECLARE(char *) apr_dbm_geterror(apr_dbm_t *dbm, int *errcode,\n                                     char *errbuf, apr_size_t errbufsize);\n/**\n * If the specified file/path were passed to apr_dbm_open(), return the\n * actual file/path names which would be (created and) used. At most, two\n * files may be used; used2 may be NULL if only one file is used.\n * @param pool The pool for allocating used1 and used2.\n * @param type The type of DBM you require info on @see apr_dbm_open_ex\n * @param pathname The path name to generate used-names from.\n * @param used1 The first pathname used by the apr_dbm implementation.\n * @param used2 The second pathname used by apr_dbm. If only one file is\n *              used by the specific implementation, this will be set to NULL.\n * @return An error if the specified type is invalid.\n * @remark The dbm file(s) don't need to exist. This function only manipulates\n *      the pathnames.\n */\nAPU_DECLARE(apr_status_t) apr_dbm_get_usednames_ex(apr_pool_t *pool,\n                                                   const char *type,\n                                                   const char *pathname,\n                                                   const char **used1,\n                                                   const char **used2);\n\n/**\n * If the specified file/path were passed to apr_dbm_open(), return the\n * actual file/path names which would be (created and) used. At most, two\n * files may be used; used2 may be NULL if only one file is used.\n * @param pool The pool for allocating used1 and used2.\n * @param pathname The path name to generate used-names from.\n * @param used1 The first pathname used by the apr_dbm implementation.\n * @param used2 The second pathname used by apr_dbm. If only one file is\n *              used by the specific implementation, this will be set to NULL.\n * @remark The dbm file(s) don't need to exist. This function only manipulates\n *      the pathnames.\n */\nAPU_DECLARE(void) apr_dbm_get_usednames(apr_pool_t *pool,\n                                        const char *pathname,\n                                        const char **used1,\n                                        const char **used2);\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif\t/* !APR_DBM_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_hooks.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_HOOKS_H\n#define APR_HOOKS_H\n\n#include \"apu.h\"\n/* For apr_array_header_t */\n#include \"apr_tables.h\"\n\n/**\n * @file apr_hooks.h\n * @brief Apache hook functions\n */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n/**\n * @defgroup APR_Util_Hook Hook Functions\n * @ingroup APR_Util\n * @{\n */\n\n/**\n * @defgroup apr_hook_probes Hook probe capability\n * APR hooks provide a trace probe capability for capturing\n * the flow of control and return values with hooks.\n *\n * In order to use this facility, the application must define\n * the symbol APR_HOOK_PROBES_ENABLED and the four APR_HOOK_PROBE_\n * macros described below before including apr_hooks.h in files\n * that use the APR_IMPLEMENT_EXTERNAL_HOOK_* macros.\n *\n * This probe facility is not provided for APR optional hooks.\n * @{\n */\n\n#ifdef APR_HOOK_PROBES_ENABLED\n#define APR_HOOK_INT_DCL_UD void *ud = NULL\n#else\n/** internal implementation detail to avoid the ud declaration when\n * hook probes are not used\n */\n#define APR_HOOK_INT_DCL_UD\n/**\n * User-defined hook probe macro that is invoked when the hook\n * is run, before calling any hook functions.\n * @param ud A void * user data field that should be filled in by\n * this macro, and will be provided to the other hook probe macros.\n * @param ns The namespace prefix of the hook functions\n * @param name The name of the hook\n * @param args The argument list to the hook functions, with enclosing\n * parens.\n */\n#define APR_HOOK_PROBE_ENTRY(ud,ns,name,args)\n/**\n * User-defined hook probe macro that is invoked after the hook\n * has run.\n * @param ud A void * user data field that was filled in by the user-\n * provided APR_HOOK_PROBE_ENTRY().\n * @param ns The namespace prefix of the hook functions\n * @param name The name of the hook\n * @param rv The return value of the hook, or 0 if the hook is void.\n * @param args The argument list to the hook functions, with enclosing\n * parens.\n */\n#define APR_HOOK_PROBE_RETURN(ud,ns,name,rv,args)\n/**\n * User-defined hook probe macro that is invoked before calling a\n * hook function.\n * @param ud A void * user data field that was filled in by the user-\n * provided APR_HOOK_PROBE_ENTRY().\n * @param ns The namespace prefix of the hook functions\n * @param name The name of the hook\n * @param src The value of apr_hook_debug_current at the time the function\n * was hooked (usually the source file implementing the hook function).\n * @param args The argument list to the hook functions, with enclosing\n * parens.\n */\n#define APR_HOOK_PROBE_INVOKE(ud,ns,name,src,args)\n/**\n * User-defined hook probe macro that is invoked after calling a\n * hook function.\n * @param ud A void * user data field that was filled in by the user-\n * provided APR_HOOK_PROBE_ENTRY().\n * @param ns The namespace prefix of the hook functions\n * @param name The name of the hook\n * @param src The value of apr_hook_debug_current at the time the function\n * was hooked (usually the source file implementing the hook function).\n * @param rv The return value of the hook function, or 0 if the hook is void.\n * @param args The argument list to the hook functions, with enclosing\n * parens.\n */\n#define APR_HOOK_PROBE_COMPLETE(ud,ns,name,src,rv,args)\n#endif\n\n/** @} */\n\n/** macro to return the prototype of the hook function */    \n#define APR_IMPLEMENT_HOOK_GET_PROTO(ns,link,name) \\\nlink##_DECLARE(apr_array_header_t *) ns##_hook_get_##name(void)\n\n/** macro to declare the hook correctly */    \n#define APR_DECLARE_EXTERNAL_HOOK(ns,link,ret,name,args) \\\ntypedef ret ns##_HOOK_##name##_t args; \\\nlink##_DECLARE(void) ns##_hook_##name(ns##_HOOK_##name##_t *pf, \\\n                                      const char * const *aszPre, \\\n                                      const char * const *aszSucc, int nOrder); \\\nlink##_DECLARE(ret) ns##_run_##name args; \\\nAPR_IMPLEMENT_HOOK_GET_PROTO(ns,link,name); \\\ntypedef struct ns##_LINK_##name##_t \\\n    { \\\n    ns##_HOOK_##name##_t *pFunc; \\\n    const char *szName; \\\n    const char * const *aszPredecessors; \\\n    const char * const *aszSuccessors; \\\n    int nOrder; \\\n    } ns##_LINK_##name##_t;\n\n/** macro to declare the hook structure */    \n#define APR_HOOK_STRUCT(members) \\\nstatic struct { members } _hooks;\n\n/** macro to link the hook structure */\n#define APR_HOOK_LINK(name) \\\n    apr_array_header_t *link_##name;\n\n/** macro to implement the hook */\n#define APR_IMPLEMENT_EXTERNAL_HOOK_BASE(ns,link,name) \\\nlink##_DECLARE(void) ns##_hook_##name(ns##_HOOK_##name##_t *pf,const char * const *aszPre, \\\n                                      const char * const *aszSucc,int nOrder) \\\n    { \\\n    ns##_LINK_##name##_t *pHook; \\\n    if(!_hooks.link_##name) \\\n\t{ \\\n\t_hooks.link_##name=apr_array_make(apr_hook_global_pool,1,sizeof(ns##_LINK_##name##_t)); \\\n\tapr_hook_sort_register(#name,&_hooks.link_##name); \\\n\t} \\\n    pHook=apr_array_push(_hooks.link_##name); \\\n    pHook->pFunc=pf; \\\n    pHook->aszPredecessors=aszPre; \\\n    pHook->aszSuccessors=aszSucc; \\\n    pHook->nOrder=nOrder; \\\n    pHook->szName=apr_hook_debug_current; \\\n    if(apr_hook_debug_enabled) \\\n\tapr_hook_debug_show(#name,aszPre,aszSucc); \\\n    } \\\n    APR_IMPLEMENT_HOOK_GET_PROTO(ns,link,name) \\\n    { \\\n        return _hooks.link_##name; \\\n    }\n\n/**\n * Implement a hook that has no return code, and therefore runs all of the\n * registered functions\n * @param ns The namespace prefix of the hook functions\n * @param link The linkage declaration prefix of the hook\n * @param name The name of the hook\n * @param args_decl The declaration of the arguments for the hook\n * @param args_use The names for the arguments for the hook\n * @note The link prefix FOO corresponds to FOO_DECLARE() macros, which\n * provide export linkage from the module that IMPLEMENTs the hook, and\n * import linkage from external modules that link to the hook's module.\n */\n#define APR_IMPLEMENT_EXTERNAL_HOOK_VOID(ns,link,name,args_decl,args_use) \\\nAPR_IMPLEMENT_EXTERNAL_HOOK_BASE(ns,link,name) \\\nlink##_DECLARE(void) ns##_run_##name args_decl \\\n    { \\\n    ns##_LINK_##name##_t *pHook; \\\n    int n; \\\n    APR_HOOK_INT_DCL_UD; \\\n\\\n    APR_HOOK_PROBE_ENTRY(ud, ns, name, args_use); \\\n\\\n    if(_hooks.link_##name) \\\n        { \\\n        pHook=(ns##_LINK_##name##_t *)_hooks.link_##name->elts; \\\n        for(n=0 ; n < _hooks.link_##name->nelts ; ++n) \\\n            { \\\n            APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName, args_use); \\\n\t    pHook[n].pFunc args_use; \\\n            APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, 0, args_use); \\\n            } \\\n        } \\\n\\\n    APR_HOOK_PROBE_RETURN(ud, ns, name, 0, args_use); \\\n\\\n    }\n\n/* FIXME: note that this returns ok when nothing is run. I suspect it should\n   really return decline, but that breaks Apache currently - Ben\n*/\n/**\n * Implement a hook that runs until one of the functions returns something\n * other than OK or DECLINE\n * @param ns The namespace prefix of the hook functions\n * @param link The linkage declaration prefix of the hook\n * @param ret Type to return\n * @param name The name of the hook\n * @param args_decl The declaration of the arguments for the hook\n * @param args_use The names for the arguments for the hook\n * @param ok Success value\n * @param decline Decline value\n * @note The link prefix FOO corresponds to FOO_DECLARE() macros, which\n * provide export linkage from the module that IMPLEMENTs the hook, and\n * import linkage from external modules that link to the hook's module.\n */\n#define APR_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL(ns,link,ret,name,args_decl,args_use,ok,decline) \\\nAPR_IMPLEMENT_EXTERNAL_HOOK_BASE(ns,link,name) \\\nlink##_DECLARE(ret) ns##_run_##name args_decl \\\n    { \\\n    ns##_LINK_##name##_t *pHook; \\\n    int n; \\\n    ret rv = ok; \\\n    APR_HOOK_INT_DCL_UD; \\\n\\\n    APR_HOOK_PROBE_ENTRY(ud, ns, name, args_use); \\\n\\\n    if(_hooks.link_##name) \\\n        { \\\n        pHook=(ns##_LINK_##name##_t *)_hooks.link_##name->elts; \\\n        for(n=0 ; n < _hooks.link_##name->nelts ; ++n) \\\n            { \\\n            APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName, args_use); \\\n            rv=pHook[n].pFunc args_use; \\\n            APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, rv, args_use); \\\n            if(rv != ok && rv != decline) \\\n                break; \\\n            rv = ok; \\\n            } \\\n        } \\\n\\\n    APR_HOOK_PROBE_RETURN(ud, ns, name, rv, args_use); \\\n\\\n    return rv; \\\n    }\n\n\n/**\n * Implement a hook that runs until the first function returns something\n * other than the value of decline\n * @param ns The namespace prefix of the hook functions\n * @param link The linkage declaration prefix of the hook\n * @param name The name of the hook\n * @param ret Type to return\n * @param args_decl The declaration of the arguments for the hook\n * @param args_use The names for the arguments for the hook\n * @param decline Decline value\n * @note The link prefix FOO corresponds to FOO_DECLARE() macros, which\n * provide export linkage from the module that IMPLEMENTs the hook, and\n * import linkage from external modules that link to the hook's module.\n */\n#define APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(ns,link,ret,name,args_decl,args_use,decline) \\\nAPR_IMPLEMENT_EXTERNAL_HOOK_BASE(ns,link,name) \\\nlink##_DECLARE(ret) ns##_run_##name args_decl \\\n    { \\\n    ns##_LINK_##name##_t *pHook; \\\n    int n; \\\n    ret rv = decline; \\\n    APR_HOOK_INT_DCL_UD; \\\n\\\n    APR_HOOK_PROBE_ENTRY(ud, ns, name, args_use); \\\n\\\n    if(_hooks.link_##name) \\\n        { \\\n        pHook=(ns##_LINK_##name##_t *)_hooks.link_##name->elts; \\\n        for(n=0 ; n < _hooks.link_##name->nelts ; ++n) \\\n            { \\\n            APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName, args_use); \\\n            rv=pHook[n].pFunc args_use; \\\n            APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, rv, args_use); \\\n\\\n            if(rv != decline) \\\n                break; \\\n            } \\\n        } \\\n\\\n    APR_HOOK_PROBE_RETURN(ud, ns, name, rv, args_use); \\\n\\\n    return rv; \\\n    }\n\n    /* Hook orderings */\n/** run this hook first, before ANYTHING */\n#define APR_HOOK_REALLY_FIRST\t(-10)\n/** run this hook first */\n#define APR_HOOK_FIRST\t\t0\n/** run this hook somewhere */\n#define APR_HOOK_MIDDLE\t\t10\n/** run this hook after every other hook which is defined*/\n#define APR_HOOK_LAST\t\t20\n/** run this hook last, after EVERYTHING */\n#define APR_HOOK_REALLY_LAST\t30\n\n/**\n * The global pool used to allocate any memory needed by the hooks.\n */ \nAPU_DECLARE_DATA extern apr_pool_t *apr_hook_global_pool;\n\n/**\n * A global variable to determine if debugging information about the\n * hooks functions should be printed.\n */ \nAPU_DECLARE_DATA extern int apr_hook_debug_enabled;\n\n/**\n * The name of the module that is currently registering a function.\n */ \nAPU_DECLARE_DATA extern const char *apr_hook_debug_current;\n\n/**\n * Register a hook function to be sorted.\n * @param szHookName The name of the Hook the function is registered for\n * @param aHooks The array which stores all of the functions for this hook\n */\nAPU_DECLARE(void) apr_hook_sort_register(const char *szHookName, \n                                        apr_array_header_t **aHooks);\n/**\n * Sort all of the registered functions for a given hook.\n */\nAPU_DECLARE(void) apr_hook_sort_all(void);\n\n/**\n * Print all of the information about the current hook.  This is used for\n * debugging purposes.\n * @param szName The name of the hook\n * @param aszPre All of the functions in the predecessor array\n * @param aszSucc All of the functions in the successor array\n */\nAPU_DECLARE(void) apr_hook_debug_show(const char *szName,\n                                      const char * const *aszPre,\n                                      const char * const *aszSucc);\n\n/**\n * Remove all currently registered functions.\n */\nAPU_DECLARE(void) apr_hook_deregister_all(void);\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* APR_HOOKS_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_ldap.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h\n */\n/**\n * @file apr_ldap.h\n * @brief  APR-UTIL LDAP \n */\n#ifndef APU_LDAP_H\n#define APU_LDAP_H\n\n/**\n * @defgroup APR_Util_LDAP LDAP\n * @ingroup APR_Util\n * @{\n */\n\n/* this will be defined if LDAP support was compiled into apr-util */\n#define APR_HAS_LDAP\t\t    1\n\n/* identify the LDAP toolkit used */\n#define APR_HAS_NETSCAPE_LDAPSDK    0\n#define APR_HAS_SOLARIS_LDAPSDK     0\n#define APR_HAS_NOVELL_LDAPSDK      0\n#define APR_HAS_MOZILLA_LDAPSDK     0\n#define APR_HAS_OPENLDAP_LDAPSDK    0\n#define APR_HAS_MICROSOFT_LDAPSDK   1\n#define APR_HAS_TIVOLI_LDAPSDK      0\n#define APR_HAS_ZOS_LDAPSDK         0\n#define APR_HAS_OTHER_LDAPSDK       0\n\n\n/*\n * Handle the case when LDAP is enabled\n */\n#if APR_HAS_LDAP\n\n/*\n * The following #defines are DEPRECATED and should not be used for\n * anything. They remain to maintain binary compatibility.\n * The original code defined the OPENLDAP SDK as present regardless\n * of what really was there, which was way bogus. In addition, the\n * apr_ldap_url_parse*() functions have been rewritten specifically for\n * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero.\n */\n#if APR_HAS_TIVOLI_LDAPSDK\n#define APR_HAS_LDAP_SSL 0\n#else\n#define APR_HAS_LDAP_SSL 1\n#endif\n#define APR_HAS_LDAP_URL_PARSE 0\n\n#if APR_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED) \n/* Ensure that the \"deprecated\" interfaces are still exposed\n * with OpenLDAP >= 2.3; these were exposed by default in earlier\n * releases. */\n#define LDAP_DEPRECATED 1\n#endif\n\n/*\n * Include the standard LDAP header files.\n */\n\n#include <winldap.h>\n\n\n/*\n * Detected standard functions\n */\n#define APR_HAS_LDAPSSL_CLIENT_INIT 0\n#define APR_HAS_LDAPSSL_CLIENT_DEINIT 0\n#define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT 0\n#define APR_HAS_LDAP_START_TLS_S 0\n#define APR_HAS_LDAP_SSLINIT 1\n#define APR_HAS_LDAPSSL_INIT 0\n#define APR_HAS_LDAPSSL_INSTALL_ROUTINES 0\n\n\n/*\n * Make sure the secure LDAP port is defined\n */\n#ifndef LDAPS_PORT\n#define LDAPS_PORT 636  /* ldaps:/// default LDAP over TLS port */\n#endif\n\n\n/*\n * For ldap function calls that input a size limit on the number of returned elements\n * Some SDKs do not have the define for LDAP_DEFAULT_LIMIT (-1) or LDAP_NO_LIMIT (0)\n * LDAP_DEFAULT_LIMIT is preferred as it allows inheritance from whatever the SDK\n * or process is configured for.\n */\n#ifdef LDAP_DEFAULT_LIMIT\n#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT\n#else\n#ifdef LDAP_NO_LIMIT\n#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT\n#endif\n#endif\n\n#ifndef APR_LDAP_SIZELIMIT\n#define APR_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */\n#endif\n\n/*\n * z/OS is missing some defines\n */\n#ifndef LDAP_VERSION_MAX\n#define LDAP_VERSION_MAX  LDAP_VERSION\n#endif\n#if APR_HAS_ZOS_LDAPSDK\n#define LDAP_VENDOR_NAME \"IBM z/OS\"\n#endif\n\n/* Note: Macros defining const casting has been removed in APR v1.0,\n * pending real support for LDAP v2.0 toolkits.\n *\n * In the mean time, please use an LDAP v3.0 toolkit.\n */\n#if LDAP_VERSION_MAX <= 2\n#error Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit.\n#endif \n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * This structure allows the C LDAP API error codes to be returned\n * along with plain text error messages that explain to us mere mortals\n * what really happened.\n */\ntypedef struct apr_ldap_err_t {\n    const char *reason;\n    const char *msg;\n    int rc;\n} apr_ldap_err_t;\n\n#ifdef __cplusplus\n}\n#endif\n\n/* The MS SDK returns LDAP_UNAVAILABLE when the backend has closed the connection\n * between LDAP calls. Protect with APR_HAS_MICROSOFT_LDAPSDK in case someone \n * manually chooses another SDK on Windows \n */\n#if APR_HAS_MICROSOFT_LDAPSDK\n#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN \\\n                                    || (s) == LDAP_UNAVAILABLE)\n#else\n#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN)\n#endif\n\n/* These symbols are not actually exported in a DSO build, but mapped into\n * a private exported function array for apr_ldap_stub to bind dynamically.\n * Rename them appropriately to protect the global namespace.\n */\n#ifdef APU_DSO_LDAP_BUILD\n\n#define apr_ldap_info apr__ldap_info\n#define apr_ldap_init apr__ldap_init\n#define apr_ldap_ssl_init apr__ldap_ssl_init\n#define apr_ldap_ssl_deinit apr__ldap_ssl_deinit\n#define apr_ldap_get_option apr__ldap_get_option\n#define apr_ldap_set_option apr__ldap_set_option\n#define apr_ldap_rebind_init apr__ldap_rebind_init\n#define apr_ldap_rebind_add apr__ldap_rebind_add\n#define apr_ldap_rebind_remove apr__ldap_rebind_remove\n\n#define APU_DECLARE_LDAP(type) type\n#else\n#define APU_DECLARE_LDAP(type) APU_DECLARE(type)\n#endif\n\n#include \"apr_ldap_url.h\"\n#include \"apr_ldap_init.h\"\n#include \"apr_ldap_option.h\"\n#include \"apr_ldap_rebind.h\"\n\n/** @} */\n#endif /* APR_HAS_LDAP */\n#endif /* APU_LDAP_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_ldap.h.in",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h\n */\n/**\n * @file apr_ldap.h\n * @brief  APR-UTIL LDAP \n */\n#ifndef APU_LDAP_H\n#define APU_LDAP_H\n\n/**\n * @defgroup APR_Util_LDAP LDAP\n * @ingroup APR_Util\n * @{\n */\n\n/* this will be defined if LDAP support was compiled into apr-util */\n#define APR_HAS_LDAP\t\t  @apu_has_ldap@\n\n/* identify the LDAP toolkit used */\n#define APR_HAS_NETSCAPE_LDAPSDK  @apu_has_ldap_netscape@\n#define APR_HAS_SOLARIS_LDAPSDK   @apu_has_ldap_solaris@\n#define APR_HAS_NOVELL_LDAPSDK    @apu_has_ldap_novell@\n#define APR_HAS_MOZILLA_LDAPSDK   @apu_has_ldap_mozilla@\n#define APR_HAS_OPENLDAP_LDAPSDK  @apu_has_ldap_openldap@\n#define APR_HAS_MICROSOFT_LDAPSDK @apu_has_ldap_microsoft@\n#define APR_HAS_TIVOLI_LDAPSDK    @apu_has_ldap_tivoli@\n#define APR_HAS_ZOS_LDAPSDK       @apu_has_ldap_zos@\n#define APR_HAS_OTHER_LDAPSDK     @apu_has_ldap_other@\n\n\n/*\n * Handle the case when LDAP is enabled\n */\n#if APR_HAS_LDAP\n\n/*\n * The following #defines are DEPRECATED and should not be used for\n * anything. They remain to maintain binary compatibility.\n * The original code defined the OPENLDAP SDK as present regardless\n * of what really was there, which was way bogus. In addition, the\n * apr_ldap_url_parse*() functions have been rewritten specifically for\n * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero.\n */\n#if APR_HAS_TIVOLI_LDAPSDK\n#define APR_HAS_LDAP_SSL 0\n#else\n#define APR_HAS_LDAP_SSL 1\n#endif\n#define APR_HAS_LDAP_URL_PARSE      0\n\n#if APR_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED) \n/* Ensure that the \"deprecated\" interfaces are still exposed\n * with OpenLDAP >= 2.3; these were exposed by default in earlier\n * releases. */\n#define LDAP_DEPRECATED 1\n#endif\n\n/*\n * Include the standard LDAP header files.\n */\n\n@lber_h@\n@ldap_h@\n@ldap_ssl_h@\n\n\n/*\n * Detected standard functions\n */\n#define APR_HAS_LDAPSSL_CLIENT_INIT @apu_has_ldapssl_client_init@\n#define APR_HAS_LDAPSSL_CLIENT_DEINIT @apu_has_ldapssl_client_deinit@\n#define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT @apu_has_ldapssl_add_trusted_cert@\n#define APR_HAS_LDAP_START_TLS_S @apu_has_ldap_start_tls_s@\n#define APR_HAS_LDAP_SSLINIT @apu_has_ldap_sslinit@\n#define APR_HAS_LDAPSSL_INIT @apu_has_ldapssl_init@\n#define APR_HAS_LDAPSSL_INSTALL_ROUTINES @apu_has_ldapssl_install_routines@\n\n/*\n * Make sure the secure LDAP port is defined\n */\n#ifndef LDAPS_PORT\n#define LDAPS_PORT 636  /* ldaps:/// default LDAP over TLS port */\n#endif\n\n/*\n * For ldap function calls that input a size limit on the number of returned elements\n * Some SDKs do not have the define for LDAP_DEFAULT_LIMIT (-1) or LDAP_NO_LIMIT (0)\n * LDAP_DEFAULT_LIMIT is preferred as it allows inheritance from whatever the SDK\n * or process is configured for.\n */\n#ifdef LDAP_DEFAULT_LIMIT\n#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT\n#else\n#ifdef LDAP_NO_LIMIT\n#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT\n#endif\n#endif\n\n#ifndef APR_LDAP_SIZELIMIT\n#define APR_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */\n#endif\n\n/*\n * z/OS is missing some defines\n */\n#ifndef LDAP_VERSION_MAX\n#define LDAP_VERSION_MAX  LDAP_VERSION\n#endif\n#if APR_HAS_ZOS_LDAPSDK\n#define LDAP_VENDOR_NAME \"IBM z/OS\"\n#endif\n\n/* Note: Macros defining const casting has been removed in APR v1.0,\n * pending real support for LDAP v2.0 toolkits.\n *\n * In the mean time, please use an LDAP v3.0 toolkit.\n */\n#if LDAP_VERSION_MAX <= 2\n#error Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit.\n#endif \n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * This structure allows the C LDAP API error codes to be returned\n * along with plain text error messages that explain to us mere mortals\n * what really happened.\n */\ntypedef struct apr_ldap_err_t {\n    const char *reason;\n    const char *msg;\n    int rc;\n} apr_ldap_err_t;\n\n#ifdef __cplusplus\n}\n#endif\n\n/* The MS SDK returns LDAP_UNAVAILABLE when the backend has closed the connection\n * between LDAP calls. Protect with APR_HAS_MICROSOFT_LDAPSDK in case someone \n * manually chooses another SDK on Windows \n */\n#if APR_HAS_MICROSOFT_LDAPSDK\n#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN \\\n                                    || (s) == LDAP_UNAVAILABLE)\n#else\n#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN)\n#endif\n\n/* These symbols are not actually exported in a DSO build, but mapped into\n * a private exported function array for apr_ldap_stub to bind dynamically.\n * Rename them appropriately to protect the global namespace.\n */\n#ifdef APU_DSO_LDAP_BUILD\n\n#define apr_ldap_info apr__ldap_info\n#define apr_ldap_init apr__ldap_init\n#define apr_ldap_ssl_init apr__ldap_ssl_init\n#define apr_ldap_ssl_deinit apr__ldap_ssl_deinit\n#define apr_ldap_get_option apr__ldap_get_option\n#define apr_ldap_set_option apr__ldap_set_option\n#define apr_ldap_rebind_init apr__ldap_rebind_init\n#define apr_ldap_rebind_add apr__ldap_rebind_add\n#define apr_ldap_rebind_remove apr__ldap_rebind_remove\n\n#define APU_DECLARE_LDAP(type) type\n#else\n#define APU_DECLARE_LDAP(type) APU_DECLARE(type)\n#endif\n\n#include \"apr_ldap_url.h\"\n#include \"apr_ldap_init.h\"\n#include \"apr_ldap_option.h\"\n#include \"apr_ldap_rebind.h\"\n\n#endif /* APR_HAS_LDAP */\n/** @} */\n#endif /* APU_LDAP_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_ldap.hnw",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h\n */\n/**\n * @file apr_ldap.h\n * @brief  APR-UTIL LDAP \n */\n#ifndef APU_LDAP_H\n#define APU_LDAP_H\n\n/**\n * @defgroup APR_Util_LDAP LDAP\n * @ingroup APR_Util\n * @{\n */\n\n/* this will be defined if LDAP support was compiled into apr-util */\n#define APR_HAS_LDAP                1 \n\n/* identify the LDAP toolkit used */\n#define APR_HAS_NETSCAPE_LDAPSDK    0\n#define APR_HAS_SOLARIS_LDAPSDK     0\n#define APR_HAS_NOVELL_LDAPSDK      1\n#define APR_HAS_MOZILLA_LDAPSDK     0\n#define APR_HAS_OPENLDAP_LDAPSDK    0\n#define APR_HAS_MICROSOFT_LDAPSDK   0\n#define APR_HAS_OTHER_LDAPSDK       0\n\n\n/*\n * Handle the case when LDAP is enabled\n */\n#if APR_HAS_LDAP\n\n/*\n * The following #defines are DEPRECATED and should not be used for\n * anything. They remain to maintain binary compatibility.\n * The original code defined the OPENLDAP SDK as present regardless\n * of what really was there, which was way bogus. In addition, the\n * apr_ldap_url_parse*() functions have been rewritten specifically for\n * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero.\n */\n#define APR_HAS_LDAP_SSL            1\n#define APR_HAS_LDAP_URL_PARSE      0\n\n\n/*\n * Include the standard LDAP header files.\n */\n\n#ifdef GENEXPORTS\n#define LDAP_VERSION_MAX 3\n#define LDAP_INSUFFICIENT_ACCESS\n#else\n#include <lber.h>\n#include <ldap.h>\n#if APR_HAS_LDAP_SSL \n#include <ldap_ssl.h>\n#endif\n#endif\n\n\n/*\n * Detected standard functions\n */\n#define APR_HAS_LDAPSSL_CLIENT_INIT 1\n#define APR_HAS_LDAPSSL_CLIENT_DEINIT 1\n#define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT 1\n#define APR_HAS_LDAP_START_TLS_S 0\n#define APR_HAS_LDAP_SSLINIT 0\n#define APR_HAS_LDAPSSL_INIT 1\n#define APR_HAS_LDAPSSL_INSTALL_ROUTINES 0\n\n\n/*\n * Make sure the secure LDAP port is defined\n */\n#ifndef LDAPS_PORT\n#define LDAPS_PORT 636  /* ldaps:/// default LDAP over TLS port */\n#endif\n\n\n/* Note: Macros defining const casting has been removed in APR v1.0,\n * pending real support for LDAP v2.0 toolkits.\n *\n * In the mean time, please use an LDAP v3.0 toolkit.\n */\n#if LDAP_VERSION_MAX <= 2\n#error Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit.\n#endif \n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * This structure allows the C LDAP API error codes to be returned\n * along with plain text error messages that explain to us mere mortals\n * what really happened.\n */\ntypedef struct apr_ldap_err_t {\n    const char *reason;\n    const char *msg;\n    int rc;\n} apr_ldap_err_t;\n\n#ifdef __cplusplus\n}\n#endif\n\n#define APR_LDAP_IS_SERVER_DOWN(s)                ((s) == LDAP_SERVER_DOWN)\n\n/* These symbols are not actually exported in a DSO build, but mapped into\n * a private exported function array for apr_ldap_stub to bind dynamically.\n * Rename them appropriately to protect the global namespace.\n */\n#ifdef APU_DSO_LDAP_BUILD\n\n#define apr_ldap_info apr__ldap_info\n#define apr_ldap_init apr__ldap_init\n#define apr_ldap_ssl_init apr__ldap_ssl_init\n#define apr_ldap_ssl_deinit apr__ldap_ssl_deinit\n#define apr_ldap_get_option apr__ldap_get_option\n#define apr_ldap_set_option apr__ldap_set_option\n#define apr_ldap_rebind_init apr__ldap_rebind_init\n#define apr_ldap_rebind_add apr__ldap_rebind_add\n#define apr_ldap_rebind_remove apr__ldap_rebind_remove\n\n#define APU_DECLARE_LDAP(type) type\n#else\n#define APU_DECLARE_LDAP(type) APU_DECLARE(type)\n#endif\n\n#include \"apr_ldap_url.h\"\n#include \"apr_ldap_init.h\"\n#include \"apr_ldap_option.h\"\n#include \"apr_ldap_rebind.h\"\n\n/** @} */\n#endif /* APR_HAS_LDAP */\n#endif /* APU_LDAP_H */\n\n"
  },
  {
    "path": "third_party/include/aprutil/apr_ldap.hw",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h\n */\n/**\n * @file apr_ldap.h\n * @brief  APR-UTIL LDAP \n */\n#ifndef APU_LDAP_H\n#define APU_LDAP_H\n\n/**\n * @defgroup APR_Util_LDAP LDAP\n * @ingroup APR_Util\n * @{\n */\n\n/* this will be defined if LDAP support was compiled into apr-util */\n#define APR_HAS_LDAP\t\t    1\n\n/* identify the LDAP toolkit used */\n#define APR_HAS_NETSCAPE_LDAPSDK    0\n#define APR_HAS_SOLARIS_LDAPSDK     0\n#define APR_HAS_NOVELL_LDAPSDK      0\n#define APR_HAS_MOZILLA_LDAPSDK     0\n#define APR_HAS_OPENLDAP_LDAPSDK    0\n#define APR_HAS_MICROSOFT_LDAPSDK   1\n#define APR_HAS_TIVOLI_LDAPSDK      0\n#define APR_HAS_ZOS_LDAPSDK         0\n#define APR_HAS_OTHER_LDAPSDK       0\n\n\n/*\n * Handle the case when LDAP is enabled\n */\n#if APR_HAS_LDAP\n\n/*\n * The following #defines are DEPRECATED and should not be used for\n * anything. They remain to maintain binary compatibility.\n * The original code defined the OPENLDAP SDK as present regardless\n * of what really was there, which was way bogus. In addition, the\n * apr_ldap_url_parse*() functions have been rewritten specifically for\n * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero.\n */\n#if APR_HAS_TIVOLI_LDAPSDK\n#define APR_HAS_LDAP_SSL 0\n#else\n#define APR_HAS_LDAP_SSL 1\n#endif\n#define APR_HAS_LDAP_URL_PARSE 0\n\n#if APR_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED) \n/* Ensure that the \"deprecated\" interfaces are still exposed\n * with OpenLDAP >= 2.3; these were exposed by default in earlier\n * releases. */\n#define LDAP_DEPRECATED 1\n#endif\n\n/*\n * Include the standard LDAP header files.\n */\n\n#include <winldap.h>\n\n\n/*\n * Detected standard functions\n */\n#define APR_HAS_LDAPSSL_CLIENT_INIT 0\n#define APR_HAS_LDAPSSL_CLIENT_DEINIT 0\n#define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT 0\n#define APR_HAS_LDAP_START_TLS_S 0\n#define APR_HAS_LDAP_SSLINIT 1\n#define APR_HAS_LDAPSSL_INIT 0\n#define APR_HAS_LDAPSSL_INSTALL_ROUTINES 0\n\n\n/*\n * Make sure the secure LDAP port is defined\n */\n#ifndef LDAPS_PORT\n#define LDAPS_PORT 636  /* ldaps:/// default LDAP over TLS port */\n#endif\n\n\n/*\n * For ldap function calls that input a size limit on the number of returned elements\n * Some SDKs do not have the define for LDAP_DEFAULT_LIMIT (-1) or LDAP_NO_LIMIT (0)\n * LDAP_DEFAULT_LIMIT is preferred as it allows inheritance from whatever the SDK\n * or process is configured for.\n */\n#ifdef LDAP_DEFAULT_LIMIT\n#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT\n#else\n#ifdef LDAP_NO_LIMIT\n#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT\n#endif\n#endif\n\n#ifndef APR_LDAP_SIZELIMIT\n#define APR_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */\n#endif\n\n/*\n * z/OS is missing some defines\n */\n#ifndef LDAP_VERSION_MAX\n#define LDAP_VERSION_MAX  LDAP_VERSION\n#endif\n#if APR_HAS_ZOS_LDAPSDK\n#define LDAP_VENDOR_NAME \"IBM z/OS\"\n#endif\n\n/* Note: Macros defining const casting has been removed in APR v1.0,\n * pending real support for LDAP v2.0 toolkits.\n *\n * In the mean time, please use an LDAP v3.0 toolkit.\n */\n#if LDAP_VERSION_MAX <= 2\n#error Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit.\n#endif \n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * This structure allows the C LDAP API error codes to be returned\n * along with plain text error messages that explain to us mere mortals\n * what really happened.\n */\ntypedef struct apr_ldap_err_t {\n    const char *reason;\n    const char *msg;\n    int rc;\n} apr_ldap_err_t;\n\n#ifdef __cplusplus\n}\n#endif\n\n/* The MS SDK returns LDAP_UNAVAILABLE when the backend has closed the connection\n * between LDAP calls. Protect with APR_HAS_MICROSOFT_LDAPSDK in case someone \n * manually chooses another SDK on Windows \n */\n#if APR_HAS_MICROSOFT_LDAPSDK\n#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN \\\n                                    || (s) == LDAP_UNAVAILABLE)\n#else\n#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN)\n#endif\n\n/* These symbols are not actually exported in a DSO build, but mapped into\n * a private exported function array for apr_ldap_stub to bind dynamically.\n * Rename them appropriately to protect the global namespace.\n */\n#ifdef APU_DSO_LDAP_BUILD\n\n#define apr_ldap_info apr__ldap_info\n#define apr_ldap_init apr__ldap_init\n#define apr_ldap_ssl_init apr__ldap_ssl_init\n#define apr_ldap_ssl_deinit apr__ldap_ssl_deinit\n#define apr_ldap_get_option apr__ldap_get_option\n#define apr_ldap_set_option apr__ldap_set_option\n#define apr_ldap_rebind_init apr__ldap_rebind_init\n#define apr_ldap_rebind_add apr__ldap_rebind_add\n#define apr_ldap_rebind_remove apr__ldap_rebind_remove\n\n#define APU_DECLARE_LDAP(type) type\n#else\n#define APU_DECLARE_LDAP(type) APU_DECLARE(type)\n#endif\n\n#include \"apr_ldap_url.h\"\n#include \"apr_ldap_init.h\"\n#include \"apr_ldap_option.h\"\n#include \"apr_ldap_rebind.h\"\n\n/** @} */\n#endif /* APR_HAS_LDAP */\n#endif /* APU_LDAP_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_ldap.hwc",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h\n */\n/**\n * @file apr_ldap.h\n * @brief  APR-UTIL LDAP \n */\n#ifndef APU_LDAP_H\n#define APU_LDAP_H\n\n/**\n * @defgroup APR_Util_LDAP LDAP\n * @ingroup APR_Util\n * @{\n */\n\n/* this will be defined if LDAP support was compiled into apr-util */\n#define APR_HAS_LDAP\t\t    @apr_has_ldap_10@\n\n/* identify the LDAP toolkit used */\n#define APR_HAS_NETSCAPE_LDAPSDK    0\n#define APR_HAS_SOLARIS_LDAPSDK     0\n#define APR_HAS_NOVELL_LDAPSDK      0\n#define APR_HAS_MOZILLA_LDAPSDK     0\n#define APR_HAS_OPENLDAP_LDAPSDK    0\n#define APR_HAS_MICROSOFT_LDAPSDK   1\n#define APR_HAS_TIVOLI_LDAPSDK      0\n#define APR_HAS_ZOS_LDAPSDK         0\n#define APR_HAS_OTHER_LDAPSDK       0\n\n\n/*\n * Handle the case when LDAP is enabled\n */\n#if APR_HAS_LDAP\n\n/*\n * The following #defines are DEPRECATED and should not be used for\n * anything. They remain to maintain binary compatibility.\n * The original code defined the OPENLDAP SDK as present regardless\n * of what really was there, which was way bogus. In addition, the\n * apr_ldap_url_parse*() functions have been rewritten specifically for\n * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero.\n */\n#if APR_HAS_TIVOLI_LDAPSDK\n#define APR_HAS_LDAP_SSL 0\n#else\n#define APR_HAS_LDAP_SSL 1\n#endif\n#define APR_HAS_LDAP_URL_PARSE 0\n\n#if APR_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED) \n/* Ensure that the \"deprecated\" interfaces are still exposed\n * with OpenLDAP >= 2.3; these were exposed by default in earlier\n * releases. */\n#define LDAP_DEPRECATED 1\n#endif\n\n/*\n * Include the standard LDAP header files.\n */\n\n#include <winldap.h>\n\n\n/*\n * Detected standard functions\n */\n#define APR_HAS_LDAPSSL_CLIENT_INIT 0\n#define APR_HAS_LDAPSSL_CLIENT_DEINIT 0\n#define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT 0\n#define APR_HAS_LDAP_START_TLS_S 0\n#define APR_HAS_LDAP_SSLINIT 1\n#define APR_HAS_LDAPSSL_INIT 0\n#define APR_HAS_LDAPSSL_INSTALL_ROUTINES 0\n\n\n/*\n * Make sure the secure LDAP port is defined\n */\n#ifndef LDAPS_PORT\n#define LDAPS_PORT 636  /* ldaps:/// default LDAP over TLS port */\n#endif\n\n\n/*\n * For ldap function calls that input a size limit on the number of returned elements\n * Some SDKs do not have the define for LDAP_DEFAULT_LIMIT (-1) or LDAP_NO_LIMIT (0)\n * LDAP_DEFAULT_LIMIT is preferred as it allows inheritance from whatever the SDK\n * or process is configured for.\n */\n#ifdef LDAP_DEFAULT_LIMIT\n#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT\n#else\n#ifdef LDAP_NO_LIMIT\n#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT\n#endif\n#endif\n\n#ifndef APR_LDAP_SIZELIMIT\n#define APR_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */\n#endif\n\n/*\n * z/OS is missing some defines\n */\n#ifndef LDAP_VERSION_MAX\n#define LDAP_VERSION_MAX  LDAP_VERSION\n#endif\n#if APR_HAS_ZOS_LDAPSDK\n#define LDAP_VENDOR_NAME \"IBM z/OS\"\n#endif\n\n/* Note: Macros defining const casting has been removed in APR v1.0,\n * pending real support for LDAP v2.0 toolkits.\n *\n * In the mean time, please use an LDAP v3.0 toolkit.\n */\n#if LDAP_VERSION_MAX <= 2\n#error Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit.\n#endif \n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * This structure allows the C LDAP API error codes to be returned\n * along with plain text error messages that explain to us mere mortals\n * what really happened.\n */\ntypedef struct apr_ldap_err_t {\n    const char *reason;\n    const char *msg;\n    int rc;\n} apr_ldap_err_t;\n\n#ifdef __cplusplus\n}\n#endif\n\n/* The MS SDK returns LDAP_UNAVAILABLE when the backend has closed the connection\n * between LDAP calls. Protect with APR_HAS_MICROSOFT_LDAPSDK in case someone \n * manually chooses another SDK on Windows \n */\n#if APR_HAS_MICROSOFT_LDAPSDK\n#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN \\\n                                    || (s) == LDAP_UNAVAILABLE)\n#else\n#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN)\n#endif\n\n/* These symbols are not actually exported in a DSO build, but mapped into\n * a private exported function array for apr_ldap_stub to bind dynamically.\n * Rename them appropriately to protect the global namespace.\n */\n#ifdef APU_DSO_LDAP_BUILD\n\n#define apr_ldap_info apr__ldap_info\n#define apr_ldap_init apr__ldap_init\n#define apr_ldap_ssl_init apr__ldap_ssl_init\n#define apr_ldap_ssl_deinit apr__ldap_ssl_deinit\n#define apr_ldap_get_option apr__ldap_get_option\n#define apr_ldap_set_option apr__ldap_set_option\n#define apr_ldap_rebind_init apr__ldap_rebind_init\n#define apr_ldap_rebind_add apr__ldap_rebind_add\n#define apr_ldap_rebind_remove apr__ldap_rebind_remove\n\n#define APU_DECLARE_LDAP(type) type\n#else\n#define APU_DECLARE_LDAP(type) APU_DECLARE(type)\n#endif\n\n#include \"apr_ldap_url.h\"\n#include \"apr_ldap_init.h\"\n#include \"apr_ldap_option.h\"\n#include \"apr_ldap_rebind.h\"\n\n/** @} */\n#endif /* APR_HAS_LDAP */\n#endif /* APU_LDAP_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_ldap_init.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @file apr_ldap_init.h\n * @brief  APR-UTIL LDAP ldap_init() functions\n */\n#ifndef APR_LDAP_INIT_H\n#define APR_LDAP_INIT_H\n\n/**\n * @addtogroup APR_Util_LDAP\n * @{\n */\n\n#include \"apr_ldap.h\"\n\n#if APR_HAS_LDAP\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n\n/**\n * Macro to detect security related return values.\n */\n#if defined(LDAP_INSUFFICIENT_ACCESS)\n#define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_ACCESS\n#elif defined(LDAP_INSUFFICIENT_RIGHTS)\n#define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_RIGHTS\n#elif defined(APR_HAS_MICROSOFT_LDAPSDK)\n/* The macros above fail to contemplate that LDAP_RETCODE values\n * may be represented by an enum.  autoconf tests would be much\n * more robust.\n */\n#define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_RIGHTS\n#else\n#error The security return codes must be added to support this LDAP toolkit.\n#endif\n\n#if defined(LDAP_SECURITY_ERROR)\n#define APU_LDAP_SECURITY_ERROR LDAP_SECURITY_ERROR\n#else\n#define APU_LDAP_SECURITY_ERROR(n)\t\\\n    (LDAP_INAPPROPRIATE_AUTH == n) ? 1 \\\n    : (LDAP_INVALID_CREDENTIALS == n) ? 1 \\\n    : (APU_LDAP_INSUFFICIENT_ACCESS == n) ? 1 \\\n    : 0\n#endif\n\n\n/**\n * APR LDAP SSL Initialise function\n *\n * This function initialises SSL on the underlying LDAP toolkit\n * if this is necessary.\n *\n * If a CA certificate is provided, this is set, however the setting\n * of certificates via this method has been deprecated and will be removed in\n * APR v2.0.\n *\n * The apr_ldap_set_option() function with the APR_LDAP_OPT_TLS_CERT option\n * should be used instead to set certificates.\n *\n * If SSL support is not available on this platform, or a problem\n * was encountered while trying to set the certificate, the function\n * will return APR_EGENERAL. Further LDAP specific error information\n * can be found in result_err.\n * @param pool The pool to use\n * @param cert_auth_file The name of the certificate to use, can be NULL\n * @param cert_file_type The type of certificate specified. See the\n * apr_ldap_set_option() APR_LDAP_OPT_TLS_CERT option for details.\n * @param result_err The returned result\n */\nAPU_DECLARE_LDAP(int) apr_ldap_ssl_init(apr_pool_t *pool,\n                                        const char *cert_auth_file,\n                                        int cert_file_type,\n                                        apr_ldap_err_t **result_err);\n\n/**\n * APR LDAP SSL De-Initialise function\n *\n * This function tears down any SSL certificate setup previously\n * set using apr_ldap_ssl_init(). It should be called to clean\n * up if a graceful restart of a service is attempted.\n * @todo currently we do not check whether apr_ldap_ssl_init()\n * has been called first - we probably should.\n */\nAPU_DECLARE_LDAP(int) apr_ldap_ssl_deinit(void);\n\n/**\n * APR LDAP initialise function\n *\n * This function is responsible for initialising an LDAP\n * connection in a toolkit independant way. It does the\n * job of ldap_init() from the C api.\n *\n * It handles both the SSL and non-SSL case, and attempts\n * to hide the complexity setup from the user. This function\n * assumes that any certificate setup necessary has already\n * been done.\n *\n * If SSL or STARTTLS needs to be enabled, and the underlying\n * toolkit supports it, the following values are accepted for\n * secure:\n *\n * APR_LDAP_NONE: No encryption\n * APR_LDAP_SSL: SSL encryption (ldaps://)\n * APR_LDAP_STARTTLS: Force STARTTLS on ldap://\n * @remark The Novell toolkit is only able to set the SSL mode via this\n * function. To work around this limitation, set the SSL mode here if no\n * per connection client certificates are present, otherwise set secure\n * APR_LDAP_NONE here, then set the per connection client certificates,\n * followed by setting the SSL mode via apr_ldap_set_option(). As Novell\n * does not support per connection client certificates, this problem is\n * worked around while still being compatible with other LDAP toolkits.\n * @param pool The pool to use\n * @param ldap The LDAP handle\n * @param hostname The name of the host to connect to. This can be either a\n * DNS name, or an IP address.\n * @param portno The port to connect to\n * @param secure The security mode to set\n * @param result_err The returned result\n */\nAPU_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool,\n                                    LDAP **ldap,\n                                    const char *hostname,\n                                    int portno,\n                                    int secure,\n                                    apr_ldap_err_t **result_err);\n\n/**\n * APR LDAP info function\n *\n * This function returns a string describing the LDAP toolkit\n * currently in use. The string is placed inside result_err->reason.\n * @param pool The pool to use\n * @param result_err The returned result\n */\nAPU_DECLARE_LDAP(int) apr_ldap_info(apr_pool_t *pool,\n                                    apr_ldap_err_t **result_err);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* APR_HAS_LDAP */\n\n/** @} */\n\n#endif /* APR_LDAP_URL_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_ldap_option.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @file apr_ldap_option.h\n * @brief  APR-UTIL LDAP ldap_*_option() functions\n */\n#ifndef APR_LDAP_OPTION_H\n#define APR_LDAP_OPTION_H\n\n/**\n * @addtogroup APR_Util_LDAP\n * @{\n */\n\n#include \"apr_ldap.h\"\n\n#if APR_HAS_LDAP\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/*\n * The following defines handle the different TLS certificate\n * options available. If these options are missing, APR will try and\n * emulate support for this using the deprecated ldap_start_tls_s()\n * function.\n */\n/**\n * Set SSL mode to one of APR_LDAP_NONE, APR_LDAP_SSL, APR_LDAP_STARTTLS\n * or APR_LDAP_STOPTLS.\n */\n#define APR_LDAP_OPT_TLS 0x6fff\n/**\n * Set zero or more CA certificates, client certificates or private\n * keys globally, or per connection (where supported).\n */\n#define APR_LDAP_OPT_TLS_CERT 0x6ffe\n/**\n * Set the LDAP library to no verify the server certificate.  This means\n * all servers are considered trusted.\n */\n#define APR_LDAP_OPT_VERIFY_CERT 0x6ffd\n/**\n * Set the LDAP library to indicate if referrals should be chased during\n * LDAP searches.\n */\n#define APR_LDAP_OPT_REFERRALS 0x6ffc\n/**\n * Set the LDAP library to indicate a maximum number of referral hops to\n * chase before giving up on the search.\n */\n#define APR_LDAP_OPT_REFHOPLIMIT 0x6ffb\n\n/**\n * Structures for the apr_set_option() cases\n */\n\n/**\n * APR_LDAP_OPT_TLS_CERT\n *\n * This structure includes possible options to set certificates on\n * system initialisation. Different SDKs have different certificate\n * requirements, and to achieve this multiple certificates must be\n * specified at once passed as an (apr_array_header_t *).\n *\n * Netscape:\n * Needs the CA cert database (cert7.db), the client cert database (key3.db)\n * and the security module file (secmod.db) set at the system initialisation\n * time. Three types are supported: APR_LDAP_CERT7_DB, APR_LDAP_KEY3_DB and\n * APR_LDAP_SECMOD.\n *\n * To specify a client cert connection, a certificate nickname needs to be\n * provided with a type of APR_LDAP_CERT.\n * int ldapssl_enable_clientauth( LDAP *ld, char *keynickname,\n * char *keypasswd, char *certnickname );\n * keynickname is currently not used, and should be set to \"\"\n *\n * Novell:\n * Needs CA certificates and client certificates set at system initialisation\n * time. Three types are supported: APR_LDAP_CA*, APR_LDAP_CERT* and\n * APR_LDAP_KEY*.\n *\n * Certificates cannot be specified per connection.\n *\n * The functions used are:\n * ldapssl_add_trusted_cert(serverTrustedRoot, serverTrustedRootEncoding);\n * Clients certs and keys are set at system initialisation time with\n * int ldapssl_set_client_cert (\n *  void   *cert,\n *  int     type\n *  void   *password); \n * type can be LDAPSSL_CERT_FILETYPE_B64 or LDAPSSL_CERT_FILETYPE_DER\n *  ldapssl_set_client_private_key(clientPrivateKey,\n *                                 clientPrivateKeyEncoding,\n *                                 clientPrivateKeyPassword);\n *\n * OpenSSL:\n * Needs one or more CA certificates to be set at system initialisation time\n * with a type of APR_LDAP_CA*.\n *\n * May have one or more client certificates set per connection with a type of\n * APR_LDAP_CERT*, and keys with APR_LDAP_KEY*.\n */\n/** CA certificate type unknown */\n#define APR_LDAP_CA_TYPE_UNKNOWN    0\n/** binary DER encoded CA certificate */\n#define APR_LDAP_CA_TYPE_DER        1\n/** PEM encoded CA certificate */\n#define APR_LDAP_CA_TYPE_BASE64     2\n/** Netscape/Mozilla cert7.db CA certificate database */\n#define APR_LDAP_CA_TYPE_CERT7_DB   3\n/** Netscape/Mozilla secmod file */\n#define APR_LDAP_CA_TYPE_SECMOD     4\n/** Client certificate type unknown */\n#define APR_LDAP_CERT_TYPE_UNKNOWN  5\n/** binary DER encoded client certificate */\n#define APR_LDAP_CERT_TYPE_DER      6\n/** PEM encoded client certificate */\n#define APR_LDAP_CERT_TYPE_BASE64   7\n/** Netscape/Mozilla key3.db client certificate database */\n#define APR_LDAP_CERT_TYPE_KEY3_DB  8\n/** Netscape/Mozilla client certificate nickname */\n#define APR_LDAP_CERT_TYPE_NICKNAME 9\n/** Private key type unknown */\n#define APR_LDAP_KEY_TYPE_UNKNOWN   10\n/** binary DER encoded private key */\n#define APR_LDAP_KEY_TYPE_DER       11\n/** PEM encoded private key */\n#define APR_LDAP_KEY_TYPE_BASE64    12\n/** PKCS#12 encoded client certificate */\n#define APR_LDAP_CERT_TYPE_PFX      13\n/** PKCS#12 encoded private key */\n#define APR_LDAP_KEY_TYPE_PFX       14\n/** Openldap directory full of base64-encoded cert \n * authorities with hashes in corresponding .0 directory\n */\n#define APR_LDAP_CA_TYPE_CACERTDIR_BASE64 15\n\n\n/**\n * Certificate structure.\n *\n * This structure is used to store certificate details. An array of\n * these structures is passed to apr_ldap_set_option() to set CA\n * and client certificates.\n * @param type Type of certificate APR_LDAP_*_TYPE_*\n * @param path Path, file or nickname of the certificate\n * @param password Optional password, can be NULL\n */\ntypedef struct apr_ldap_opt_tls_cert_t apr_ldap_opt_tls_cert_t;\nstruct apr_ldap_opt_tls_cert_t {\n    int type;\n    const char *path;\n    const char *password;\n};\n\n/**\n * APR_LDAP_OPT_TLS\n *\n * This sets the SSL level on the LDAP handle.\n *\n * Netscape/Mozilla:\n * Supports SSL, but not STARTTLS\n * SSL is enabled by calling ldapssl_install_routines().\n *\n * Novell:\n * Supports SSL and STARTTLS.\n * SSL is enabled by calling ldapssl_install_routines(). Note that calling\n * other ldap functions before ldapssl_install_routines() may cause this\n * function to fail.\n * STARTTLS is enabled by calling ldapssl_start_tls_s() after calling\n * ldapssl_install_routines() (check this).\n *\n * OpenLDAP:\n * Supports SSL and supports STARTTLS, but none of this is documented:\n * http://www.openldap.org/lists/openldap-software/200409/msg00618.html\n * Documentation for both SSL support and STARTTLS has been deleted from\n * the OpenLDAP documentation and website.\n */\n\n/** No encryption */\n#define APR_LDAP_NONE 0\n/** SSL encryption (ldaps://) */\n#define APR_LDAP_SSL 1\n/** TLS encryption (STARTTLS) */\n#define APR_LDAP_STARTTLS 2\n/** end TLS encryption (STOPTLS) */\n#define APR_LDAP_STOPTLS 3\n\n/**\n * APR LDAP get option function\n *\n * This function gets option values from a given LDAP session if\n * one was specified. It maps to the native ldap_get_option() function.\n * @param pool The pool to use\n * @param ldap The LDAP handle\n * @param option The LDAP_OPT_* option to return\n * @param outvalue The value returned (if any)\n * @param result_err The apr_ldap_err_t structure contained detailed results\n *        of the operation.\n */\nAPU_DECLARE_LDAP(int) apr_ldap_get_option(apr_pool_t *pool,\n                                          LDAP *ldap,\n                                          int option,\n                                          void *outvalue,\n                                          apr_ldap_err_t **result_err);\n\n/**\n * APR LDAP set option function\n * \n * This function sets option values to a given LDAP session if\n * one was specified. It maps to the native ldap_set_option() function.\n * \n * Where an option is not supported by an LDAP toolkit, this function\n * will try and apply legacy functions to achieve the same effect,\n * depending on the platform.\n * @param pool The pool to use\n * @param ldap The LDAP handle\n * @param option The LDAP_OPT_* option to set\n * @param invalue The value to set\n * @param result_err The apr_ldap_err_t structure contained detailed results\n *        of the operation.\n */\nAPU_DECLARE_LDAP(int) apr_ldap_set_option(apr_pool_t *pool,\n                                          LDAP *ldap,\n                                          int option,\n                                          const void *invalue,\n                                          apr_ldap_err_t **result_err);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* APR_HAS_LDAP */\n\n/** @} */\n\n#endif /* APR_LDAP_OPTION_H */\n\n"
  },
  {
    "path": "third_party/include/aprutil/apr_ldap_rebind.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The APR LDAP rebind functions provide an implementation of\n * a rebind procedure that can be used to allow clients to chase referrals,\n * using the same credentials used to log in originally.\n *\n * Use of this implementation is optional.\n *\n * @file apr_ldap_rebind.h\n * @brief Apache LDAP library\n */\n\n#ifndef APU_LDAP_REBIND_H\n#define APU_LDAP_REBIND_H\n\n/**\n * @addtogroup APR_Util_LDAP\n * @{\n **/\n\n#if defined(DOXYGEN)\n#include \"apr_ldap.h\"\n#endif\n\n/*\n * Handle the case when LDAP is enabled\n */\n#if APR_HAS_LDAP\n\n/**\n * APR LDAP initialize rebind lock\n *\n * This function creates the lock for controlling access to the xref list..\n * @param pool Pool to use when creating the xref_lock.\n */\nAPU_DECLARE_LDAP(apr_status_t) apr_ldap_rebind_init(apr_pool_t *pool);\n\n\n/**\n * APR LDAP rebind_add function\n *\n * This function creates a cross reference entry for the specified ldap\n * connection. The rebind callback function will look up this ldap \n * connection so it can retrieve the bindDN and bindPW for use in any \n * binds while referrals are being chased.\n *\n * This function will add the callback to the LDAP handle passed in.\n *\n * A cleanup is registered within the pool provided to remove this\n * entry when the pool is removed. Alternatively apr_ldap_rebind_remove()\n * can be called to explicitly remove the entry at will.\n *\n * @param pool The pool to use\n * @param ld The LDAP connectionhandle\n * @param bindDN The bind DN to be used for any binds while chasing \n *               referrals on this ldap connection.\n * @param bindPW The bind Password to be used for any binds while \n *               chasing referrals on this ldap connection.\n */\nAPU_DECLARE_LDAP(apr_status_t) apr_ldap_rebind_add(apr_pool_t *pool,\n                                                   LDAP *ld,\n                                                   const char *bindDN,\n                                                   const char *bindPW);\n\n/**\n * APR LDAP rebind_remove function\n *\n * This function removes the rebind cross reference entry for the\n * specified ldap connection.\n *\n * If not explicitly removed, this function will be called automatically\n * when the pool is cleaned up.\n *\n * @param ld The LDAP connectionhandle\n */\nAPU_DECLARE_LDAP(apr_status_t) apr_ldap_rebind_remove(LDAP *ld);\n\n#endif /* APR_HAS_LDAP */\n\n/** @} */\n\n#endif /* APU_LDAP_REBIND_H */\n\n"
  },
  {
    "path": "third_party/include/aprutil/apr_ldap_url.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @file apr_ldap_url.h\n * @brief  APR-UTIL LDAP ldap_init() functions\n */\n#ifndef APR_LDAP_URL_H\n#define APR_LDAP_URL_H\n\n/**\n * @addtogroup APR_Util_LDAP\n * @{\n */\n\n#if defined(DOXYGEN)\n#include \"apr_ldap.h\"\n#endif\n\n#if APR_HAS_LDAP\n\n#include \"apu.h\"\n#include \"apr_pools.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/** Structure to access an exploded LDAP URL */\ntypedef struct apr_ldap_url_desc_t {\n    struct  apr_ldap_url_desc_t  *lud_next;\n    char    *lud_scheme;\n    char    *lud_host;\n    int     lud_port;\n    char    *lud_dn;\n    char    **lud_attrs;\n    int     lud_scope;\n    char    *lud_filter;\n    char    **lud_exts;\n    int     lud_crit_exts;\n} apr_ldap_url_desc_t;\n\n#ifndef APR_LDAP_URL_SUCCESS\n#define APR_LDAP_URL_SUCCESS          0x00    /* Success */\n#define APR_LDAP_URL_ERR_MEM          0x01    /* can't allocate memory space */\n#define APR_LDAP_URL_ERR_PARAM        0x02    /* parameter is bad */\n#define APR_LDAP_URL_ERR_BADSCHEME    0x03    /* URL doesn't begin with \"ldap[si]://\" */\n#define APR_LDAP_URL_ERR_BADENCLOSURE 0x04    /* URL is missing trailing \">\" */\n#define APR_LDAP_URL_ERR_BADURL       0x05    /* URL is bad */\n#define APR_LDAP_URL_ERR_BADHOST      0x06    /* host port is bad */\n#define APR_LDAP_URL_ERR_BADATTRS     0x07    /* bad (or missing) attributes */\n#define APR_LDAP_URL_ERR_BADSCOPE     0x08    /* scope string is invalid (or missing) */\n#define APR_LDAP_URL_ERR_BADFILTER    0x09    /* bad or missing filter */\n#define APR_LDAP_URL_ERR_BADEXTS      0x0a    /* bad or missing extensions */\n#endif\n\n/**\n * Is this URL an ldap url? ldap://\n * @param url The url to test\n */\nAPU_DECLARE(int) apr_ldap_is_ldap_url(const char *url);\n\n/**\n * Is this URL an SSL ldap url? ldaps://\n * @param url The url to test\n */\nAPU_DECLARE(int) apr_ldap_is_ldaps_url(const char *url);\n\n/**\n * Is this URL an ldap socket url? ldapi://\n * @param url The url to test\n */\nAPU_DECLARE(int) apr_ldap_is_ldapi_url(const char *url);\n\n/**\n * Parse an LDAP URL.\n * @param pool The pool to use\n * @param url_in The URL to parse\n * @param ludpp The structure to return the exploded URL\n * @param result_err The result structure of the operation\n */\nAPU_DECLARE(int) apr_ldap_url_parse_ext(apr_pool_t *pool,\n                                        const char *url_in,\n                                        apr_ldap_url_desc_t **ludpp,\n                                        apr_ldap_err_t **result_err);\n\n/**\n * Parse an LDAP URL.\n * @param pool The pool to use\n * @param url_in The URL to parse\n * @param ludpp The structure to return the exploded URL\n * @param result_err The result structure of the operation\n */\nAPU_DECLARE(int) apr_ldap_url_parse(apr_pool_t *pool,\n                                    const char *url_in,\n                                    apr_ldap_url_desc_t **ludpp,\n                                    apr_ldap_err_t **result_err);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* APR_HAS_LDAP */\n\n/** @} */\n\n#endif /* APR_LDAP_URL_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_md4.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* This is derived from material copyright RSA Data Security, Inc.\n * Their notice is reproduced below in its entirety.\n *\n * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All\n * rights reserved.\n *\n * License to copy and use this software is granted provided that it\n * is identified as the \"RSA Data Security, Inc. MD4 Message-Digest\n * Algorithm\" in all material mentioning or referencing this software\n * or this function.\n *\n * License is also granted to make and use derivative works provided\n * that such works are identified as \"derived from the RSA Data\n * Security, Inc. MD4 Message-Digest Algorithm\" in all material\n * mentioning or referencing the derived work.\n *\n * RSA Data Security, Inc. makes no representations concerning either\n * the merchantability of this software or the suitability of this\n * software for any particular purpose. It is provided \"as is\"\n * without express or implied warranty of any kind.\n *\n * These notices must be retained in any copies of any part of this\n * documentation and/or software.\n */\n\n#ifndef APR_MD4_H\n#define APR_MD4_H\n\n#include \"apu.h\"\n#include \"apr_xlate.h\"\n/**\n * @file apr_md4.h\n * @brief APR-UTIL MD4 Library\n */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @defgroup APR_Util_MD4 MD4 Library\n * @ingroup APR_Util\n * @{\n */\n\n/** The digestsize for MD4 */\n#define APR_MD4_DIGESTSIZE 16\n\n/** @see apr_md4_ctx_t */\ntypedef struct apr_md4_ctx_t apr_md4_ctx_t;\n\n/** MD4 context. */\nstruct apr_md4_ctx_t {\n    /** state (ABCD) */\n    apr_uint32_t state[4];\n    /** number of bits, modulo 2^64 (lsb first) */\n    apr_uint32_t count[2];\n    /** input buffer */\n    unsigned char buffer[64];\n#if APR_HAS_XLATE\n    /** translation handle */\n    apr_xlate_t *xlate;\n#endif\n};\n\n/**\n * MD4 Initialize.  Begins an MD4 operation, writing a new context.\n * @param context The MD4 context to initialize.\n */\nAPU_DECLARE(apr_status_t) apr_md4_init(apr_md4_ctx_t *context);\n\n#if APR_HAS_XLATE\n/**\n * MDr4 translation setup.  Provides the APR translation handle to be used \n * for translating the content before calculating the digest.\n * @param context The MD4 content to set the translation for.\n * @param xlate The translation handle to use for this MD4 context \n */\nAPU_DECLARE(apr_status_t) apr_md4_set_xlate(apr_md4_ctx_t *context,\n                                            apr_xlate_t *xlate);\n#else\n#define apr_md4_set_xlate(context, xlate) APR_ENOTIMPL\n#endif\n\n/**\n * MD4 block update operation.  Continue an MD4 message-digest operation, \n * processing another message block, and updating the context.\n * @param context The MD4 content to update.\n * @param input next message block to update\n * @param inputLen The length of the next message block\n */\nAPU_DECLARE(apr_status_t) apr_md4_update(apr_md4_ctx_t *context,\n                                         const unsigned char *input,\n                                         apr_size_t inputLen);\n\n/**\n * MD4 finalization.  Ends an MD4 message-digest operation, writing the \n * message digest and zeroing the context\n * @param digest The final MD4 digest\n * @param context The MD4 content we are finalizing.\n */\nAPU_DECLARE(apr_status_t) apr_md4_final(\n                                    unsigned char digest[APR_MD4_DIGESTSIZE],\n                                    apr_md4_ctx_t *context);\n\n/**\n * MD4 digest computation\n * @param digest The MD4 digest\n * @param input message block to use\n * @param inputLen The length of the message block\n */\nAPU_DECLARE(apr_status_t) apr_md4(unsigned char digest[APR_MD4_DIGESTSIZE],\n                                  const unsigned char *input,\n                                  apr_size_t inputLen);\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* !APR_MD4_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_md5.h",
    "content": "/*\n * This is work is derived from material Copyright RSA Data Security, Inc.\n *\n * The RSA copyright statement and Licence for that original material is\n * included below. This is followed by the Apache copyright statement and\n * licence for the modifications made to that material.\n */\n\n/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All\n   rights reserved.\n\n   License to copy and use this software is granted provided that it\n   is identified as the \"RSA Data Security, Inc. MD5 Message-Digest\n   Algorithm\" in all material mentioning or referencing this software\n   or this function.\n\n   License is also granted to make and use derivative works provided\n   that such works are identified as \"derived from the RSA Data\n   Security, Inc. MD5 Message-Digest Algorithm\" in all material\n   mentioning or referencing the derived work.\n\n   RSA Data Security, Inc. makes no representations concerning either\n   the merchantability of this software or the suitability of this\n   software for any particular purpose. It is provided \"as is\"\n   without express or implied warranty of any kind.\n\n   These notices must be retained in any copies of any part of this\n   documentation and/or software.\n */\n\n/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_MD5_H\n#define APR_MD5_H\n\n#include \"apu.h\"\n#include \"apr_xlate.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n/**\n * @file apr_md5.h\n * @brief APR MD5 Routines\n */\n\n/**\n * @defgroup APR_MD5 MD5 Routines\n * @ingroup APR\n * @{\n */\n\n/** The MD5 digest size */\n#define APR_MD5_DIGESTSIZE 16\n\n/** @see apr_md5_ctx_t */\ntypedef struct apr_md5_ctx_t apr_md5_ctx_t;\n\n/** MD5 context. */\nstruct apr_md5_ctx_t {\n    /** state (ABCD) */\n    apr_uint32_t state[4];\n    /** number of bits, modulo 2^64 (lsb first) */\n    apr_uint32_t count[2];\n    /** input buffer */\n    unsigned char buffer[64];\n    /** translation handle \n     *  ignored if xlate is unsupported\n     */\n    apr_xlate_t *xlate;\n};\n\n/**\n * MD5 Initialize.  Begins an MD5 operation, writing a new context.\n * @param context The MD5 context to initialize.\n */\nAPU_DECLARE(apr_status_t) apr_md5_init(apr_md5_ctx_t *context);\n\n/**\n * MD5 translation setup.  Provides the APR translation handle to be used \n * for translating the content before calculating the digest.\n * @param context The MD5 content to set the translation for.\n * @param xlate The translation handle to use for this MD5 context \n */\nAPU_DECLARE(apr_status_t) apr_md5_set_xlate(apr_md5_ctx_t *context,\n                                            apr_xlate_t *xlate);\n\n/**\n * MD5 block update operation.  Continue an MD5 message-digest operation, \n * processing another message block, and updating the context.\n * @param context The MD5 content to update.\n * @param input next message block to update\n * @param inputLen The length of the next message block\n */\nAPU_DECLARE(apr_status_t) apr_md5_update(apr_md5_ctx_t *context,\n                                         const void *input,\n                                         apr_size_t inputLen);\n\n/**\n * MD5 finalization.  Ends an MD5 message-digest operation, writing the \n * message digest and zeroing the context\n * @param digest The final MD5 digest\n * @param context The MD5 content we are finalizing.\n */\nAPU_DECLARE(apr_status_t) apr_md5_final(unsigned char digest[APR_MD5_DIGESTSIZE],\n                                        apr_md5_ctx_t *context);\n\n/**\n * MD5 in one step\n * @param digest The final MD5 digest\n * @param input The message block to use\n * @param inputLen The length of the message block\n */\nAPU_DECLARE(apr_status_t) apr_md5(unsigned char digest[APR_MD5_DIGESTSIZE],\n                                  const void *input,\n                                  apr_size_t inputLen);\n\n/**\n * Encode a password using an MD5 algorithm\n * @param password The password to encode\n * @param salt The salt string to use for the encoding\n * @param result The string to store the encoded password in\n * @param nbytes The size of the result buffer\n */\nAPU_DECLARE(apr_status_t) apr_md5_encode(const char *password, const char *salt,\n                                         char *result, apr_size_t nbytes);\n\n/**\n * Encode a password using the bcrypt algorithm\n * @param password The password to encode\n * @param count The cost of the encoding, possible values are 4 to 31\n * @param salt Pointer to binary data to be used as salt for the encoding\n * @param salt_len The size of the salt data (must be >= 16)\n * @param out The string to store the encoded password in\n * @param out_len The size of the result buffer (must be >= 61)\n */\nAPU_DECLARE(apr_status_t) apr_bcrypt_encode(const char *pw,\n                                            unsigned int count,\n                                            const unsigned char *salt,\n                                            apr_size_t salt_len,\n                                            char *out, apr_size_t out_len);\n\n/**\n * Validate hashes created by APR-supported algorithms: md5, bcrypt, and sha1.\n * hashes created by crypt are supported only on platforms that provide\n * crypt(3), so don't rely on that function unless you know that your\n * application will be run only on platforms that support it.  On platforms\n * that don't support crypt(3), this falls back to a clear text string\n * comparison.\n * @param passwd The password to validate\n * @param hash The password to validate against\n */\nAPU_DECLARE(apr_status_t) apr_password_validate(const char *passwd, \n                                                const char *hash);\n\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* !APR_MD5_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_memcache.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_MEMCACHE_H\n#define APR_MEMCACHE_H\n\n/**\n * @file apr_memcache.h\n * @brief Client interface for memcached\n * @remark To use this interface you must have a separate memcached\n * server running. See the memcached website at http://www.danga.com/memcached/\n * for more information.\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_time.h\"\n#include \"apr_strings.h\"\n#include \"apr_network_io.h\"\n#include \"apr_ring.h\"\n#include \"apr_buckets.h\"\n#include \"apr_reslist.h\"\n#include \"apr_hash.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup APR_Util_MC Memcached Client Routines\n * @ingroup APR_Util\n * @{\n */\n\n/** Specifies the status of a memcached server */\ntypedef enum\n{\n    APR_MC_SERVER_LIVE, /**< Server is alive and responding to requests */\n    APR_MC_SERVER_DEAD  /**< Server is not responding to requests */\n} apr_memcache_server_status_t;\n\n/** Opaque memcache client connection object */\ntypedef struct apr_memcache_conn_t apr_memcache_conn_t;\n\n/** Memcache Server Info Object */\ntypedef struct apr_memcache_server_t apr_memcache_server_t;\nstruct apr_memcache_server_t\n{\n    const char *host; /**< Hostname of this Server */\n    apr_port_t port; /**< Port of this Server */\n    apr_memcache_server_status_t status; /**< @see apr_memcache_server_status_t */\n#if APR_HAS_THREADS || defined(DOXYGEN)\n    apr_reslist_t *conns; /**< Resource list of actual client connections */\n#else\n    apr_memcache_conn_t *conn;\n#endif\n    apr_pool_t *p; /** Pool to use for private allocations */\n#if APR_HAS_THREADS\n    apr_thread_mutex_t *lock;\n#endif\n    apr_time_t btime;\n};\n\n/* Custom hash callback function prototype, user for server selection.\n* @param baton user selected baton\n* @param data data to hash\n* @param data_len length of data\n*/\ntypedef apr_uint32_t (*apr_memcache_hash_func)(void *baton,\n                                               const char *data,\n                                               const apr_size_t data_len);\n\ntypedef struct apr_memcache_t apr_memcache_t;\n\n/* Custom Server Select callback function prototype.\n* @param baton user selected baton\n* @param mc memcache instance, use mc->live_servers to select a node\n* @param hash hash of the selected key.\n*/\ntypedef apr_memcache_server_t* (*apr_memcache_server_func)(void *baton,\n                                                 apr_memcache_t *mc,\n                                                 const apr_uint32_t hash);\n\n/** Container for a set of memcached servers */\nstruct apr_memcache_t\n{\n    apr_uint32_t flags; /**< Flags, Not currently used */\n    apr_uint16_t nalloc; /**< Number of Servers Allocated */\n    apr_uint16_t ntotal; /**< Number of Servers Added */\n    apr_memcache_server_t **live_servers; /**< Array of Servers */\n    apr_pool_t *p; /** Pool to use for allocations */\n    void *hash_baton;\n    apr_memcache_hash_func hash_func;\n    void *server_baton;\n    apr_memcache_server_func server_func;\n};\n\n/** Returned Data from a multiple get */\ntypedef struct\n{\n    apr_status_t status;\n    const char* key;\n    apr_size_t len;\n    char *data;\n    apr_uint16_t flags;\n} apr_memcache_value_t;\n\n/**\n * Creates a crc32 hash used to split keys between servers\n * @param mc The memcache client object to use\n * @param data Data to be hashed\n * @param data_len Length of the data to use\n * @return crc32 hash of data\n * @remark The crc32 hash is not compatible with old memcached clients.\n */\nAPU_DECLARE(apr_uint32_t) apr_memcache_hash(apr_memcache_t *mc,\n                                            const char *data,\n                                            const apr_size_t data_len);\n\n/**\n * Pure CRC32 Hash. Used by some clients.\n */\nAPU_DECLARE(apr_uint32_t) apr_memcache_hash_crc32(void *baton,\n                                                  const char *data,\n                                                  const apr_size_t data_len);\n\n/**\n * hash compatible with the standard Perl Client.\n */\nAPU_DECLARE(apr_uint32_t) apr_memcache_hash_default(void *baton,\n                                                    const char *data,\n                                                    const apr_size_t data_len);\n\n/**\n * Picks a server based on a hash\n * @param mc The memcache client object to use\n * @param hash Hashed value of a Key\n * @return server that controls specified hash\n * @see apr_memcache_hash\n */\nAPU_DECLARE(apr_memcache_server_t *) apr_memcache_find_server_hash(apr_memcache_t *mc,\n                                                                   const apr_uint32_t hash);\n\n/**\n * server selection compatible with the standard Perl Client.\n */\nAPU_DECLARE(apr_memcache_server_t *) apr_memcache_find_server_hash_default(void *baton,\n                                                                           apr_memcache_t *mc, \n                                                                           const apr_uint32_t hash);\n\n/**\n * Adds a server to a client object\n * @param mc The memcache client object to use\n * @param server Server to add\n * @remark Adding servers is not thread safe, and should be done once at startup.\n * @warning Changing servers after startup may cause keys to go to\n * different servers.\n */\nAPU_DECLARE(apr_status_t) apr_memcache_add_server(apr_memcache_t *mc,\n                                                  apr_memcache_server_t *server);\n\n\n/**\n * Finds a Server object based on a hostname/port pair\n * @param mc The memcache client object to use\n * @param host Hostname of the server\n * @param port Port of the server\n * @return Server with matching Hostname and Port, or NULL if none was found.\n */\nAPU_DECLARE(apr_memcache_server_t *) apr_memcache_find_server(apr_memcache_t *mc,\n                                                              const char *host,\n                                                              apr_port_t port);\n\n/**\n * Enables a Server for use again\n * @param mc The memcache client object to use\n * @param ms Server to Activate\n */\nAPU_DECLARE(apr_status_t) apr_memcache_enable_server(apr_memcache_t *mc,\n                                                     apr_memcache_server_t *ms);\n\n\n/**\n * Disable a Server\n * @param mc The memcache client object to use\n * @param ms Server to Disable\n */\nAPU_DECLARE(apr_status_t) apr_memcache_disable_server(apr_memcache_t *mc,\n                                                      apr_memcache_server_t *ms);\n\n/**\n * Creates a new Server Object\n * @param p Pool to use\n * @param host hostname of the server\n * @param port port of the server\n * @param min  minimum number of client sockets to open\n * @param smax soft maximum number of client connections to open\n * @param max  hard maximum number of client connections\n * @param ttl  time to live in microseconds of a client connection\n * @param ns   location of the new server object\n * @see apr_reslist_create\n * @remark min, smax, and max are only used when APR_HAS_THREADS\n */\nAPU_DECLARE(apr_status_t) apr_memcache_server_create(apr_pool_t *p,\n                                                     const char *host,\n                                                     apr_port_t port,\n                                                     apr_uint32_t min,\n                                                     apr_uint32_t smax,\n                                                     apr_uint32_t max,\n                                                     apr_uint32_t ttl,\n                                                     apr_memcache_server_t **ns);\n/**\n * Creates a new memcached client object\n * @param p Pool to use\n * @param max_servers maximum number of servers\n * @param flags Not currently used\n * @param mc   location of the new memcache client object\n */\nAPU_DECLARE(apr_status_t) apr_memcache_create(apr_pool_t *p,\n                                              apr_uint16_t max_servers,\n                                              apr_uint32_t flags,\n                                              apr_memcache_t **mc);\n\n/**\n * Gets a value from the server, allocating the value out of p\n * @param mc client to use\n * @param p Pool to use\n * @param key null terminated string containing the key\n * @param baton location of the allocated value\n * @param len   length of data at baton\n * @param flags any flags set by the client for this key\n * @return \n */\nAPU_DECLARE(apr_status_t) apr_memcache_getp(apr_memcache_t *mc, \n                                            apr_pool_t *p,\n                                            const char* key,\n                                            char **baton,\n                                            apr_size_t *len,\n                                            apr_uint16_t *flags);\n\n\n/**\n * Add a key to a hash for a multiget query\n *  if the hash (*value) is NULL it will be created\n * @param data_pool pool from where the hash and their items are created from\n * @param key null terminated string containing the key\n * @param values hash of keys and values that this key will be added to\n * @return\n */\nAPU_DECLARE(void) apr_memcache_add_multget_key(apr_pool_t *data_pool,\n                                               const char* key,\n                                               apr_hash_t **values);\n\n/**\n * Gets multiple values from the server, allocating the values out of p\n * @param mc client to use\n * @param temp_pool Pool used for temporary allocations. May be cleared inside this\n *        call.\n * @param data_pool Pool used to allocate data for the returned values.\n * @param values hash of apr_memcache_value_t keyed by strings, contains the\n *        result of the multiget call.\n * @return\n */\nAPU_DECLARE(apr_status_t) apr_memcache_multgetp(apr_memcache_t *mc,\n                                                apr_pool_t *temp_pool,\n                                                apr_pool_t *data_pool,\n                                                apr_hash_t *values);\n\n/**\n * Sets a value by key on the server\n * @param mc client to use\n * @param key   null terminated string containing the key\n * @param baton data to store on the server\n * @param data_size   length of data at baton\n * @param timeout time in seconds for the data to live on the server\n * @param flags any flags set by the client for this key\n */\nAPU_DECLARE(apr_status_t) apr_memcache_set(apr_memcache_t *mc,\n                                           const char *key,\n                                           char *baton,\n                                           const apr_size_t data_size,\n                                           apr_uint32_t timeout,\n                                           apr_uint16_t flags);\n\n/**\n * Adds value by key on the server\n * @param mc client to use\n * @param key   null terminated string containing the key\n * @param baton data to store on the server\n * @param data_size   length of data at baton\n * @param timeout time for the data to live on the server\n * @param flags any flags set by the client for this key\n * @return APR_SUCCESS if the key was added, APR_EEXIST if the key \n * already exists on the server.\n */\nAPU_DECLARE(apr_status_t) apr_memcache_add(apr_memcache_t *mc,\n                                           const char *key,\n                                           char *baton,\n                                           const apr_size_t data_size,\n                                           apr_uint32_t timeout,\n                                           apr_uint16_t flags);\n\n/**\n * Replaces value by key on the server\n * @param mc client to use\n * @param key   null terminated string containing the key\n * @param baton data to store on the server\n * @param data_size   length of data at baton\n * @param timeout time for the data to live on the server\n * @param flags any flags set by the client for this key\n * @return APR_SUCCESS if the key was added, APR_EEXIST if the key \n * did not exist on the server.\n */\nAPU_DECLARE(apr_status_t) apr_memcache_replace(apr_memcache_t *mc,\n                                               const char *key,\n                                               char *baton,\n                                               const apr_size_t data_size,\n                                               apr_uint32_t timeout,\n                                               apr_uint16_t flags);\n/**\n * Deletes a key from a server\n * @param mc client to use\n * @param key   null terminated string containing the key\n * @param timeout time for the delete to stop other clients from adding\n */\nAPU_DECLARE(apr_status_t) apr_memcache_delete(apr_memcache_t *mc,\n                                              const char *key,\n                                              apr_uint32_t timeout);\n\n/**\n * Increments a value\n * @param mc client to use\n * @param key   null terminated string containing the key\n * @param n     number to increment by\n * @param nv    new value after incrementing\n */\nAPU_DECLARE(apr_status_t) apr_memcache_incr(apr_memcache_t *mc, \n                                            const char *key,\n                                            apr_int32_t n,\n                                            apr_uint32_t *nv);\n\n/**\n * Decrements a value\n * @param mc client to use\n * @param key   null terminated string containing the key\n * @param n     number to decrement by\n * @param new_value    new value after decrementing\n */\nAPU_DECLARE(apr_status_t) apr_memcache_decr(apr_memcache_t *mc, \n                                            const char *key,\n                                            apr_int32_t n,\n                                            apr_uint32_t *new_value);\n\n/**\n * Query a server's version\n * @param ms    server to query\n * @param p     Pool to allocate answer from\n * @param baton location to store server version string\n * @param len   length of the server version string\n */\nAPU_DECLARE(apr_status_t) apr_memcache_version(apr_memcache_server_t *ms,\n                                               apr_pool_t *p,\n                                               char **baton);\n\ntypedef struct\n{\n    /** Version string of this server */\n    const char *version;\n    /** Process id of this server process */\n    apr_uint32_t pid;\n    /** Number of seconds this server has been running */\n    apr_uint32_t uptime;\n    /** current UNIX time according to the server */\n    apr_time_t time;\n    /** The size of a pointer on the current machine */\n    apr_uint32_t pointer_size;\n    /** Accumulated user time for this process */\n    apr_time_t rusage_user;\n    /** Accumulated system time for this process */\n    apr_time_t rusage_system;\n    /** Current number of items stored by the server */\n    apr_uint32_t curr_items;\n    /** Total number of items stored by this server */\n    apr_uint32_t total_items;\n    /** Current number of bytes used by this server to store items */\n    apr_uint64_t bytes;\n    /** Number of open connections */\n    apr_uint32_t curr_connections;\n    /** Total number of connections opened since the server started running */\n    apr_uint32_t total_connections;\n    /** Number of connection structures allocated by the server */\n    apr_uint32_t connection_structures;\n    /** Cumulative number of retrieval requests */\n    apr_uint32_t cmd_get;\n    /** Cumulative number of storage requests */\n    apr_uint32_t cmd_set;\n    /** Number of keys that have been requested and found present */\n    apr_uint32_t get_hits;\n    /** Number of items that have been requested and not found */\n    apr_uint32_t get_misses;\n    /** Number of items removed from cache because they passed their\n        expiration time */\n    apr_uint64_t evictions;\n    /** Total number of bytes read by this server */\n    apr_uint64_t bytes_read;\n    /** Total number of bytes sent by this server */\n    apr_uint64_t bytes_written;\n    /** Number of bytes this server is allowed to use for storage. */\n    apr_uint32_t limit_maxbytes;\n    /** Number of threads the server is running (if built with threading) */\n    apr_uint32_t threads; \n} apr_memcache_stats_t;\n\n/**\n * Query a server for statistics\n * @param ms    server to query\n * @param p     Pool to allocate answer from\n * @param stats location of the new statistics structure\n */\nAPU_DECLARE(apr_status_t) apr_memcache_stats(apr_memcache_server_t *ms, \n                                             apr_pool_t *p,\n                                             apr_memcache_stats_t **stats);\n\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* APR_MEMCACHE_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_optional.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_OPTIONAL_H\n#define APR_OPTIONAL_H\n\n#include \"apu.h\"\n/** \n * @file apr_optional.h\n * @brief APR-UTIL registration of functions exported by modules\n */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** \n * @defgroup APR_Util_Opt Optional Functions\n * @ingroup APR_Util\n *\n * Typesafe registration and retrieval of functions that may not be present\n * (i.e. functions exported by optional modules)\n * @{\n */\n\n/**\n * The type of an optional function.\n * @param name The name of the function\n */\n#define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t\n\n/**\n * Declare an optional function.\n * @param ret The return type of the function\n * @param name The name of the function\n * @param args The function arguments (including brackets)\n */\n#define APR_DECLARE_OPTIONAL_FN(ret,name,args) \\\ntypedef ret (APR_OPTIONAL_FN_TYPE(name)) args\n\n/**\n * XXX: This doesn't belong here, then!\n * Private function! DO NOT USE! \n * @internal\n */\n\ntypedef void (apr_opt_fn_t)(void);\n/** @internal */\nAPU_DECLARE_NONSTD(void) apr_dynamic_fn_register(const char *szName, \n                                                  apr_opt_fn_t *pfn);\n\n/**\n * Register an optional function. This can be later retrieved, type-safely, by\n * name. Like all global functions, the name must be unique. Note that,\n * confusingly but correctly, the function itself can be static!\n * @param name The name of the function\n */\n#define APR_REGISTER_OPTIONAL_FN(name) do { \\\n  APR_OPTIONAL_FN_TYPE(name) *apu__opt = name; \\\n  apr_dynamic_fn_register(#name,(apr_opt_fn_t *)apu__opt); \\\n} while (0)\n\n/** @internal\n * Private function! DO NOT USE! \n */\nAPU_DECLARE(apr_opt_fn_t *) apr_dynamic_fn_retrieve(const char *szName);\n\n/**\n * Retrieve an optional function. Returns NULL if the function is not present.\n * @param name The name of the function\n */\n#define APR_RETRIEVE_OPTIONAL_FN(name) \\\n\t(APR_OPTIONAL_FN_TYPE(name) *)apr_dynamic_fn_retrieve(#name)\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* APR_OPTIONAL_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_optional_hooks.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file apr_optional_hooks.h\n * @brief Apache optional hook functions\n */\n\n\n#ifndef APR_OPTIONAL_HOOK_H\n#define APR_OPTIONAL_HOOK_H\n\n#include \"apr_tables.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n/** \n * @defgroup APR_Util_OPT_HOOK Optional Hook Functions\n * @ingroup APR_Util_Hook\n * @{\n */\n/**\n * Function to implement the APR_OPTIONAL_HOOK Macro\n * @internal\n * @see APR_OPTIONAL_HOOK\n *\n * @param szName The name of the hook\n * @param pfn A pointer to a function that will be called\n * @param aszPre a NULL-terminated array of strings that name modules whose hooks should precede this one\n * @param aszSucc a NULL-terminated array of strings that name modules whose hooks should succeed this one\n * @param nOrder an integer determining order before honouring aszPre and aszSucc (for example HOOK_MIDDLE)\n */\n\n\nAPU_DECLARE(void) apr_optional_hook_add(const char *szName,void (*pfn)(void),\n\t\t\t\t\tconst char * const *aszPre,\n\t\t\t\t\tconst char * const *aszSucc,\n\t\t\t\t\tint nOrder);\n\n/**\n * Hook to an optional hook.\n *\n * @param ns The namespace prefix of the hook functions\n * @param name The name of the hook\n * @param pfn A pointer to a function that will be called\n * @param aszPre a NULL-terminated array of strings that name modules whose hooks should precede this one\n * @param aszSucc a NULL-terminated array of strings that name modules whose hooks should succeed this one\n * @param nOrder an integer determining order before honouring aszPre and aszSucc (for example HOOK_MIDDLE)\n */\n\n#define APR_OPTIONAL_HOOK(ns,name,pfn,aszPre,aszSucc,nOrder) do { \\\n  ns##_HOOK_##name##_t *apu__hook = pfn; \\\n  apr_optional_hook_add(#name,(void (*)(void))apu__hook,aszPre, aszSucc, nOrder); \\\n} while (0)\n\n/**\n * @internal\n * @param szName - the name of the function\n * @return the hook structure for a given hook\n */\nAPU_DECLARE(apr_array_header_t *) apr_optional_hook_get(const char *szName);\n\n/**\n * Implement an optional hook that runs until one of the functions\n * returns something other than OK or DECLINE.\n *\n * @param ns The namespace prefix of the hook functions\n * @param link The linkage declaration prefix of the hook\n * @param ret The type of the return value of the hook\n * @param ret The type of the return value of the hook\n * @param name The name of the hook\n * @param args_decl The declaration of the arguments for the hook\n * @param args_use The names for the arguments for the hook\n * @param ok Success value\n * @param decline Decline value\n */\n#define APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ns,link,ret,name,args_decl,args_use,ok,decline) \\\nlink##_DECLARE(ret) ns##_run_##name args_decl \\\n    { \\\n    ns##_LINK_##name##_t *pHook; \\\n    int n; \\\n    ret rv; \\\n    apr_array_header_t *pHookArray=apr_optional_hook_get(#name); \\\n\\\n    if(!pHookArray) \\\n\treturn ok; \\\n\\\n    pHook=(ns##_LINK_##name##_t *)pHookArray->elts; \\\n    for(n=0 ; n < pHookArray->nelts ; ++n) \\\n\t{ \\\n\trv=(pHook[n].pFunc)args_use; \\\n\\\n\tif(rv != ok && rv != decline) \\\n\t    return rv; \\\n\t} \\\n    return ok; \\\n    }\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* APR_OPTIONAL_HOOK_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_queue.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_QUEUE_H\n#define APR_QUEUE_H\n\n/**\n * @file apr_queue.h\n * @brief Thread Safe FIFO bounded queue\n * @note Since most implementations of the queue are backed by a condition\n * variable implementation, it isn't available on systems without threads.\n * Although condition variables are sometimes available without threads.\n */\n\n#include \"apu.h\"\n#include \"apr_errno.h\"\n#include \"apr_pools.h\"\n\n#if APR_HAS_THREADS\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup APR_Util_FIFO Thread Safe FIFO bounded queue\n * @ingroup APR_Util\n * @{\n */\n\n/**\n * opaque structure\n */\ntypedef struct apr_queue_t apr_queue_t;\n\n/** \n * create a FIFO queue\n * @param queue The new queue\n * @param queue_capacity maximum size of the queue\n * @param a pool to allocate queue from\n */\nAPU_DECLARE(apr_status_t) apr_queue_create(apr_queue_t **queue, \n                                           unsigned int queue_capacity, \n                                           apr_pool_t *a);\n\n/**\n * push/add an object to the queue, blocking if the queue is already full\n *\n * @param queue the queue\n * @param data the data\n * @returns APR_EINTR the blocking was interrupted (try again)\n * @returns APR_EOF the queue has been terminated\n * @returns APR_SUCCESS on a successful push\n */\nAPU_DECLARE(apr_status_t) apr_queue_push(apr_queue_t *queue, void *data);\n\n/**\n * pop/get an object from the queue, blocking if the queue is already empty\n *\n * @param queue the queue\n * @param data the data\n * @returns APR_EINTR the blocking was interrupted (try again)\n * @returns APR_EOF if the queue has been terminated\n * @returns APR_SUCCESS on a successful pop\n */\nAPU_DECLARE(apr_status_t) apr_queue_pop(apr_queue_t *queue, void **data);\n\n/**\n * push/add an object to the queue, returning immediately if the queue is full\n *\n * @param queue the queue\n * @param data the data\n * @returns APR_EINTR the blocking operation was interrupted (try again)\n * @returns APR_EAGAIN the queue is full\n * @returns APR_EOF the queue has been terminated\n * @returns APR_SUCCESS on a successful push\n */\nAPU_DECLARE(apr_status_t) apr_queue_trypush(apr_queue_t *queue, void *data);\n\n/**\n * pop/get an object to the queue, returning immediately if the queue is empty\n *\n * @param queue the queue\n * @param data the data\n * @returns APR_EINTR the blocking operation was interrupted (try again)\n * @returns APR_EAGAIN the queue is empty\n * @returns APR_EOF the queue has been terminated\n * @returns APR_SUCCESS on a successful pop\n */\nAPU_DECLARE(apr_status_t) apr_queue_trypop(apr_queue_t *queue, void **data);\n\n/**\n * returns the size of the queue.\n *\n * @warning this is not threadsafe, and is intended for reporting/monitoring\n * of the queue.\n * @param queue the queue\n * @returns the size of the queue\n */\nAPU_DECLARE(unsigned int) apr_queue_size(apr_queue_t *queue);\n\n/**\n * interrupt all the threads blocking on this queue.\n *\n * @param queue the queue\n */\nAPU_DECLARE(apr_status_t) apr_queue_interrupt_all(apr_queue_t *queue);\n\n/**\n * terminate the queue, sending an interrupt to all the\n * blocking threads\n *\n * @param queue the queue\n */\nAPU_DECLARE(apr_status_t) apr_queue_term(apr_queue_t *queue);\n\n#ifdef __cplusplus\n}\n#endif\n\n/** @} */\n\n#endif /* APR_HAS_THREADS */\n\n#endif /* APRQUEUE_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_reslist.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_RESLIST_H\n#define APR_RESLIST_H\n\n/** \n * @file apr_reslist.h\n * @brief APR-UTIL Resource List Routines\n */\n\n#include \"apr.h\"\n#include \"apu.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n#include \"apr_time.h\"\n\n/**\n * @defgroup APR_Util_RL Resource List Routines\n * @ingroup APR_Util\n * @{\n */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/** Opaque resource list object */\ntypedef struct apr_reslist_t apr_reslist_t;\n\n/* Generic constructor called by resource list when it needs to create a\n * resource.\n * @param resource opaque resource\n * @param params flags\n * @param pool  Pool\n */\ntypedef apr_status_t (*apr_reslist_constructor)(void **resource, void *params,\n                                                apr_pool_t *pool);\n\n/* Generic destructor called by resource list when it needs to destroy a\n * resource.\n * @param resource opaque resource\n * @param params flags\n * @param pool  Pool\n */\ntypedef apr_status_t (*apr_reslist_destructor)(void *resource, void *params,\n                                               apr_pool_t *pool);\n\n/* Cleanup order modes */\n#define APR_RESLIST_CLEANUP_DEFAULT  0       /**< default pool cleanup */\n#define APR_RESLIST_CLEANUP_FIRST    1       /**< use pool pre cleanup */\n\n/**\n * Create a new resource list with the following parameters:\n * @param reslist An address where the pointer to the new resource\n *                list will be stored.\n * @param min Allowed minimum number of available resources. Zero\n *            creates new resources only when needed.\n * @param smax Resources will be destroyed during reslist maintenance to\n *             meet this maximum restriction as they expire (reach their ttl).\n * @param hmax Absolute maximum limit on the number of total resources.\n * @param ttl If non-zero, sets the maximum amount of time in microseconds an\n *            unused resource is valid.  Any resource which has exceeded this\n *            time will be destroyed, either when encountered by\n *            apr_reslist_acquire() or during reslist maintenance.\n * @param con Constructor routine that is called to create a new resource.\n * @param de Destructor routine that is called to destroy an expired resource.\n * @param params Passed to constructor and deconstructor\n * @param pool The pool from which to create this resource list. Also the\n *             same pool that is passed to the constructor and destructor\n *             routines.\n * @remark If APR has been compiled without thread support, hmax will be\n *         automatically set to 1 and values of min and smax will be forced to\n *         1 for any non-zero value.\n */\nAPU_DECLARE(apr_status_t) apr_reslist_create(apr_reslist_t **reslist,\n                                             int min, int smax, int hmax,\n                                             apr_interval_time_t ttl,\n                                             apr_reslist_constructor con,\n                                             apr_reslist_destructor de,\n                                             void *params,\n                                             apr_pool_t *pool);\n\n/**\n * Destroy the given resource list and all resources controlled by\n * this list.\n * FIXME: Should this block until all resources become available,\n *        or maybe just destroy all the free ones, or maybe destroy\n *        them even though they might be in use by something else?\n *        Currently it will abort if there are resources that haven't\n *        been released, so there is an assumption that all resources\n *        have been released to the list before calling this function.\n * @param reslist The reslist to destroy\n */\nAPU_DECLARE(apr_status_t) apr_reslist_destroy(apr_reslist_t *reslist);\n\n/**\n * Retrieve a resource from the list, creating a new one if necessary.\n * If we have met our maximum number of resources, we will block\n * until one becomes available.\n * @param reslist The resource list.\n * @param resource An address where the pointer to the resource\n *                will be stored.\n */\nAPU_DECLARE(apr_status_t) apr_reslist_acquire(apr_reslist_t *reslist,\n                                              void **resource);\n\n/**\n * Return a resource back to the list of available resources.\n * @param reslist The resource list.\n * @param resource The resource to return to the list.\n */\nAPU_DECLARE(apr_status_t) apr_reslist_release(apr_reslist_t *reslist,\n                                              void *resource);\n\n/**\n * Set the timeout the acquire will wait for a free resource\n * when the maximum number of resources is exceeded.\n * @param reslist The resource list.\n * @param timeout Timeout to wait. The zero waits forever.\n */\nAPU_DECLARE(void) apr_reslist_timeout_set(apr_reslist_t *reslist,\n                                          apr_interval_time_t timeout);\n\n/**\n * Return the number of outstanding resources.\n * @param reslist The resource list.\n */\nAPU_DECLARE(apr_uint32_t) apr_reslist_acquired_count(apr_reslist_t *reslist);\n\n/**\n * Invalidate a resource in the pool - e.g. a database connection\n * that returns a \"lost connection\" error and can't be restored.\n * Use this instead of apr_reslist_release if the resource is bad.\n * @param reslist The resource list.\n * @param resource The resource to invalidate.\n */\nAPU_DECLARE(apr_status_t) apr_reslist_invalidate(apr_reslist_t *reslist,\n                                                 void *resource);\n\n/**\n * Perform routine maintenance on the resource list. This call\n * may instantiate new resources or expire old resources.\n * @param reslist The resource list.\n */\nAPU_DECLARE(apr_status_t) apr_reslist_maintain(apr_reslist_t *reslist);\n\n/**\n * Set reslist cleanup order.\n * @param reslist The resource list.\n * @param mode Cleanup order mode\n * <PRE>\n *           APR_RESLIST_CLEANUP_DEFAULT  default pool cleanup order\n *           APR_RESLIST_CLEANUP_FIRST    use pool pre cleanup\n * </PRE>\n * @remark If APR_RESLIST_CLEANUP_FIRST is used the destructors will\n * be called before child pools of the pool used to create the reslist\n * are destroyed. This allows to explicitly destroy the child pools\n * inside reslist destructors.\n */\nAPU_DECLARE(void) apr_reslist_cleanup_order_set(apr_reslist_t *reslist,\n                                                apr_uint32_t mode);\n\n#ifdef __cplusplus\n}\n#endif\n\n/** @} */\n\n#endif  /* ! APR_RESLIST_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_rmm.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_RMM_H\n#define APR_RMM_H\n/** \n * @file apr_rmm.h\n * @brief APR-UTIL Relocatable Memory Management Routines\n */\n/**\n * @defgroup APR_Util_RMM Relocatable Memory Management Routines\n * @ingroup APR_Util\n * @{\n */\n\n#include \"apr.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n#include \"apu.h\"\n#include \"apr_anylock.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/** Structure to access Relocatable, Managed Memory */\ntypedef struct apr_rmm_t apr_rmm_t;\n\n/** Fundamental allocation unit, within a specific apr_rmm_t */\ntypedef apr_size_t   apr_rmm_off_t;\n\n/**\n * Initialize a relocatable memory block to be managed by the apr_rmm API.\n * @param rmm The relocatable memory block\n * @param lock An apr_anylock_t of the appropriate type of lock, or NULL\n *             if no locking is required.\n * @param membuf The block of relocatable memory to be managed\n * @param memsize The size of relocatable memory block to be managed\n * @param cont The pool to use for local storage and management\n * @remark Both @param membuf and @param memsize must be aligned\n * (for instance using APR_ALIGN_DEFAULT).\n */\nAPU_DECLARE(apr_status_t) apr_rmm_init(apr_rmm_t **rmm, apr_anylock_t *lock,\n                                       void *membuf, apr_size_t memsize, \n                                       apr_pool_t *cont);\n\n/**\n * Destroy a managed memory block.\n * @param rmm The relocatable memory block to destroy\n */\nAPU_DECLARE(apr_status_t) apr_rmm_destroy(apr_rmm_t *rmm);\n\n/**\n * Attach to a relocatable memory block already managed by the apr_rmm API.\n * @param rmm The relocatable memory block\n * @param lock An apr_anylock_t of the appropriate type of lock\n * @param membuf The block of relocatable memory already under management\n * @param cont The pool to use for local storage and management\n */\nAPU_DECLARE(apr_status_t) apr_rmm_attach(apr_rmm_t **rmm, apr_anylock_t *lock,\n                                         void *membuf, apr_pool_t *cont);\n\n/**\n * Detach from the managed block of memory.\n * @param rmm The relocatable memory block to detach from\n */\nAPU_DECLARE(apr_status_t) apr_rmm_detach(apr_rmm_t *rmm);\n\n/**\n * Allocate memory from the block of relocatable memory.\n * @param rmm The relocatable memory block\n * @param reqsize How much memory to allocate\n */\nAPU_DECLARE(apr_rmm_off_t) apr_rmm_malloc(apr_rmm_t *rmm, apr_size_t reqsize);\n\n/**\n * Realloc memory from the block of relocatable memory.\n * @param rmm The relocatable memory block\n * @param entity The memory allocation to realloc\n * @param reqsize The new size\n */\nAPU_DECLARE(apr_rmm_off_t) apr_rmm_realloc(apr_rmm_t *rmm, void *entity, apr_size_t reqsize);\n\n/**\n * Allocate memory from the block of relocatable memory and initialize it to zero.\n * @param rmm The relocatable memory block\n * @param reqsize How much memory to allocate\n */\nAPU_DECLARE(apr_rmm_off_t) apr_rmm_calloc(apr_rmm_t *rmm, apr_size_t reqsize);\n\n/**\n * Free allocation returned by apr_rmm_malloc or apr_rmm_calloc.\n * @param rmm The relocatable memory block\n * @param entity The memory allocation to free\n */\nAPU_DECLARE(apr_status_t) apr_rmm_free(apr_rmm_t *rmm, apr_rmm_off_t entity);\n\n/**\n * Retrieve the physical address of a relocatable allocation of memory\n * @param rmm The relocatable memory block\n * @param entity The memory allocation to free\n * @return address The address, aligned with APR_ALIGN_DEFAULT.\n */\nAPU_DECLARE(void *) apr_rmm_addr_get(apr_rmm_t *rmm, apr_rmm_off_t entity);\n\n/**\n * Compute the offset of a relocatable allocation of memory\n * @param rmm The relocatable memory block\n * @param entity The physical address to convert to an offset\n */\nAPU_DECLARE(apr_rmm_off_t) apr_rmm_offset_get(apr_rmm_t *rmm, void *entity);\n\n/**\n * Compute the required overallocation of memory needed to fit n allocs\n * @param n The number of alloc/calloc regions desired\n */\nAPU_DECLARE(apr_size_t) apr_rmm_overhead_get(int n);\n\n#ifdef __cplusplus\n}\n#endif\n/** @} */\n#endif  /* ! APR_RMM_H */\n\n"
  },
  {
    "path": "third_party/include/aprutil/apr_sdbm.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * sdbm - ndbm work-alike hashed database library\n * based on Per-Ake Larson's Dynamic Hashing algorithms. BIT 18 (1978).\n * author: oz@nexus.yorku.ca\n * status: ex-public domain\n */\n\n#ifndef APR_SDBM_H\n#define APR_SDBM_H\n\n#include \"apu.h\"\n#include \"apr_errno.h\"\n#include \"apr_file_io.h\"   /* for apr_fileperms_t */\n\n/** \n * @file apr_sdbm.h\n * @brief apr-util SDBM library\n */\n/**\n * @defgroup APR_Util_DBM_SDBM SDBM library\n * @ingroup APR_Util_DBM\n * @{\n */\n\n/**\n * Structure for referencing an sdbm\n */\ntypedef struct apr_sdbm_t apr_sdbm_t;\n\n/**\n * Structure for referencing the datum record within an sdbm\n */\ntypedef struct {\n    /** pointer to the data stored/retrieved */\n    char *dptr;\n    /** size of data */\n    /* apr_ssize_t for release 2.0??? */\n    int dsize;\n} apr_sdbm_datum_t;\n\n/* The extensions used for the database files */\n/** SDBM Directory file extension */\n#define APR_SDBM_DIRFEXT\t\".dir\"\n/** SDBM page file extension */\n#define APR_SDBM_PAGFEXT\t\".pag\"\n\n/* flags to sdbm_store */\n#define APR_SDBM_INSERT     0   /**< Insert */\n#define APR_SDBM_REPLACE    1   /**< Replace */\n#define APR_SDBM_INSERTDUP  2   /**< Insert with duplicates */\n\n/**\n * Open an sdbm database by file name\n * @param db The newly opened database\n * @param name The sdbm file to open\n * @param mode The flag values (APR_READ and APR_BINARY flags are implicit)\n * <PRE>\n *           APR_WRITE          open for read-write access\n *           APR_CREATE         create the sdbm if it does not exist\n *           APR_TRUNCATE       empty the contents of the sdbm\n *           APR_EXCL           fail for APR_CREATE if the file exists\n *           APR_DELONCLOSE     delete the sdbm when closed\n *           APR_SHARELOCK      support locking across process/machines\n * </PRE>\n * @param perms Permissions to apply to if created\n * @param p The pool to use when creating the sdbm\n * @remark The sdbm name is not a true file name, as sdbm appends suffixes \n * for seperate data and index files.\n */\nAPU_DECLARE(apr_status_t) apr_sdbm_open(apr_sdbm_t **db, const char *name, \n                                        apr_int32_t mode, \n                                        apr_fileperms_t perms, apr_pool_t *p);\n\n/**\n * Close an sdbm file previously opened by apr_sdbm_open\n * @param db The database to close\n */\nAPU_DECLARE(apr_status_t) apr_sdbm_close(apr_sdbm_t *db);\n\n/**\n * Lock an sdbm database for concurency of multiple operations\n * @param db The database to lock\n * @param type The lock type\n * <PRE>\n *           APR_FLOCK_SHARED\n *           APR_FLOCK_EXCLUSIVE\n * </PRE>\n * @remark Calls to apr_sdbm_lock may be nested.  All apr_sdbm functions\n * perform implicit locking.  Since an APR_FLOCK_SHARED lock cannot be \n * portably promoted to an APR_FLOCK_EXCLUSIVE lock, apr_sdbm_store and \n * apr_sdbm_delete calls will fail if an APR_FLOCK_SHARED lock is held.\n * The apr_sdbm_lock call requires the database to be opened with the\n * APR_SHARELOCK mode value.\n */\nAPU_DECLARE(apr_status_t) apr_sdbm_lock(apr_sdbm_t *db, int type);\n\n/**\n * Release an sdbm lock previously aquired by apr_sdbm_lock\n * @param db The database to unlock\n */\nAPU_DECLARE(apr_status_t) apr_sdbm_unlock(apr_sdbm_t *db);\n\n/**\n * Fetch an sdbm record value by key\n * @param db The database \n * @param value The value datum retrieved for this record\n * @param key The key datum to find this record\n */\nAPU_DECLARE(apr_status_t) apr_sdbm_fetch(apr_sdbm_t *db, \n                                         apr_sdbm_datum_t *value, \n                                         apr_sdbm_datum_t key);\n\n/**\n * Store an sdbm record value by key\n * @param db The database \n * @param key The key datum to store this record by\n * @param value The value datum to store in this record\n * @param opt The method used to store the record\n * <PRE>\n *           APR_SDBM_INSERT     return an error if the record exists\n *           APR_SDBM_REPLACE    overwrite any existing record for key\n * </PRE>\n */\nAPU_DECLARE(apr_status_t) apr_sdbm_store(apr_sdbm_t *db, apr_sdbm_datum_t key,\n                                         apr_sdbm_datum_t value, int opt);\n\n/**\n * Delete an sdbm record value by key\n * @param db The database \n * @param key The key datum of the record to delete\n * @remark It is not an error to delete a non-existent record.\n */\nAPU_DECLARE(apr_status_t) apr_sdbm_delete(apr_sdbm_t *db, \n                                          const apr_sdbm_datum_t key);\n\n/**\n * Retrieve the first record key from a dbm\n * @param db The database \n * @param key The key datum of the first record\n * @remark The keys returned are not ordered.  To traverse the list of keys\n * for an sdbm opened with APR_SHARELOCK, the caller must use apr_sdbm_lock\n * prior to retrieving the first record, and hold the lock until after the\n * last call to apr_sdbm_nextkey.\n */\nAPU_DECLARE(apr_status_t) apr_sdbm_firstkey(apr_sdbm_t *db, apr_sdbm_datum_t *key);\n\n/**\n * Retrieve the next record key from an sdbm\n * @param db The database \n * @param key The key datum of the next record\n */\nAPU_DECLARE(apr_status_t) apr_sdbm_nextkey(apr_sdbm_t *db, apr_sdbm_datum_t *key);\n\n/**\n * Returns true if the sdbm database opened for read-only access\n * @param db The database to test\n */\nAPU_DECLARE(int) apr_sdbm_rdonly(apr_sdbm_t *db);\n/** @} */\n#endif /* APR_SDBM_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_sha1.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* NIST Secure Hash Algorithm\n * \theavily modified by Uwe Hollerbach uh@alumni.caltech edu\n * \tfrom Peter C. Gutmann's implementation as found in\n * \tApplied Cryptography by Bruce Schneier\n * \tThis code is hereby placed in the public domain\n */\n\n#ifndef APR_SHA1_H\n#define APR_SHA1_H\n\n#include \"apu.h\"\n#include \"apr_general.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @file apr_sha1.h\n * @brief APR-UTIL SHA1 library\n */\n\n/** size of the SHA1 DIGEST */\n#define APR_SHA1_DIGESTSIZE 20\n\n/**\n * Define the Magic String prefix that identifies a password as being\n * hashed using our algorithm.\n */\n#define APR_SHA1PW_ID \"{SHA}\"\n\n/** length of the SHA Password */\n#define APR_SHA1PW_IDLEN 5\n\n/** @see apr_sha1_ctx_t */\ntypedef struct apr_sha1_ctx_t apr_sha1_ctx_t;\n\n/** \n * SHA1 context structure\n */\nstruct apr_sha1_ctx_t {\n    /** message digest */\n    apr_uint32_t digest[5];\n    /** 64-bit bit counts */\n    apr_uint32_t count_lo, count_hi;\n    /** SHA data buffer */\n    apr_uint32_t data[16];\n    /** unprocessed amount in data */\n    int local;\n};\n\n/**\n * Provide a means to SHA1 crypt/encode a plaintext password in a way which\n * makes password file compatible with those commonly use in netscape web\n * and ldap installations.\n * @param clear The plaintext password\n * @param len The length of the plaintext password\n * @param out The encrypted/encoded password\n * @note SHA1 support is useful for migration purposes, but is less\n *     secure than Apache's password format, since Apache's (MD5)\n *     password format uses a random eight character salt to generate\n *     one of many possible hashes for the same password.  Netscape\n *     uses plain SHA1 without a salt, so the same password\n *     will always generate the same hash, making it easier\n *     to break since the search space is smaller.\n */\nAPU_DECLARE(void) apr_sha1_base64(const char *clear, int len, char *out);\n\n/**\n * Initialize the SHA digest\n * @param context The SHA context to initialize\n */\nAPU_DECLARE(void) apr_sha1_init(apr_sha1_ctx_t *context);\n\n/**\n * Update the SHA digest\n * @param context The SHA1 context to update\n * @param input The buffer to add to the SHA digest\n * @param inputLen The length of the input buffer\n */\nAPU_DECLARE(void) apr_sha1_update(apr_sha1_ctx_t *context, const char *input,\n                                unsigned int inputLen);\n\n/**\n * Update the SHA digest with binary data\n * @param context The SHA1 context to update\n * @param input The buffer to add to the SHA digest\n * @param inputLen The length of the input buffer\n */\nAPU_DECLARE(void) apr_sha1_update_binary(apr_sha1_ctx_t *context,\n                                       const unsigned char *input,\n                                       unsigned int inputLen);\n\n/**\n * Finish computing the SHA digest\n * @param digest the output buffer in which to store the digest\n * @param context The context to finalize\n */\nAPU_DECLARE(void) apr_sha1_final(unsigned char digest[APR_SHA1_DIGESTSIZE],\n                               apr_sha1_ctx_t *context);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\t/* APR_SHA1_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_strmatch.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_STRMATCH_H\n#define APR_STRMATCH_H\n/**\n * @file apr_strmatch.h\n * @brief APR-UTIL string matching routines\n */\n\n#include \"apu.h\"\n#include \"apr_pools.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @defgroup APR_Util_StrMatch String matching routines\n * @ingroup APR_Util\n * @{\n */\n\n/** @see apr_strmatch_pattern */\ntypedef struct apr_strmatch_pattern apr_strmatch_pattern;\n\n/**\n * Precompiled search pattern\n */\nstruct apr_strmatch_pattern {\n    /** Function called to compare */\n    const char *(*compare)(const apr_strmatch_pattern *this_pattern,\n                           const char *s, apr_size_t slen);\n    const char *pattern;    /**< Current pattern */\n    apr_size_t length;      /**< Current length */\n    void *context;          /**< hook to add precomputed metadata */\n};\n\n#if defined(DOXYGEN)\n/**\n * Search for a precompiled pattern within a string\n * @param pattern The pattern\n * @param s The string in which to search for the pattern\n * @param slen The length of s (excluding null terminator)\n * @return A pointer to the first instance of the pattern in s, or\n *         NULL if not found\n */\nAPU_DECLARE(const char *) apr_strmatch(const apr_strmatch_pattern *pattern,\n                                       const char *s, apr_size_t slen);\n#else\n#define apr_strmatch(pattern, s, slen) (*((pattern)->compare))((pattern), (s), (slen))\n#endif\n\n/**\n * Precompile a pattern for matching using the Boyer-Moore-Horspool algorithm\n * @param p The pool from which to allocate the pattern\n * @param s The pattern string\n * @param case_sensitive Whether the matching should be case-sensitive\n * @return a pointer to the compiled pattern, or NULL if compilation fails\n */\nAPU_DECLARE(const apr_strmatch_pattern *) apr_strmatch_precompile(apr_pool_t *p, const char *s, int case_sensitive);\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif\t/* !APR_STRMATCH_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_thread_pool.h",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed\n * with this work for additional information regarding copyright\n * ownership.  The ASF licenses this file to you under the Apache\n * License, Version 2.0 (the \"License\"); you may not use this file\n * except in compliance with the License.  You may obtain a copy of\n * the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n * implied.  See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n#ifndef APU_THREAD_POOL_H\n#define APU_THREAD_POOL_H\n\n#include \"apu.h\"\n#include \"apr_thread_proc.h\"\n\n/**\n * @file apr_thread_pool.h\n * @brief APR Thread Pool Library\n\n * @remarks This library implements a thread pool using apr_thread_t. A thread\n * pool is a set of threads that can be created in advance or on demand until a\n * maximum number. When a task is scheduled, the thread pool will find an idle\n * thread to handle the task. In case all existing threads are busy and the\n * number of tasks in the queue is higher than the adjustable threshold, the\n * pool will try to create a new thread to serve the task if the maximum number\n * has not been reached. Otherwise, the task will be put into a queue based on\n * priority, which can be valued from 0 to 255, with higher values being served\n * first. If there are tasks with the same priority, the new task might be put at\n * the top or at the bottom - it depends on which function is used to put the task.\n *\n * @remarks There may be the case where the thread pool can use up to the maximum\n * number of threads at peak load, but having those threads idle afterwards. A\n * maximum number of idle threads can be set so that the extra idling threads will\n * be terminated to save system resources.\n */\n#if APR_HAS_THREADS\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup APR_Util_TP Thread Pool routines\n * @ingroup APR_Util\n * @{\n */\n\n/** Opaque Thread Pool structure. */\ntypedef struct apr_thread_pool apr_thread_pool_t;\n\n#define APR_THREAD_TASK_PRIORITY_LOWEST 0\n#define APR_THREAD_TASK_PRIORITY_LOW 63\n#define APR_THREAD_TASK_PRIORITY_NORMAL 127\n#define APR_THREAD_TASK_PRIORITY_HIGH 191\n#define APR_THREAD_TASK_PRIORITY_HIGHEST 255\n\n/**\n * Create a thread pool\n * @param me The pointer in which to return the newly created apr_thread_pool\n * object, or NULL if thread pool creation fails.\n * @param init_threads The number of threads to be created initially, this number\n * will also be used as the initial value for the maximum number of idle threads.\n * @param max_threads The maximum number of threads that can be created\n * @param pool The pool to use\n * @return APR_SUCCESS if the thread pool was created successfully. Otherwise,\n * the error code.\n */\nAPU_DECLARE(apr_status_t) apr_thread_pool_create(apr_thread_pool_t **me,\n                                                 apr_size_t init_threads,\n                                                 apr_size_t max_threads,\n                                                 apr_pool_t *pool);\n\n/**\n * Destroy the thread pool and stop all the threads\n * @return APR_SUCCESS if all threads are stopped.\n */\nAPU_DECLARE(apr_status_t) apr_thread_pool_destroy(apr_thread_pool_t *me);\n\n/**\n * Schedule a task to the bottom of the tasks of same priority.\n * @param me The thread pool\n * @param func The task function\n * @param param The parameter for the task function\n * @param priority The priority of the task.\n * @param owner Owner of this task.\n * @return APR_SUCCESS if the task had been scheduled successfully\n */\nAPU_DECLARE(apr_status_t) apr_thread_pool_push(apr_thread_pool_t *me,\n                                               apr_thread_start_t func,\n                                               void *param,\n                                               apr_byte_t priority,\n                                               void *owner);\n/**\n * Schedule a task to be run after a delay\n * @param me The thread pool\n * @param func The task function\n * @param param The parameter for the task function\n * @param time Time in microseconds\n * @param owner Owner of this task.\n * @return APR_SUCCESS if the task had been scheduled successfully\n */\nAPU_DECLARE(apr_status_t) apr_thread_pool_schedule(apr_thread_pool_t *me,\n                                                   apr_thread_start_t func,\n                                                   void *param,\n                                                   apr_interval_time_t time,\n                                                   void *owner);\n\n/**\n * Schedule a task to the top of the tasks of same priority.\n * @param me The thread pool\n * @param func The task function\n * @param param The parameter for the task function\n * @param priority The priority of the task.\n * @param owner Owner of this task.\n * @return APR_SUCCESS if the task had been scheduled successfully\n */\nAPU_DECLARE(apr_status_t) apr_thread_pool_top(apr_thread_pool_t *me,\n                                              apr_thread_start_t func,\n                                              void *param,\n                                              apr_byte_t priority,\n                                              void *owner);\n\n/**\n * Cancel tasks submitted by the owner. If there is any task from the owner that\n * is currently running, the function will spin until the task finished.\n * @param me The thread pool\n * @param owner Owner of the task\n * @return APR_SUCCESS if the task has been cancelled successfully\n * @note The task function should not be calling cancel, otherwise the function\n * may get stuck forever. The function assert if it detect such a case.\n */\nAPU_DECLARE(apr_status_t) apr_thread_pool_tasks_cancel(apr_thread_pool_t *me,\n                                                       void *owner);\n\n/**\n * Get the current number of tasks waiting in the queue\n * @param me The thread pool\n * @return Number of tasks in the queue\n */\nAPU_DECLARE(apr_size_t) apr_thread_pool_tasks_count(apr_thread_pool_t *me);\n\n/**\n * Get the current number of scheduled tasks waiting in the queue\n * @param me The thread pool\n * @return Number of scheduled tasks in the queue\n */\nAPU_DECLARE(apr_size_t) apr_thread_pool_scheduled_tasks_count(apr_thread_pool_t *me);\n\n/**\n * Get the current number of threads\n * @param me The thread pool\n * @return Total number of threads\n */\nAPU_DECLARE(apr_size_t) apr_thread_pool_threads_count(apr_thread_pool_t *me);\n\n/**\n * Get the current number of busy threads\n * @param me The thread pool\n * @return Number of busy threads\n */\nAPU_DECLARE(apr_size_t) apr_thread_pool_busy_count(apr_thread_pool_t *me);\n\n/**\n * Get the current number of idle threads\n * @param me The thread pool\n * @return Number of idle threads\n */\nAPU_DECLARE(apr_size_t) apr_thread_pool_idle_count(apr_thread_pool_t *me);\n\n/**\n * Access function for the maximum number of idle threads. Number of current\n * idle threads will be reduced to the new limit.\n * @param me The thread pool\n * @param cnt The number\n * @return The number of threads that were stopped.\n */\nAPU_DECLARE(apr_size_t) apr_thread_pool_idle_max_set(apr_thread_pool_t *me,\n                                                     apr_size_t cnt);\n\n/**\n * Get number of tasks that have run\n * @param me The thread pool\n * @return Number of tasks that have run\n */\nAPU_DECLARE(apr_size_t)\n    apr_thread_pool_tasks_run_count(apr_thread_pool_t * me);\n\n/**\n * Get high water mark of the number of tasks waiting to run\n * @param me The thread pool\n * @return High water mark of tasks waiting to run\n */\nAPU_DECLARE(apr_size_t)\n    apr_thread_pool_tasks_high_count(apr_thread_pool_t * me);\n\n/**\n * Get high water mark of the number of threads\n * @param me The thread pool\n * @return High water mark of threads in thread pool\n */\nAPU_DECLARE(apr_size_t)\n    apr_thread_pool_threads_high_count(apr_thread_pool_t * me);\n\n/**\n * Get the number of idle threads that were destroyed after timing out\n * @param me The thread pool\n * @return Number of idle threads that timed out\n */\nAPU_DECLARE(apr_size_t)\n    apr_thread_pool_threads_idle_timeout_count(apr_thread_pool_t * me);\n\n/**\n * Access function for the maximum number of idle threads\n * @param me The thread pool\n * @return The current maximum number\n */\nAPU_DECLARE(apr_size_t) apr_thread_pool_idle_max_get(apr_thread_pool_t *me);\n\n/**\n * Access function for the maximum number of threads.\n * @param me The thread pool\n * @param cnt Number of threads\n * @return The original maximum number of threads\n */\nAPU_DECLARE(apr_size_t) apr_thread_pool_thread_max_set(apr_thread_pool_t *me,\n                                                       apr_size_t cnt);\n\n/**\n * Access function for the maximum wait time (in microseconds) of an\n * idling thread that exceeds the maximum number of idling threads.\n * A non-zero value allows for the reaping of idling threads to shrink\n * over time.  Which helps reduce thrashing.\n * @param me The thread pool\n * @param timeout The number of microseconds an idle thread should wait\n * till it reaps itself\n * @return The original maximum wait time\n */\nAPU_DECLARE(apr_interval_time_t)\n    apr_thread_pool_idle_wait_set(apr_thread_pool_t * me,\n                                  apr_interval_time_t timeout);\n\n/**\n * Access function for the maximum wait time (in microseconds) of an\n * idling thread that exceeds the maximum number of idling threads\n * @param me The thread pool\n * @return The current maximum wait time\n */\nAPU_DECLARE(apr_interval_time_t)\n    apr_thread_pool_idle_wait_get(apr_thread_pool_t * me);\n\n/**\n * Access function for the maximum number of threads\n * @param me The thread pool\n * @return The current maximum number\n */\nAPU_DECLARE(apr_size_t) apr_thread_pool_thread_max_get(apr_thread_pool_t *me);\n\n/**\n * Access function for the threshold of tasks in queue to trigger a new thread.\n * @param me The thread pool\n * @param cnt The new threshold\n * @return The original threshold\n */\nAPU_DECLARE(apr_size_t) apr_thread_pool_threshold_set(apr_thread_pool_t *me,\n                                                      apr_size_t val);\n\n/**\n * Access function for the threshold of tasks in queue to trigger a new thread.\n * @param me The thread pool\n * @return The current threshold\n */\nAPU_DECLARE(apr_size_t) apr_thread_pool_threshold_get(apr_thread_pool_t * me);\n\n/**\n * Get owner of the task currently been executed by the thread.\n * @param thd The thread is executing a task\n * @param owner Pointer to receive owner of the task.\n * @return APR_SUCCESS if the owner is retrieved successfully\n */\nAPU_DECLARE(apr_status_t) apr_thread_pool_task_owner_get(apr_thread_t *thd,\n                                                         void **owner);\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* APR_HAS_THREADS */\n#endif /* !APR_THREAD_POOL_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_uri.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * apr_uri.h: External Interface of apr_uri.c\n */\n\n/**\n * @file apr_uri.h\n * @brief APR-UTIL URI Routines\n */\n\n#ifndef APR_URI_H\n#define APR_URI_H\n\n#include \"apu.h\"\n\n#include \"apr_network_io.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @defgroup APR_Util_URI URI\n * @ingroup APR_Util\n * @{\n */\n\n#define APR_URI_FTP_DEFAULT_PORT         21 /**< default FTP port */\n#define APR_URI_SSH_DEFAULT_PORT         22 /**< default SSH port */\n#define APR_URI_TELNET_DEFAULT_PORT      23 /**< default telnet port */\n#define APR_URI_GOPHER_DEFAULT_PORT      70 /**< default Gopher port */\n#define APR_URI_HTTP_DEFAULT_PORT        80 /**< default HTTP port */\n#define APR_URI_POP_DEFAULT_PORT        110 /**< default POP port */\n#define APR_URI_NNTP_DEFAULT_PORT       119 /**< default NNTP port */\n#define APR_URI_IMAP_DEFAULT_PORT       143 /**< default IMAP port */\n#define APR_URI_PROSPERO_DEFAULT_PORT   191 /**< default Prospero port */\n#define APR_URI_WAIS_DEFAULT_PORT       210 /**< default WAIS port */\n#define APR_URI_LDAP_DEFAULT_PORT       389 /**< default LDAP port */\n#define APR_URI_HTTPS_DEFAULT_PORT      443 /**< default HTTPS port */\n#define APR_URI_RTSP_DEFAULT_PORT       554 /**< default RTSP port */\n#define APR_URI_SNEWS_DEFAULT_PORT      563 /**< default SNEWS port */\n#define APR_URI_ACAP_DEFAULT_PORT       674 /**< default ACAP port */\n#define APR_URI_NFS_DEFAULT_PORT       2049 /**< default NFS port */\n#define APR_URI_TIP_DEFAULT_PORT       3372 /**< default TIP port */\n#define APR_URI_SIP_DEFAULT_PORT       5060 /**< default SIP port */\n\n/** Flags passed to unparse_uri_components(): */\n/** suppress \"scheme://user\\@site:port\" */\n#define APR_URI_UNP_OMITSITEPART    (1U<<0)\n/** Just omit user */\n#define APR_URI_UNP_OMITUSER        (1U<<1)\n/** Just omit password */\n#define APR_URI_UNP_OMITPASSWORD    (1U<<2)\n/** omit \"user:password\\@\" part */\n#define APR_URI_UNP_OMITUSERINFO    (APR_URI_UNP_OMITUSER | \\\n                                     APR_URI_UNP_OMITPASSWORD)\n/** Show plain text password (default: show XXXXXXXX) */\n#define APR_URI_UNP_REVEALPASSWORD  (1U<<3)\n/** Show \"scheme://user\\@site:port\" only */\n#define APR_URI_UNP_OMITPATHINFO    (1U<<4)\n/** Omit the \"?queryarg\" from the path */\n#define APR_URI_UNP_OMITQUERY       (1U<<5)\n\n/** @see apr_uri_t */\ntypedef struct apr_uri_t apr_uri_t;\n\n/**\n * A structure to encompass all of the fields in a uri\n */\nstruct apr_uri_t {\n    /** scheme (\"http\"/\"ftp\"/...) */\n    char *scheme;\n    /** combined [user[:password]\\@]host[:port] */\n    char *hostinfo;\n    /** user name, as in http://user:passwd\\@host:port/ */\n    char *user;\n    /** password, as in http://user:passwd\\@host:port/ */\n    char *password;\n    /** hostname from URI (or from Host: header) */\n    char *hostname;\n    /** port string (integer representation is in \"port\") */\n    char *port_str;\n    /** the request path (or NULL if only scheme://host was given) */\n    char *path;\n    /** Everything after a '?' in the path, if present */\n    char *query;\n    /** Trailing \"#fragment\" string, if present */\n    char *fragment;\n\n    /** structure returned from gethostbyname() */\n    struct hostent *hostent;\n\n    /** The port number, numeric, valid only if port_str != NULL */\n    apr_port_t port;\n    \n    /** has the structure been initialized */\n    unsigned is_initialized:1;\n\n    /** has the DNS been looked up yet */\n    unsigned dns_looked_up:1;\n    /** has the dns been resolved yet */\n    unsigned dns_resolved:1;\n};\n\n/* apr_uri.c */\n/**\n * Return the default port for a given scheme.  The schemes recognized are\n * http, ftp, https, gopher, wais, nntp, snews, and prospero\n * @param scheme_str The string that contains the current scheme\n * @return The default port for this scheme\n */ \nAPU_DECLARE(apr_port_t) apr_uri_port_of_scheme(const char *scheme_str);\n\n/**\n * Unparse a apr_uri_t structure to an URI string.  Optionally \n * suppress the password for security reasons.\n * @param p The pool to allocate out of\n * @param uptr All of the parts of the uri\n * @param flags How to unparse the uri.  One of:\n * <PRE>\n *    APR_URI_UNP_OMITSITEPART        Suppress \"scheme://user\\@site:port\" \n *    APR_URI_UNP_OMITUSER            Just omit user \n *    APR_URI_UNP_OMITPASSWORD        Just omit password \n *    APR_URI_UNP_OMITUSERINFO        Omit \"user:password\\@\" part\n *    APR_URI_UNP_REVEALPASSWORD      Show plain text password (default: show XXXXXXXX)\n *    APR_URI_UNP_OMITPATHINFO        Show \"scheme://user\\@site:port\" only \n *    APR_URI_UNP_OMITQUERY           Omit \"?queryarg\" or \"#fragment\" \n * </PRE>\n * @return The uri as a string\n */\nAPU_DECLARE(char *) apr_uri_unparse(apr_pool_t *p, \n                                    const apr_uri_t *uptr,\n                                    unsigned flags);\n\n/**\n * Parse a given URI, fill in all supplied fields of a apr_uri_t\n * structure. This eliminates the necessity of extracting host, port,\n * path, query info repeatedly in the modules.\n * @param p The pool to allocate out of\n * @param uri The uri to parse\n * @param uptr The apr_uri_t to fill out\n * @return APR_SUCCESS for success or error code\n */\nAPU_DECLARE(apr_status_t) apr_uri_parse(apr_pool_t *p, const char *uri, \n                                        apr_uri_t *uptr);\n\n/**\n * Special case for CONNECT parsing: it comes with the hostinfo part only\n * @param p The pool to allocate out of\n * @param hostinfo The hostinfo string to parse\n * @param uptr The apr_uri_t to fill out\n * @return APR_SUCCESS for success or error code\n */\nAPU_DECLARE(apr_status_t) apr_uri_parse_hostinfo(apr_pool_t *p, \n                                                 const char *hostinfo, \n                                                 apr_uri_t *uptr);\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* APR_URI_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_uuid.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @file apr_uuid.h\n * @brief APR UUID library\n */\n#ifndef APR_UUID_H\n#define APR_UUID_H\n\n#include \"apu.h\"\n#include \"apr_errno.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup APR_UUID UUID Handling\n * @ingroup APR\n * @{\n */\n\n/**\n * we represent a UUID as a block of 16 bytes.\n */\n\ntypedef struct {\n    unsigned char data[16]; /**< the actual UUID */\n} apr_uuid_t;\n\n/** UUIDs are formatted as: 00112233-4455-6677-8899-AABBCCDDEEFF */\n#define APR_UUID_FORMATTED_LENGTH 36\n\n\n/**\n * Generate and return a (new) UUID\n * @param uuid The resulting UUID\n */ \nAPU_DECLARE(void) apr_uuid_get(apr_uuid_t *uuid);\n\n/**\n * Format a UUID into a string, following the standard format\n * @param buffer The buffer to place the formatted UUID string into. It must\n *               be at least APR_UUID_FORMATTED_LENGTH + 1 bytes long to hold\n *               the formatted UUID and a null terminator\n * @param uuid The UUID to format\n */ \nAPU_DECLARE(void) apr_uuid_format(char *buffer, const apr_uuid_t *uuid);\n\n/**\n * Parse a standard-format string into a UUID\n * @param uuid The resulting UUID\n * @param uuid_str The formatted UUID\n */ \nAPU_DECLARE(apr_status_t) apr_uuid_parse(apr_uuid_t *uuid, const char *uuid_str);\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* APR_UUID_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_xlate.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_XLATE_H\n#define APR_XLATE_H\n\n#include \"apu.h\"\n#include \"apr_pools.h\"\n#include \"apr_errno.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @file apr_xlate.h\n * @brief APR I18N translation library\n */\n\n/**\n * @defgroup APR_XLATE I18N translation library\n * @ingroup APR\n * @{\n */\n/** Opaque translation buffer */\ntypedef struct apr_xlate_t            apr_xlate_t;\n\n/**\n * Set up for converting text from one charset to another.\n * @param convset The handle to be filled in by this function\n * @param topage The name of the target charset\n * @param frompage The name of the source charset\n * @param pool The pool to use\n * @remark\n *  Specify APR_DEFAULT_CHARSET for one of the charset\n *  names to indicate the charset of the source code at\n *  compile time.  This is useful if there are literal\n *  strings in the source code which must be translated\n *  according to the charset of the source code.\n *  APR_DEFAULT_CHARSET is not useful if the source code\n *  of the caller was not encoded in the same charset as\n *  APR at compile time.\n *\n * @remark\n *  Specify APR_LOCALE_CHARSET for one of the charset\n *  names to indicate the charset of the current locale.\n *\n * @remark\n *  Return APR_EINVAL if unable to procure a convset, or APR_ENOTIMPL\n *  if charset transcoding is not available in this instance of\n *  apr-util at all (i.e., APR_HAS_XLATE is undefined).\n */\nAPU_DECLARE(apr_status_t) apr_xlate_open(apr_xlate_t **convset, \n                                         const char *topage, \n                                         const char *frompage, \n                                         apr_pool_t *pool);\n\n/** \n * This is to indicate the charset of the sourcecode at compile time\n * names to indicate the charset of the source code at\n * compile time.  This is useful if there are literal\n * strings in the source code which must be translated\n * according to the charset of the source code.\n */\n#define APR_DEFAULT_CHARSET (const char *)0\n/**\n * To indicate charset names of the current locale \n */\n#define APR_LOCALE_CHARSET (const char *)1\n\n/**\n * Find out whether or not the specified conversion is single-byte-only.\n * @param convset The handle allocated by apr_xlate_open, specifying the \n *                parameters of conversion\n * @param onoff Output: whether or not the conversion is single-byte-only\n * @remark\n *  Return APR_ENOTIMPL if charset transcoding is not available\n *  in this instance of apr-util (i.e., APR_HAS_XLATE is undefined).\n */\nAPU_DECLARE(apr_status_t) apr_xlate_sb_get(apr_xlate_t *convset, int *onoff);\n\n/**\n * Convert a buffer of text from one codepage to another.\n * @param convset The handle allocated by apr_xlate_open, specifying \n *                the parameters of conversion\n * @param inbuf The address of the source buffer\n * @param inbytes_left Input: the amount of input data to be translated\n *                     Output: the amount of input data not yet translated    \n * @param outbuf The address of the destination buffer\n * @param outbytes_left Input: the size of the output buffer\n *                      Output: the amount of the output buffer not yet used\n * @remark\n * Returns APR_ENOTIMPL if charset transcoding is not available\n * in this instance of apr-util (i.e., APR_HAS_XLATE is undefined).\n * Returns APR_INCOMPLETE if the input buffer ends in an incomplete\n * multi-byte character.\n *\n * To correctly terminate the output buffer for some multi-byte\n * character set encodings, a final call must be made to this function\n * after the complete input string has been converted, passing\n * the inbuf and inbytes_left parameters as NULL.  (Note that this\n * mode only works from version 1.1.0 onwards)\n */\nAPU_DECLARE(apr_status_t) apr_xlate_conv_buffer(apr_xlate_t *convset, \n                                                const char *inbuf, \n                                                apr_size_t *inbytes_left, \n                                                char *outbuf,\n                                                apr_size_t *outbytes_left);\n\n/* @see apr_file_io.h the comment in apr_file_io.h about this hack */\n#ifdef APR_NOT_DONE_YET\n/**\n * The purpose of apr_xlate_conv_char is to translate one character\n * at a time.  This needs to be written carefully so that it works\n * with double-byte character sets. \n * @param convset The handle allocated by apr_xlate_open, specifying the\n *                parameters of conversion\n * @param inchar The character to convert\n * @param outchar The converted character\n */\nAPU_DECLARE(apr_status_t) apr_xlate_conv_char(apr_xlate_t *convset, \n                                              char inchar, char outchar);\n#endif\n\n/**\n * Convert a single-byte character from one charset to another.\n * @param convset The handle allocated by apr_xlate_open, specifying the \n *                parameters of conversion\n * @param inchar The single-byte character to convert.\n * @warning This only works when converting between single-byte character sets.\n *          -1 will be returned if the conversion can't be performed.\n */\nAPU_DECLARE(apr_int32_t) apr_xlate_conv_byte(apr_xlate_t *convset, \n                                             unsigned char inchar);\n\n/**\n * Close a codepage translation handle.\n * @param convset The codepage translation handle to close\n * @remark\n *  Return APR_ENOTIMPL if charset transcoding is not available\n *  in this instance of apr-util (i.e., APR_HAS_XLATE is undefined).\n */\nAPU_DECLARE(apr_status_t) apr_xlate_close(apr_xlate_t *convset);\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APR_XLATE_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apr_xml.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file apr_xml.h\n * @brief APR-UTIL XML Library\n */\n#ifndef APR_XML_H\n#define APR_XML_H\n\n/**\n * @defgroup APR_Util_XML XML \n * @ingroup APR_Util\n * @{\n */\n#include \"apr_pools.h\"\n#include \"apr_tables.h\"\n#include \"apr_file_io.h\"\n\n#include \"apu.h\"\n#if APR_CHARSET_EBCDIC\n#include \"apr_xlate.h\"\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @package Apache XML library\n */\n\n/* -------------------------------------------------------------------- */\n\n/* ### these will need to move at some point to a more logical spot */\n\n/** @see apr_text */\ntypedef struct apr_text apr_text;\n\n/** Structure to keep a linked list of pieces of text */\nstruct apr_text {\n    /** The current piece of text */\n    const char *text;\n    /** a pointer to the next piece of text */\n    struct apr_text *next;\n};\n\n/** @see apr_text_header */\ntypedef struct apr_text_header apr_text_header;\n\n/** A list of pieces of text */\nstruct apr_text_header {\n    /** The first piece of text in the list */\n    apr_text *first;\n    /** The last piece of text in the list */\n    apr_text *last;\n};\n\n/**\n * Append a piece of text to the end of a list\n * @param p The pool to allocate out of\n * @param hdr The text header to append to\n * @param text The new text to append\n */\nAPU_DECLARE(void) apr_text_append(apr_pool_t *p, apr_text_header *hdr,\n                                  const char *text);\n\n\n/* --------------------------------------------------------------------\n**\n** XML PARSING\n*/\n\n/*\n** Qualified namespace values\n**\n** APR_XML_NS_DAV_ID\n**    We always insert the \"DAV:\" namespace URI at the head of the\n**    namespace array. This means that it will always be at ID==0,\n**    making it much easier to test for.\n**\n** APR_XML_NS_NONE\n**    This special ID is used for two situations:\n**\n**    1) The namespace prefix begins with \"xml\" (and we do not know\n**       what it means). Namespace prefixes with \"xml\" (any case) as\n**       their first three characters are reserved by the XML Namespaces\n**       specification for future use. mod_dav will pass these through\n**       unchanged. When this identifier is used, the prefix is LEFT in\n**       the element/attribute name. Downstream processing should not\n**       prepend another prefix.\n**\n**    2) The element/attribute does not have a namespace.\n**\n**       a) No prefix was used, and a default namespace has not been\n**          defined.\n**       b) No prefix was used, and the default namespace was specified\n**          to mean \"no namespace\". This is done with a namespace\n**          declaration of:  xmlns=\"\"\n**          (this declaration is typically used to override a previous\n**          specification for the default namespace)\n**\n**       In these cases, we need to record that the elem/attr has no\n**       namespace so that we will not attempt to prepend a prefix.\n**       All namespaces that are used will have a prefix assigned to\n**       them -- mod_dav will never set or use the default namespace\n**       when generating XML. This means that \"no prefix\" will always\n**       mean \"no namespace\".\n**\n**    In both cases, the XML generation will avoid prepending a prefix.\n**    For the first case, this means the original prefix/name will be\n**    inserted into the output stream. For the latter case, it means\n**    the name will have no prefix, and since we never define a default\n**    namespace, this means it will have no namespace.\n**\n** Note: currently, mod_dav understands the \"xmlns\" prefix and the\n**     \"xml:lang\" attribute. These are handled specially (they aren't\n**     left within the XML tree), so the APR_XML_NS_NONE value won't ever\n**     really apply to these values.\n*/\n#define APR_XML_NS_DAV_ID\t0\t/**< namespace ID for \"DAV:\" */\n#define APR_XML_NS_NONE\t\t-10\t/**< no namespace for this elem/attr */\n\n#define APR_XML_NS_ERROR_BASE\t-100\t/**< used only during processing */\n/** Is this namespace an error? */\n#define APR_XML_NS_IS_ERROR(e)\t((e) <= APR_XML_NS_ERROR_BASE)\n\n/** @see apr_xml_attr */\ntypedef struct apr_xml_attr apr_xml_attr;\n/** @see apr_xml_elem */\ntypedef struct apr_xml_elem apr_xml_elem;\n/** @see apr_xml_doc */\ntypedef struct apr_xml_doc apr_xml_doc;\n\n/** apr_xml_attr: holds a parsed XML attribute */\nstruct apr_xml_attr {\n    /** attribute name */\n    const char *name;\n    /** index into namespace array */\n    int ns;\n\n    /** attribute value */\n    const char *value;\n\n    /** next attribute */\n    struct apr_xml_attr *next;\n};\n\n/** apr_xml_elem: holds a parsed XML element */\nstruct apr_xml_elem {\n    /** element name */\n    const char *name;\n    /** index into namespace array */\n    int ns;\n    /** xml:lang for attrs/contents */\n    const char *lang;\n\n    /** cdata right after start tag */\n    apr_text_header first_cdata;\n    /** cdata after MY end tag */\n    apr_text_header following_cdata;\n\n    /** parent element */\n    struct apr_xml_elem *parent;\t\n    /** next (sibling) element */\n    struct apr_xml_elem *next;\t\n    /** first child element */\n    struct apr_xml_elem *first_child;\n    /** first attribute */\n    struct apr_xml_attr *attr;\t\t\n\n    /* used only during parsing */\n    /** last child element */\n    struct apr_xml_elem *last_child;\n    /** namespaces scoped by this elem */\n    struct apr_xml_ns_scope *ns_scope;\n\n    /* used by modules during request processing */\n    /** Place for modules to store private data */\n    void *priv;\n};\n\n/** Is this XML element empty? */\n#define APR_XML_ELEM_IS_EMPTY(e) ((e)->first_child == NULL && \\\n                                  (e)->first_cdata.first == NULL)\n\n/** apr_xml_doc: holds a parsed XML document */\nstruct apr_xml_doc {\n    /** root element */\n    apr_xml_elem *root;\t\n    /** array of namespaces used */\n    apr_array_header_t *namespaces;\n};\n\n/** Opaque XML parser structure */\ntypedef struct apr_xml_parser apr_xml_parser;\n\n/**\n * Create an XML parser\n * @param pool The pool for allocating the parser and the parse results.\n * @return The new parser.\n */\nAPU_DECLARE(apr_xml_parser *) apr_xml_parser_create(apr_pool_t *pool);\n\n/**\n * Parse a File, producing a xml_doc\n * @param p      The pool for allocating the parse results.\n * @param parser A pointer to *parser (needed so calling function can get\n *               errors), will be set to NULL on successful completion.\n * @param ppdoc  A pointer to *apr_xml_doc (which has the parsed results in it)\n * @param xmlfd  A file to read from.\n * @param buffer_length Buffer length which would be suitable \n * @return Any errors found during parsing.\n */\nAPU_DECLARE(apr_status_t) apr_xml_parse_file(apr_pool_t *p,\n                                             apr_xml_parser **parser,\n                                             apr_xml_doc **ppdoc,\n                                             apr_file_t *xmlfd,\n                                             apr_size_t buffer_length);\n\n\n/**\n * Feed input into the parser\n * @param parser The XML parser for parsing this data.\n * @param data The data to parse.\n * @param len The length of the data.\n * @return Any errors found during parsing.\n * @remark Use apr_xml_parser_geterror() to get more error information.\n */\nAPU_DECLARE(apr_status_t) apr_xml_parser_feed(apr_xml_parser *parser,\n                                              const char *data,\n                                              apr_size_t len);\n\n/**\n * Terminate the parsing and return the result\n * @param parser The XML parser for parsing this data.\n * @param pdoc The resulting parse information. May be NULL to simply\n *             terminate the parsing without fetching the info.\n * @return Any errors found during the final stage of parsing.\n * @remark Use apr_xml_parser_geterror() to get more error information.\n */\nAPU_DECLARE(apr_status_t) apr_xml_parser_done(apr_xml_parser *parser,\n                                              apr_xml_doc **pdoc);\n\n/**\n * Fetch additional error information from the parser.\n * @param parser The XML parser to query for errors.\n * @param errbuf A buffer for storing error text.\n * @param errbufsize The length of the error text buffer.\n * @return The error buffer\n */\nAPU_DECLARE(char *) apr_xml_parser_geterror(apr_xml_parser *parser,\n                                            char *errbuf,\n                                            apr_size_t errbufsize);\n\n\n/**\n * Converts an XML element tree to flat text \n * @param p The pool to allocate out of\n * @param elem The XML element to convert\n * @param style How to covert the XML.  One of:\n * <PRE>\n *     APR_XML_X2T_FULL                start tag, contents, end tag \n *     APR_XML_X2T_INNER               contents only \n *     APR_XML_X2T_LANG_INNER          xml:lang + inner contents \n *     APR_XML_X2T_FULL_NS_LANG        FULL + ns defns + xml:lang \n * </PRE>\n * @param namespaces The namespace of the current XML element\n * @param ns_map Namespace mapping\n * @param pbuf Buffer to put the converted text into\n * @param psize Size of the converted text\n */\nAPU_DECLARE(void) apr_xml_to_text(apr_pool_t *p, const apr_xml_elem *elem,\n                                  int style, apr_array_header_t *namespaces,\n                                  int *ns_map, const char **pbuf,\n                                  apr_size_t *psize);\n\n/* style argument values: */\n#define APR_XML_X2T_FULL         0\t/**< start tag, contents, end tag */\n#define APR_XML_X2T_INNER        1\t/**< contents only */\n#define APR_XML_X2T_LANG_INNER   2\t/**< xml:lang + inner contents */\n#define APR_XML_X2T_FULL_NS_LANG 3\t/**< FULL + ns defns + xml:lang */\n\n/**\n * empty XML element\n * @param p The pool to allocate out of\n * @param elem The XML element to empty\n * @return the string that was stored in the XML element\n */\nAPU_DECLARE(const char *) apr_xml_empty_elem(apr_pool_t *p,\n                                             const apr_xml_elem *elem);\n\n/**\n * quote an XML string\n * Replace '\\<', '\\>', and '\\&' with '\\&lt;', '\\&gt;', and '\\&amp;'.\n * @param p The pool to allocate out of\n * @param s The string to quote\n * @param quotes If quotes is true, then replace '&quot;' with '\\&quot;'.\n * @return The quoted string\n * @note If the string does not contain special characters, it is not\n * duplicated into the pool and the original string is returned.\n */\nAPU_DECLARE(const char *) apr_xml_quote_string(apr_pool_t *p, const char *s,\n                                               int quotes);\n\n/**\n * Quote an XML element\n * @param p The pool to allocate out of\n * @param elem The element to quote\n */\nAPU_DECLARE(void) apr_xml_quote_elem(apr_pool_t *p, apr_xml_elem *elem);\n\n/* manage an array of unique URIs: apr_xml_insert_uri() and APR_XML_URI_ITEM() */\n\n/**\n * return the URI's (existing) index, or insert it and return a new index \n * @param uri_array array to insert into\n * @param uri The uri to insert\n * @return int The uri's index\n */\nAPU_DECLARE(int) apr_xml_insert_uri(apr_array_header_t *uri_array,\n                                    const char *uri);\n\n/** Get the URI item for this XML element */\n#define APR_XML_GET_URI_ITEM(ary, i) (((const char * const *)(ary)->elts)[i])\n\n#if APR_CHARSET_EBCDIC\n/**\n * Convert parsed tree in EBCDIC \n * @param p The pool to allocate out of\n * @param pdoc The apr_xml_doc to convert.\n * @param xlate The translation handle to use.\n * @return Any errors found during conversion.\n */\nAPU_DECLARE(apr_status_t) apr_xml_parser_convert_doc(apr_pool_t *p,\n                                                     apr_xml_doc *pdoc,\n                                                     apr_xlate_t *convset);\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n/** @} */\n#endif /* APR_XML_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apu.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* \n * apu.h is duplicated from apu.hw at build time -- do not edit apu.h\n */\n/* @file apu.h\n * @brief APR-Utility main file\n */\n/**\n * @defgroup APR_Util APR Utility Functions\n * @{\n */\n\n\n#ifndef APU_H\n#define APU_H\n\n/**\n * APU_DECLARE_EXPORT is defined when building the APR-UTIL dynamic library,\n * so that all public symbols are exported.\n *\n * APU_DECLARE_STATIC is defined when including the APR-UTIL public headers,\n * to provide static linkage when the dynamic library may be unavailable.\n *\n * APU_DECLARE_STATIC and APU_DECLARE_EXPORT are left undefined when\n * including the APR-UTIL public headers, to import and link the symbols from \n * the dynamic APR-UTIL library and assure appropriate indirection and calling\n * conventions at compile time.\n */\n\n/* Make sure we have our platform identifier macro defined we ask for later.\n */\n#if defined(_WIN32) && !defined(WIN32)\n#define WIN32 1\n#endif\n\n#if defined(DOXYGEN) || !defined(WIN32)\n/**\n * The public APR-UTIL functions are declared with APU_DECLARE(), so they may\n * use the most appropriate calling convention.  Public APR functions with \n * variable arguments must use APU_DECLARE_NONSTD().\n *\n * @fn APU_DECLARE(rettype) apr_func(args);\n */\n#define APU_DECLARE(type)            type\n/**\n * The public APR-UTIL functions using variable arguments are declared with \n * APU_DECLARE_NONSTD(), as they must use the C language calling convention.\n *\n * @fn APU_DECLARE_NONSTD(rettype) apr_func(args, ...);\n */\n#define APU_DECLARE_NONSTD(type)     type\n/**\n * The public APR-UTIL variables are declared with APU_DECLARE_DATA.\n * This assures the appropriate indirection is invoked at compile time.\n *\n * @fn APU_DECLARE_DATA type apr_variable;\n * @note extern APU_DECLARE_DATA type apr_variable; syntax is required for\n * declarations within headers to properly import the variable.\n */\n#define APU_DECLARE_DATA\n#elif defined(APU_DECLARE_STATIC)\n#define APU_DECLARE(type)            type __stdcall\n#define APU_DECLARE_NONSTD(type)     type __cdecl\n#define APU_DECLARE_DATA\n#elif defined(APU_DECLARE_EXPORT)\n#define APU_DECLARE(type)            __declspec(dllexport) type __stdcall\n#define APU_DECLARE_NONSTD(type)     __declspec(dllexport) type __cdecl\n#define APU_DECLARE_DATA             __declspec(dllexport)\n#else\n#define APU_DECLARE(type)            __declspec(dllimport) type __stdcall\n#define APU_DECLARE_NONSTD(type)     __declspec(dllimport) type __cdecl\n#define APU_DECLARE_DATA             __declspec(dllimport)\n#endif\n\n#if !defined(WIN32) || defined(APU_MODULE_DECLARE_STATIC)\n/**\n * Declare a dso module's exported module structure as APU_MODULE_DECLARE_DATA.\n *\n * Unless APU_MODULE_DECLARE_STATIC is defined at compile time, symbols \n * declared with APU_MODULE_DECLARE_DATA are always exported.\n * @code\n * module APU_MODULE_DECLARE_DATA mod_tag\n * @endcode\n */\n#define APU_MODULE_DECLARE_DATA\n#else\n#define APU_MODULE_DECLARE_DATA           __declspec(dllexport)\n#endif\n\n/*\n * we always have SDBM (it's in our codebase)\n */\n#define APU_HAVE_SDBM           1\n\n#ifndef APU_DSO_MODULE_BUILD\n#define APU_HAVE_GDBM           0\n#define APU_HAVE_NDBM           0\n#define APU_HAVE_DB             0\n\n#if APU_HAVE_DB\n#define APU_HAVE_DB_VERSION     0\n#endif\n#endif\n\n/* \n * we always enable dynamic driver loads within apr_dbd\n * Win32 always has odbc (it's always installed)\n */\n#ifndef APU_DSO_MODULE_BUILD\n#define APU_HAVE_PGSQL          0\n#define APU_HAVE_MYSQL          0\n#define APU_HAVE_SQLITE3        0\n#define APU_HAVE_SQLITE2        0\n#define APU_HAVE_ORACLE         0\n#define APU_HAVE_FREETDS        0\n#define APU_HAVE_ODBC           1\n#endif\n\n#define APU_HAVE_CRYPTO         0\n\n#ifndef APU_DSO_MODULE_BUILD\n#define APU_HAVE_OPENSSL        0\n#define APU_HAVE_NSS            0\n#endif\n\n#define APU_HAVE_APR_ICONV      0\n#define APU_HAVE_ICONV          0\n#define APR_HAS_XLATE           (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)\n\n#endif /* APU_H */\n/** @} */\n"
  },
  {
    "path": "third_party/include/aprutil/apu.h.in",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * apu.h is generated from apu.h.in by configure -- do not edit apu.h\n */\n/* @file apu.h\n * @brief APR-Utility main file\n */\n/**\n * @defgroup APR_Util APR Utility Functions\n * @{\n */\n\n\n#ifndef APU_H\n#define APU_H\n\n/**\n * APU_DECLARE_EXPORT is defined when building the APR-UTIL dynamic library,\n * so that all public symbols are exported.\n *\n * APU_DECLARE_STATIC is defined when including the APR-UTIL public headers,\n * to provide static linkage when the dynamic library may be unavailable.\n *\n * APU_DECLARE_STATIC and APU_DECLARE_EXPORT are left undefined when\n * including the APR-UTIL public headers, to import and link the symbols from \n * the dynamic APR-UTIL library and assure appropriate indirection and calling\n * conventions at compile time.\n */\n\n#if defined(DOXYGEN) || !defined(WIN32)\n/**\n * The public APR-UTIL functions are declared with APU_DECLARE(), so they may\n * use the most appropriate calling convention.  Public APR functions with \n * variable arguments must use APU_DECLARE_NONSTD().\n *\n * @fn APU_DECLARE(rettype) apr_func(args);\n */\n#define APU_DECLARE(type)            type\n/**\n * The public APR-UTIL functions using variable arguments are declared with \n * APU_DECLARE_NONSTD(), as they must use the C language calling convention.\n *\n * @fn APU_DECLARE_NONSTD(rettype) apr_func(args, ...);\n */\n#define APU_DECLARE_NONSTD(type)     type\n/**\n * The public APR-UTIL variables are declared with APU_DECLARE_DATA.\n * This assures the appropriate indirection is invoked at compile time.\n *\n * @fn APU_DECLARE_DATA type apr_variable;\n * @note APU_DECLARE_DATA extern type apr_variable; syntax is required for\n * declarations within headers to properly import the variable.\n */\n#define APU_DECLARE_DATA\n#elif defined(APU_DECLARE_STATIC)\n#define APU_DECLARE(type)            type __stdcall\n#define APU_DECLARE_NONSTD(type)     type __cdecl\n#define APU_DECLARE_DATA\n#elif defined(APU_DECLARE_EXPORT)\n#define APU_DECLARE(type)            __declspec(dllexport) type __stdcall\n#define APU_DECLARE_NONSTD(type)     __declspec(dllexport) type __cdecl\n#define APU_DECLARE_DATA             __declspec(dllexport)\n#else\n#define APU_DECLARE(type)            __declspec(dllimport) type __stdcall\n#define APU_DECLARE_NONSTD(type)     __declspec(dllimport) type __cdecl\n#define APU_DECLARE_DATA             __declspec(dllimport)\n#endif\n\n#if !defined(WIN32) || defined(APU_MODULE_DECLARE_STATIC)\n/**\n * Declare a dso module's exported module structure as APU_MODULE_DECLARE_DATA.\n *\n * Unless APU_MODULE_DECLARE_STATIC is defined at compile time, symbols \n * declared with APU_MODULE_DECLARE_DATA are always exported.\n * @code\n * module APU_MODULE_DECLARE_DATA mod_tag\n * @endcode\n */\n#define APU_MODULE_DECLARE_DATA\n#else\n#define APU_MODULE_DECLARE_DATA           __declspec(dllexport)\n#endif\n\n/*\n * we always have SDBM (it's in our codebase)\n */\n#define APU_HAVE_SDBM   @apu_have_sdbm@\n#define APU_HAVE_GDBM   @apu_have_gdbm@\n#define APU_HAVE_NDBM   @apu_have_ndbm@\n#define APU_HAVE_DB     @apu_have_db@\n\n#if APU_HAVE_DB\n#define APU_HAVE_DB_VERSION    @apu_db_version@\n#endif\n\n#define APU_HAVE_PGSQL         @apu_have_pgsql@\n#define APU_HAVE_MYSQL         @apu_have_mysql@\n#define APU_HAVE_SQLITE3       @apu_have_sqlite3@\n#define APU_HAVE_SQLITE2       @apu_have_sqlite2@\n#define APU_HAVE_ORACLE        @apu_have_oracle@\n#define APU_HAVE_FREETDS       @apu_have_freetds@\n#define APU_HAVE_ODBC          @apu_have_odbc@\n\n#define APU_HAVE_CRYPTO        @apu_have_crypto@\n#define APU_HAVE_OPENSSL       @apu_have_openssl@\n#define APU_HAVE_NSS           @apu_have_nss@\n\n#define APU_HAVE_APR_ICONV     @have_apr_iconv@\n#define APU_HAVE_ICONV         @have_iconv@\n#define APR_HAS_XLATE          (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)\n\n#endif /* APU_H */\n/** @} */\n"
  },
  {
    "path": "third_party/include/aprutil/apu.hnw",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* \n * Note: This is a NetWare specific version of apu.h. It is renamed to\n * apu.h at the start of a NetWare build.\n */\n/* @file apu.h\n * @brief APR-Utility main file\n */\n\n#ifdef NETWARE\n#ifndef APU_H\n#define APU_H\n/**\n * @defgroup APR_Util APR Utility Functions\n * @{\n */\n\n\n/**\n * APU_DECLARE_EXPORT is defined when building the APR-UTIL dynamic library,\n * so that all public symbols are exported.\n *\n * APU_DECLARE_STATIC is defined when including the APR-UTIL public headers,\n * to provide static linkage when the dynamic library may be unavailable.\n *\n * APU_DECLARE_STATIC and APU_DECLARE_EXPORT are left undefined when\n * including the APR-UTIL public headers, to import and link the symbols from \n * the dynamic APR-UTIL library and assure appropriate indirection and calling\n * conventions at compile time.\n */\n\n/**\n * The public APR-UTIL functions are declared with APU_DECLARE(), so they may\n * use the most appropriate calling convention.  Public APR functions with \n * variable arguments must use APU_DECLARE_NONSTD().\n *\n * @fn APU_DECLARE(rettype) apr_func(args);\n */\n#define APU_DECLARE(type)            type\n/**\n * The public APR-UTIL functions using variable arguments are declared with \n * APU_DECLARE_NONSTD(), as they must use the C language calling convention.\n *\n * @fn APU_DECLARE_NONSTD(rettype) apr_func(args, ...);\n */\n#define APU_DECLARE_NONSTD(type)     type\n/**\n * The public APR-UTIL variables are declared with APU_DECLARE_DATA.\n * This assures the appropriate indirection is invoked at compile time.\n *\n * @fn APU_DECLARE_DATA type apr_variable;\n * @note APU_DECLARE_DATA extern type apr_variable; syntax is required for\n * declarations within headers to properly import the variable.\n */\n#define APU_DECLARE_DATA\n\n/**\n * Declare a dso module's exported module structure as APU_MODULE_DECLARE_DATA.\n *\n * Unless APU_MODULE_DECLARE_STATIC is defined at compile time, symbols \n * declared with APU_MODULE_DECLARE_DATA are always exported.\n * @code\n * module APU_MODULE_DECLARE_DATA mod_tag\n * @endcode\n */\n#define APU_MODULE_DECLARE_DATA\n\n/*\n * we always have SDBM (it's in our codebase)\n */\n#define APU_HAVE_SDBM           1\n\n#ifndef APU_DSO_MODULE_BUILD\n#define APU_HAVE_GDBM           0\n#define APU_HAVE_NDBM           0\n#define APU_HAVE_DB             0\n\n#if APU_HAVE_DB\n#define APU_HAVE_DB_VERSION     0\n#endif\n#endif\n\n/* \n * we always enable dynamic driver loads within apr_dbd\n */\n#ifndef APU_DSO_MODULE_BUILD\n#define APU_HAVE_PGSQL          0\n#define APU_HAVE_MYSQL          0\n#define APU_HAVE_SQLITE3        0\n#define APU_HAVE_SQLITE2        0\n#define APU_HAVE_ORACLE         0\n#define APU_HAVE_FREETDS        0\n#define APU_HAVE_ODBC           0\n#endif\n\n#define APU_HAVE_CRYPTO         0\n\n#ifndef APU_DSO_MODULE_BUILD\n#define APU_HAVE_OPENSSL        0\n#define APU_HAVE_NSS            0\n#endif\n\n#define APU_HAVE_APR_ICONV      0\n#define APU_HAVE_ICONV          1\n#define APR_HAS_XLATE           (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)\n\n#endif /* APU_H */\n#endif /* NETWARE */\n\n"
  },
  {
    "path": "third_party/include/aprutil/apu.hw",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* \n * apu.h is duplicated from apu.hw at build time -- do not edit apu.h\n */\n/* @file apu.h\n * @brief APR-Utility main file\n */\n/**\n * @defgroup APR_Util APR Utility Functions\n * @{\n */\n\n\n#ifndef APU_H\n#define APU_H\n\n/**\n * APU_DECLARE_EXPORT is defined when building the APR-UTIL dynamic library,\n * so that all public symbols are exported.\n *\n * APU_DECLARE_STATIC is defined when including the APR-UTIL public headers,\n * to provide static linkage when the dynamic library may be unavailable.\n *\n * APU_DECLARE_STATIC and APU_DECLARE_EXPORT are left undefined when\n * including the APR-UTIL public headers, to import and link the symbols from \n * the dynamic APR-UTIL library and assure appropriate indirection and calling\n * conventions at compile time.\n */\n\n/* Make sure we have our platform identifier macro defined we ask for later.\n */\n#if defined(_WIN32) && !defined(WIN32)\n#define WIN32 1\n#endif\n\n#if defined(DOXYGEN) || !defined(WIN32)\n/**\n * The public APR-UTIL functions are declared with APU_DECLARE(), so they may\n * use the most appropriate calling convention.  Public APR functions with \n * variable arguments must use APU_DECLARE_NONSTD().\n *\n * @fn APU_DECLARE(rettype) apr_func(args);\n */\n#define APU_DECLARE(type)            type\n/**\n * The public APR-UTIL functions using variable arguments are declared with \n * APU_DECLARE_NONSTD(), as they must use the C language calling convention.\n *\n * @fn APU_DECLARE_NONSTD(rettype) apr_func(args, ...);\n */\n#define APU_DECLARE_NONSTD(type)     type\n/**\n * The public APR-UTIL variables are declared with APU_DECLARE_DATA.\n * This assures the appropriate indirection is invoked at compile time.\n *\n * @fn APU_DECLARE_DATA type apr_variable;\n * @note extern APU_DECLARE_DATA type apr_variable; syntax is required for\n * declarations within headers to properly import the variable.\n */\n#define APU_DECLARE_DATA\n#elif defined(APU_DECLARE_STATIC)\n#define APU_DECLARE(type)            type __stdcall\n#define APU_DECLARE_NONSTD(type)     type __cdecl\n#define APU_DECLARE_DATA\n#elif defined(APU_DECLARE_EXPORT)\n#define APU_DECLARE(type)            __declspec(dllexport) type __stdcall\n#define APU_DECLARE_NONSTD(type)     __declspec(dllexport) type __cdecl\n#define APU_DECLARE_DATA             __declspec(dllexport)\n#else\n#define APU_DECLARE(type)            __declspec(dllimport) type __stdcall\n#define APU_DECLARE_NONSTD(type)     __declspec(dllimport) type __cdecl\n#define APU_DECLARE_DATA             __declspec(dllimport)\n#endif\n\n#if !defined(WIN32) || defined(APU_MODULE_DECLARE_STATIC)\n/**\n * Declare a dso module's exported module structure as APU_MODULE_DECLARE_DATA.\n *\n * Unless APU_MODULE_DECLARE_STATIC is defined at compile time, symbols \n * declared with APU_MODULE_DECLARE_DATA are always exported.\n * @code\n * module APU_MODULE_DECLARE_DATA mod_tag\n * @endcode\n */\n#define APU_MODULE_DECLARE_DATA\n#else\n#define APU_MODULE_DECLARE_DATA           __declspec(dllexport)\n#endif\n\n/*\n * we always have SDBM (it's in our codebase)\n */\n#define APU_HAVE_SDBM           1\n\n#ifndef APU_DSO_MODULE_BUILD\n#define APU_HAVE_GDBM           0\n#define APU_HAVE_NDBM           0\n#define APU_HAVE_DB             0\n\n#if APU_HAVE_DB\n#define APU_HAVE_DB_VERSION     0\n#endif\n#endif\n\n/* \n * we always enable dynamic driver loads within apr_dbd\n * Win32 always has odbc (it's always installed)\n */\n#ifndef APU_DSO_MODULE_BUILD\n#define APU_HAVE_PGSQL          0\n#define APU_HAVE_MYSQL          0\n#define APU_HAVE_SQLITE3        0\n#define APU_HAVE_SQLITE2        0\n#define APU_HAVE_ORACLE         0\n#define APU_HAVE_FREETDS        0\n#define APU_HAVE_ODBC           1\n#endif\n\n#define APU_HAVE_CRYPTO         0\n\n#ifndef APU_DSO_MODULE_BUILD\n#define APU_HAVE_OPENSSL        0\n#define APU_HAVE_NSS            0\n#endif\n\n#define APU_HAVE_APR_ICONV      0\n#define APU_HAVE_ICONV          0\n#define APR_HAS_XLATE           (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)\n\n#endif /* APU_H */\n/** @} */\n"
  },
  {
    "path": "third_party/include/aprutil/apu.hwc",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* \n * apu.h is duplicated from apu.hwc at build time -- do not edit apu.h\n */\n/* @file apu.h\n * @brief APR-Utility main file\n */\n/**\n * @defgroup APR_Util APR Utility Functions\n * @{\n */\n\n\n#ifndef APU_H\n#define APU_H\n\n/**\n * APU_DECLARE_EXPORT is defined when building the APR-UTIL dynamic library,\n * so that all public symbols are exported.\n *\n * APU_DECLARE_STATIC is defined when including the APR-UTIL public headers,\n * to provide static linkage when the dynamic library may be unavailable.\n *\n * APU_DECLARE_STATIC and APU_DECLARE_EXPORT are left undefined when\n * including the APR-UTIL public headers, to import and link the symbols from \n * the dynamic APR-UTIL library and assure appropriate indirection and calling\n * conventions at compile time.\n */\n\n/* Make sure we have our platform identifier macro defined we ask for later.\n */\n#if defined(_WIN32) && !defined(WIN32)\n#define WIN32 1\n#endif\n\n#if defined(DOXYGEN) || !defined(WIN32)\n/**\n * The public APR-UTIL functions are declared with APU_DECLARE(), so they may\n * use the most appropriate calling convention.  Public APR functions with \n * variable arguments must use APU_DECLARE_NONSTD().\n *\n * @fn APU_DECLARE(rettype) apr_func(args);\n */\n#define APU_DECLARE(type)            type\n/**\n * The public APR-UTIL functions using variable arguments are declared with \n * APU_DECLARE_NONSTD(), as they must use the C language calling convention.\n *\n * @fn APU_DECLARE_NONSTD(rettype) apr_func(args, ...);\n */\n#define APU_DECLARE_NONSTD(type)     type\n/**\n * The public APR-UTIL variables are declared with APU_DECLARE_DATA.\n * This assures the appropriate indirection is invoked at compile time.\n *\n * @fn APU_DECLARE_DATA type apr_variable;\n * @note extern APU_DECLARE_DATA type apr_variable; syntax is required for\n * declarations within headers to properly import the variable.\n */\n#define APU_DECLARE_DATA\n#elif defined(APU_DECLARE_STATIC)\n#define APU_DECLARE(type)            type __stdcall\n#define APU_DECLARE_NONSTD(type)     type __cdecl\n#define APU_DECLARE_DATA\n#elif defined(APU_DECLARE_EXPORT)\n#define APU_DECLARE(type)            __declspec(dllexport) type __stdcall\n#define APU_DECLARE_NONSTD(type)     __declspec(dllexport) type __cdecl\n#define APU_DECLARE_DATA             __declspec(dllexport)\n#else\n#define APU_DECLARE(type)            __declspec(dllimport) type __stdcall\n#define APU_DECLARE_NONSTD(type)     __declspec(dllimport) type __cdecl\n#define APU_DECLARE_DATA             __declspec(dllimport)\n#endif\n\n#if !defined(WIN32) || defined(APU_MODULE_DECLARE_STATIC)\n/**\n * Declare a dso module's exported module structure as APU_MODULE_DECLARE_DATA.\n *\n * Unless APU_MODULE_DECLARE_STATIC is defined at compile time, symbols \n * declared with APU_MODULE_DECLARE_DATA are always exported.\n * @code\n * module APU_MODULE_DECLARE_DATA mod_tag\n * @endcode\n */\n#define APU_MODULE_DECLARE_DATA\n#else\n#define APU_MODULE_DECLARE_DATA           __declspec(dllexport)\n#endif\n\n/*\n * we always have SDBM (it's in our codebase)\n */\n#define APU_HAVE_SDBM           1\n\n#ifndef APU_DSO_MODULE_BUILD\n#define APU_HAVE_GDBM           0\n#define APU_HAVE_NDBM           0\n#define APU_HAVE_DB             0\n\n#if APU_HAVE_DB\n#define APU_HAVE_DB_VERSION     0\n#endif\n#endif\n\n/* \n * we always enable dynamic driver loads within apr_dbd\n * Win32 always has odbc (it's always installed)\n */\n#ifndef APU_DSO_MODULE_BUILD\n#define APU_HAVE_PGSQL          0\n#define APU_HAVE_MYSQL          0\n#define APU_HAVE_SQLITE3        0\n#define APU_HAVE_SQLITE2        0\n#define APU_HAVE_ORACLE         0\n#define APU_HAVE_FREETDS        0\n#define APU_HAVE_ODBC           1\n#endif\n\n#define APU_HAVE_CRYPTO         @apu_have_crypto_10@\n\n#ifndef APU_DSO_MODULE_BUILD\n#define APU_HAVE_OPENSSL        0\n#define APU_HAVE_NSS            0\n#endif\n\n#define APU_HAVE_APR_ICONV      @apu_have_apr_iconv_10@\n#define APU_HAVE_ICONV          0\n#define APR_HAS_XLATE           (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)\n\n#endif /* APU_H */\n/** @} */\n"
  },
  {
    "path": "third_party/include/aprutil/apu_errno.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APU_ERRNO_H\n#define APU_ERRNO_H\n\n/**\n * @file apu_errno.h\n * @brief APR-Util Error Codes\n */\n\n#include \"apr.h\"\n#include \"apr_errno.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/**\n * @defgroup apu_errno Error Codes\n * @ingroup APR_Util\n * @{\n */\n\n/**\n * @defgroup APR_Util_Error APR_Util Error Values\n * <PRE>\n * <b>APU ERROR VALUES</b>\n * APR_ENOKEY         The key provided was empty or NULL\n * APR_ENOIV          The initialisation vector provided was NULL\n * APR_EKEYTYPE       The key type was not recognised\n * APR_ENOSPACE       The buffer supplied was not big enough\n * APR_ECRYPT         An error occurred while encrypting or decrypting\n * APR_EPADDING       Padding was not supported\n * APR_EKEYLENGTH     The key length was incorrect\n * APR_ENOCIPHER      The cipher provided was not recognised\n * APR_ENODIGEST      The digest provided was not recognised\n * APR_ENOENGINE      The engine provided was not recognised\n * APR_EINITENGINE    The engine could not be initialised\n * APR_EREINIT        Underlying crypto has already been initialised\n * </PRE>\n *\n * <PRE>\n * <b>APR STATUS VALUES</b>\n * APR_INCHILD        Program is currently executing in the child\n * </PRE>\n * @{\n */\n/** @see APR_STATUS_IS_ENOKEY */\n#define APR_ENOKEY           (APR_UTIL_START_STATUS + 1)\n/** @see APR_STATUS_IS_ENOIV */\n#define APR_ENOIV            (APR_UTIL_START_STATUS + 2)\n/** @see APR_STATUS_IS_EKEYTYPE */\n#define APR_EKEYTYPE         (APR_UTIL_START_STATUS + 3)\n/** @see APR_STATUS_IS_ENOSPACE */\n#define APR_ENOSPACE         (APR_UTIL_START_STATUS + 4)\n/** @see APR_STATUS_IS_ECRYPT */\n#define APR_ECRYPT           (APR_UTIL_START_STATUS + 5)\n/** @see APR_STATUS_IS_EPADDING */\n#define APR_EPADDING         (APR_UTIL_START_STATUS + 6)\n/** @see APR_STATUS_IS_EKEYLENGTH */\n#define APR_EKEYLENGTH       (APR_UTIL_START_STATUS + 7)\n/** @see APR_STATUS_IS_ENOCIPHER */\n#define APR_ENOCIPHER        (APR_UTIL_START_STATUS + 8)\n/** @see APR_STATUS_IS_ENODIGEST */\n#define APR_ENODIGEST        (APR_UTIL_START_STATUS + 9)\n/** @see APR_STATUS_IS_ENOENGINE */\n#define APR_ENOENGINE        (APR_UTIL_START_STATUS + 10)\n/** @see APR_STATUS_IS_EINITENGINE */\n#define APR_EINITENGINE      (APR_UTIL_START_STATUS + 11)\n/** @see APR_STATUS_IS_EREINIT */\n#define APR_EREINIT          (APR_UTIL_START_STATUS + 12)\n/** @} */\n\n/**\n * @defgroup APU_STATUS_IS Status Value Tests\n * @warning For any particular error condition, more than one of these tests\n *      may match. This is because platform-specific error codes may not\n *      always match the semantics of the POSIX codes these tests (and the\n *      corresponding APR error codes) are named after. A notable example\n *      are the APR_STATUS_IS_ENOENT and APR_STATUS_IS_ENOTDIR tests on\n *      Win32 platforms. The programmer should always be aware of this and\n *      adjust the order of the tests accordingly.\n * @{\n */\n\n/** @} */\n\n/**\n * @addtogroup APR_Util_Error\n * @{\n */\n/**\n * The key was empty or not provided\n */\n#define APR_STATUS_IS_ENOKEY(s)        ((s) == APR_ENOKEY)\n/**\n * The initialisation vector was not provided\n */\n#define APR_STATUS_IS_ENOIV(s)        ((s) == APR_ENOIV)\n/**\n * The key type was not recognised\n */\n#define APR_STATUS_IS_EKEYTYPE(s)        ((s) == APR_EKEYTYPE)\n/**\n * The buffer provided was not big enough\n */\n#define APR_STATUS_IS_ENOSPACE(s)        ((s) == APR_ENOSPACE)\n/**\n * An error occurred while encrypting or decrypting\n */\n#define APR_STATUS_IS_ECRYPT(s)        ((s) == APR_ECRYPT)\n/**\n * An error occurred while padding\n */\n#define APR_STATUS_IS_EPADDING(s)        ((s) == APR_EPADDING)\n/**\n * An error occurred with the key length\n */\n#define APR_STATUS_IS_EKEYLENGTH(s)        ((s) == APR_EKEYLENGTH)\n/**\n * The cipher provided was not recognised\n */\n#define APR_STATUS_IS_ENOCIPHER(s)        ((s) == APR_ENOCIPHER)\n/**\n * The digest provided was not recognised\n */\n#define APR_STATUS_IS_ENODIGEST(s)        ((s) == APR_ENODIGEST)\n/**\n * The engine provided was not recognised\n */\n#define APR_STATUS_IS_ENOENGINE(s)        ((s) == APR_ENOENGINE)\n/**\n * The engine could not be initialised\n */\n#define APR_STATUS_IS_EINITENGINE(s)        ((s) == APR_EINITENGINE)\n/**\n * Crypto has already been initialised\n */\n#define APR_STATUS_IS_EREINIT(s)        ((s) == APR_EREINIT)\n/** @} */\n\n/**\n * This structure allows the underlying API error codes to be returned\n * along with plain text error messages that explain to us mere mortals\n * what really happened.\n */\ntypedef struct apu_err_t {\n    const char *reason;\n    const char *msg;\n    int rc;\n} apu_err_t;\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* ! APU_ERRNO_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apu_version.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APU_VERSION_H\n#define APU_VERSION_H\n\n/**\n * @file apu_version.h\n * @brief APR-util Versioning Interface\n * \n * APR-util's Version\n *\n * There are several different mechanisms for accessing the version. There\n * is a string form, and a set of numbers; in addition, there are constants\n * which can be compiled into your application, and you can query the library\n * being used for its actual version.\n *\n * Note that it is possible for an application to detect that it has been\n * compiled against a different version of APU by use of the compile-time\n * constants and the use of the run-time query function.\n *\n * APU version numbering follows the guidelines specified in:\n *\n *     http://apr.apache.org/versioning.html\n */\n\n\n#define APU_COPYRIGHT \"Copyright (c) 2000-2014 The Apache Software \" \\\n                      \"Foundation or its licensors, as applicable.\"\n\n/* The numeric compile-time version constants. These constants are the\n * authoritative version numbers for APU. \n */\n\n/** major version \n * Major API changes that could cause compatibility problems for older\n * programs such as structure size changes.  No binary compatibility is\n * possible across a change in the major version.\n */\n#define APU_MAJOR_VERSION       1\n\n/** minor version\n * Minor API changes that do not cause binary compatibility problems.\n * Reset to 0 when upgrading APU_MAJOR_VERSION\n */\n#define APU_MINOR_VERSION       5\n\n/** patch level \n * The Patch Level never includes API changes, simply bug fixes.\n * Reset to 0 when upgrading APR_MINOR_VERSION\n */\n#define APU_PATCH_VERSION       4\n\n/** \n * The symbol APU_IS_DEV_VERSION is only defined for internal,\n * \"development\" copies of APU.  It is undefined for released versions\n * of APU.\n */\n/* #define APU_IS_DEV_VERSION */\n\n\n#if defined(APU_IS_DEV_VERSION) || defined(DOXYGEN)\n/** Internal: string form of the \"is dev\" flag */\n#ifndef APU_IS_DEV_STRING\n#define APU_IS_DEV_STRING \"-dev\"\n#endif\n#else\n#define APU_IS_DEV_STRING \"\"\n#endif\n\n\n#ifndef APU_STRINGIFY\n/** Properly quote a value as a string in the C preprocessor */\n#define APU_STRINGIFY(n) APU_STRINGIFY_HELPER(n)\n/** Helper macro for APU_STRINGIFY */\n#define APU_STRINGIFY_HELPER(n) #n\n#endif\n\n/** The formatted string of APU's version */\n#define APU_VERSION_STRING \\\n     APU_STRINGIFY(APU_MAJOR_VERSION) \".\" \\\n     APU_STRINGIFY(APU_MINOR_VERSION) \".\" \\\n     APU_STRINGIFY(APU_PATCH_VERSION) \\\n     APU_IS_DEV_STRING\n\n/** An alternative formatted string of APR's version */\n/* macro for Win32 .rc files using numeric csv representation */\n#define APU_VERSION_STRING_CSV APU_MAJOR_VERSION ##, \\\n                             ##APU_MINOR_VERSION ##, \\\n                             ##APU_PATCH_VERSION\n\n\n#ifndef APU_VERSION_ONLY\n\n/* The C language API to access the version at run time, \n * as opposed to compile time.  APU_VERSION_ONLY may be defined \n * externally when preprocessing apr_version.h to obtain strictly \n * the C Preprocessor macro declarations.\n */\n\n#include \"apr_version.h\"\n\n#include \"apu.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * Return APR-util's version information information in a numeric form.\n *\n *  @param pvsn Pointer to a version structure for returning the version\n *              information.\n */\nAPU_DECLARE(void) apu_version(apr_version_t *pvsn);\n\n/** Return APU's version information as a string. */\nAPU_DECLARE(const char *) apu_version_string(void);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* ndef APU_VERSION_ONLY */\n\n#endif /* ndef APU_VERSION_H */\n"
  },
  {
    "path": "third_party/include/aprutil/apu_want.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"apu.h\"        /* configuration data */\n\n/**\n * @file apu_want.h\n * @brief APR Standard Headers Support\n *\n * <PRE>\n * Features:\n *\n *   APU_WANT_DB:       <db.h>\n *\n * Typical usage:\n *\n *   #define APU_WANT_DB\n *   #include \"apu_want.h\"\n *\n * The appropriate headers will be included.\n *\n * Note: it is safe to use this in a header (it won't interfere with other\n *       headers' or source files' use of apu_want.h)\n * </PRE>\n */\n\n/* --------------------------------------------------------------------- */\n\n#ifdef APU_WANT_DB\n\n#if APU_HAVE_DB\n/* win32 note.. you will need to change this for db1 */\n#include <db.h>\n#endif\n\n#undef APU_WANT_DB\n#endif\n\n/* --------------------------------------------------------------------- */\n"
  },
  {
    "path": "third_party/include/aprutil/apu_want.h.in",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"apu.h\"        /* configuration data */\n\n/**\n * @file apu_want.h\n * @brief APR Standard Headers Support\n *\n * <PRE>\n * Features:\n *\n *   APU_WANT_DB:       <@apu_db_header@>\n *\n * Typical usage:\n *\n *   #define APU_WANT_DB\n *   #include \"apu_want.h\"\n *\n * The appropriate headers will be included.\n *\n * Note: it is safe to use this in a header (it won't interfere with other\n *       headers' or source files' use of apu_want.h)\n * </PRE>\n */\n\n/* --------------------------------------------------------------------- */\n\n#ifdef APU_WANT_DB\n\n#if APU_HAVE_DB\n#include <@apu_db_header@>\n#endif\n\n#undef APU_WANT_DB\n#endif\n\n/* --------------------------------------------------------------------- */\n"
  },
  {
    "path": "third_party/include/aprutil/apu_want.hnw",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"apu.h\"        /* configuration data */\n\n/**\n * @file apu_want.h\n * @brief APR Standard Headers Support\n *\n * <PRE>\n * Features:\n *\n *   APU_WANT_DB:       <@apu_db_header>\n *\n * Typical usage:\n *\n *   #define APU_WANT_DB\n *   #include \"apu_want.h\"\n *\n * The appropriate headers will be included.\n *\n * Note: it is safe to use this in a header (it won't interfere with other\n *       headers' or source files' use of apu_want.h)\n * </PRE>\n */\n\n/* --------------------------------------------------------------------- */\n\n#ifdef APU_WANT_DB\n\n#if APU_HAVE_DB\n/* win32 note.. you will need to change this for db1 */\n#include <db.h>\n#endif\n\n#undef APU_WANT_DB\n#endif\n\n/* --------------------------------------------------------------------- */\n"
  },
  {
    "path": "third_party/include/aprutil/apu_want.hw",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"apu.h\"        /* configuration data */\n\n/**\n * @file apu_want.h\n * @brief APR Standard Headers Support\n *\n * <PRE>\n * Features:\n *\n *   APU_WANT_DB:       <db.h>\n *\n * Typical usage:\n *\n *   #define APU_WANT_DB\n *   #include \"apu_want.h\"\n *\n * The appropriate headers will be included.\n *\n * Note: it is safe to use this in a header (it won't interfere with other\n *       headers' or source files' use of apu_want.h)\n * </PRE>\n */\n\n/* --------------------------------------------------------------------- */\n\n#ifdef APU_WANT_DB\n\n#if APU_HAVE_DB\n/* win32 note.. you will need to change this for db1 */\n#include <db.h>\n#endif\n\n#undef APU_WANT_DB\n#endif\n\n/* --------------------------------------------------------------------- */\n"
  },
  {
    "path": "third_party/include/aprutil/private/apr_crypto_internal.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_CRYPTO_INTERNAL_H\n#define APR_CRYPTO_INTERNAL_H\n\n#include <stdarg.h>\n\n#include \"apr_crypto.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#if APU_HAVE_CRYPTO\n\nstruct apr_crypto_driver_t {\n\n    /** name */\n    const char *name;\n\n    /**\n     * @brief: allow driver to perform once-only initialisation.\n     * Called once only.\n     * @param pool The pool to register the cleanup in.\n     * @param params Optional init parameter string.\n     * @param rc Driver-specific additional error code\n     */\n    apr_status_t (*init)(apr_pool_t *pool, const char *params,\n            const apu_err_t **result);\n\n    /**\n     * @brief Create a context for supporting encryption. Keys, certificates,\n     *        algorithms and other parameters will be set per context. More than\n     *        one context can be created at one time. A cleanup will be automatically\n     *        registered with the given pool to guarantee a graceful shutdown.\n     * @param f - context pointer will be written here\n     * @param provider - provider to use\n     * @param params - array of key parameters\n     * @param pool - process pool\n     * @return APR_ENOENGINE when the engine specified does not exist. APR_EINITENGINE\n     * if the engine cannot be initialised.\n     */\n    apr_status_t (*make)(apr_crypto_t **f, const apr_crypto_driver_t *provider,\n            const char *params, apr_pool_t *pool);\n\n    /**\n     * @brief Get a hash table of key types, keyed by the name of the type against\n     * an integer pointer constant.\n     *\n     * @param types - hashtable of key types keyed to constants.\n     * @param f - encryption context\n     * @return APR_SUCCESS for success\n     */\n    apr_status_t (*get_block_key_types)(apr_hash_t **types,\n            const apr_crypto_t *f);\n\n    /**\n     * @brief Get a hash table of key modes, keyed by the name of the mode against\n     * an integer pointer constant.\n     *\n     * @param modes - hashtable of key modes keyed to constants.\n     * @param f - encryption context\n     * @return APR_SUCCESS for success\n     */\n    apr_status_t (*get_block_key_modes)(apr_hash_t **modes,\n            const apr_crypto_t *f);\n\n    /**\n     * @brief Create a key from the given passphrase. By default, the PBKDF2\n     *        algorithm is used to generate the key from the passphrase. It is expected\n     *        that the same pass phrase will generate the same key, regardless of the\n     *        backend crypto platform used. The key is cleaned up when the context\n     *        is cleaned, and may be reused with multiple encryption or decryption\n     *        operations.\n     * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If\n     *       *key is not NULL, *key must point at a previously created structure.\n     * @param key The key returned, see note.\n     * @param ivSize The size of the initialisation vector will be returned, based\n     *               on whether an IV is relevant for this type of crypto.\n     * @param pass The passphrase to use.\n     * @param passLen The passphrase length in bytes\n     * @param salt The salt to use.\n     * @param saltLen The salt length in bytes\n     * @param type 3DES_192, AES_128, AES_192, AES_256.\n     * @param mode Electronic Code Book / Cipher Block Chaining.\n     * @param doPad Pad if necessary.\n     * @param iterations Iteration count\n     * @param f The context to use.\n     * @param p The pool to use.\n     * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend\n     *         error occurred while generating the key. APR_ENOCIPHER if the type or mode\n     *         is not supported by the particular backend. APR_EKEYTYPE if the key type is\n     *         not known. APR_EPADDING if padding was requested but is not supported.\n     *         APR_ENOTIMPL if not implemented.\n     */\n    apr_status_t (*passphrase)(apr_crypto_key_t **key, apr_size_t *ivSize,\n            const char *pass, apr_size_t passLen, const unsigned char * salt,\n            apr_size_t saltLen, const apr_crypto_block_key_type_e type,\n            const apr_crypto_block_key_mode_e mode, const int doPad,\n            const int iterations, const apr_crypto_t *f, apr_pool_t *p);\n\n    /**\n     * @brief Initialise a context for encrypting arbitrary data using the given key.\n     * @note If *ctx is NULL, a apr_crypto_block_t will be created from a pool. If\n     *       *ctx is not NULL, *ctx must point at a previously created structure.\n     * @param ctx The block context returned, see note.\n     * @param iv Optional initialisation vector. If the buffer pointed to is NULL,\n     *           an IV will be created at random, in space allocated from the pool.\n     *           If the buffer pointed to is not NULL, the IV in the buffer will be\n     *           used.\n     * @param key The key structure.\n     * @param blockSize The block size of the cipher.\n     * @param p The pool to use.\n     * @return Returns APR_ENOIV if an initialisation vector is required but not specified.\n     *         Returns APR_EINIT if the backend failed to initialise the context. Returns\n     *         APR_ENOTIMPL if not implemented.\n     */\n    apr_status_t (*block_encrypt_init)(apr_crypto_block_t **ctx,\n            const unsigned char **iv, const apr_crypto_key_t *key,\n            apr_size_t *blockSize, apr_pool_t *p);\n\n    /**\n     * @brief Encrypt data provided by in, write it to out.\n     * @note The number of bytes written will be written to outlen. If\n     *       out is NULL, outlen will contain the maximum size of the\n     *       buffer needed to hold the data, including any data\n     *       generated by apr_crypto_block_encrypt_finish below. If *out points\n     *       to NULL, a buffer sufficiently large will be created from\n     *       the pool provided. If *out points to a not-NULL value, this\n     *       value will be used as a buffer instead.\n     * @param out Address of a buffer to which data will be written,\n     *        see note.\n     * @param outlen Length of the output will be written here.\n     * @param in Address of the buffer to read.\n     * @param inlen Length of the buffer to read.\n     * @param ctx The block context to use.\n     * @return APR_ECRYPT if an error occurred. Returns APR_ENOTIMPL if\n     *         not implemented.\n     */\n    apr_status_t (*block_encrypt)(unsigned char **out, apr_size_t *outlen,\n            const unsigned char *in, apr_size_t inlen, apr_crypto_block_t *ctx);\n\n    /**\n     * @brief Encrypt final data block, write it to out.\n     * @note If necessary the final block will be written out after being\n     *       padded. Typically the final block will be written to the\n     *       same buffer used by apr_crypto_block_encrypt, offset by the\n     *       number of bytes returned as actually written by the\n     *       apr_crypto_block_encrypt() call. After this call, the context\n     *       is cleaned and can be reused by apr_crypto_block_encrypt_init().\n     * @param out Address of a buffer to which data will be written. This\n     *            buffer must already exist, and is usually the same\n     *            buffer used by apr_evp_crypt(). See note.\n     * @param outlen Length of the output will be written here.\n     * @param ctx The block context to use.\n     * @return APR_ECRYPT if an error occurred.\n     * @return APR_EPADDING if padding was enabled and the block was incorrectly\n     *         formatted.\n     * @return APR_ENOTIMPL if not implemented.\n     */\n    apr_status_t (*block_encrypt_finish)(unsigned char *out,\n            apr_size_t *outlen, apr_crypto_block_t *ctx);\n\n    /**\n     * @brief Initialise a context for decrypting arbitrary data using the given key.\n     * @note If *ctx is NULL, a apr_crypto_block_t will be created from a pool. If\n     *       *ctx is not NULL, *ctx must point at a previously created structure.\n     * @param ctx The block context returned, see note.\n     * @param blockSize The block size of the cipher.\n     * @param iv Optional initialisation vector. If the buffer pointed to is NULL,\n     *           an IV will be created at random, in space allocated from the pool.\n     *           If the buffer is not NULL, the IV in the buffer will be used.\n     * @param key The key structure.\n     * @param p The pool to use.\n     * @return Returns APR_ENOIV if an initialisation vector is required but not specified.\n     *         Returns APR_EINIT if the backend failed to initialise the context. Returns\n     *         APR_ENOTIMPL if not implemented.\n     */\n    apr_status_t (*block_decrypt_init)(apr_crypto_block_t **ctx,\n            apr_size_t *blockSize, const unsigned char *iv,\n            const apr_crypto_key_t *key, apr_pool_t *p);\n\n    /**\n     * @brief Decrypt data provided by in, write it to out.\n     * @note The number of bytes written will be written to outlen. If\n     *       out is NULL, outlen will contain the maximum size of the\n     *       buffer needed to hold the data, including any data\n     *       generated by apr_crypto_block_decrypt_finish below. If *out points\n     *       to NULL, a buffer sufficiently large will be created from\n     *       the pool provided. If *out points to a not-NULL value, this\n     *       value will be used as a buffer instead.\n     * @param out Address of a buffer to which data will be written,\n     *        see note.\n     * @param outlen Length of the output will be written here.\n     * @param in Address of the buffer to read.\n     * @param inlen Length of the buffer to read.\n     * @param ctx The block context to use.\n     * @return APR_ECRYPT if an error occurred. Returns APR_ENOTIMPL if\n     *         not implemented.\n     */\n    apr_status_t (*block_decrypt)(unsigned char **out, apr_size_t *outlen,\n            const unsigned char *in, apr_size_t inlen, apr_crypto_block_t *ctx);\n\n    /**\n     * @brief Decrypt final data block, write it to out.\n     * @note If necessary the final block will be written out after being\n     *       padded. Typically the final block will be written to the\n     *       same buffer used by apr_crypto_block_decrypt, offset by the\n     *       number of bytes returned as actually written by the\n     *       apr_crypto_block_decrypt() call. After this call, the context\n     *       is cleaned and can be reused by apr_crypto_block_decrypt_init().\n     * @param out Address of a buffer to which data will be written. This\n     *            buffer must already exist, and is usually the same\n     *            buffer used by apr_evp_crypt(). See note.\n     * @param outlen Length of the output will be written here.\n     * @param ctx The block context to use.\n     * @return APR_ECRYPT if an error occurred.\n     * @return APR_EPADDING if padding was enabled and the block was incorrectly\n     *         formatted.\n     * @return APR_ENOTIMPL if not implemented.\n     */\n    apr_status_t (*block_decrypt_finish)(unsigned char *out,\n            apr_size_t *outlen, apr_crypto_block_t *ctx);\n\n    /**\n     * @brief Clean encryption / decryption context.\n     * @note After cleanup, a context is free to be reused if necessary.\n     * @param ctx The block context to use.\n     * @return Returns APR_ENOTIMPL if not supported.\n     */\n    apr_status_t (*block_cleanup)(apr_crypto_block_t *ctx);\n\n    /**\n     * @brief Clean encryption / decryption context.\n     * @note After cleanup, a context is free to be reused if necessary.\n     * @param f The context to use.\n     * @return Returns APR_ENOTIMPL if not supported.\n     */\n    apr_status_t (*cleanup)(apr_crypto_t *f);\n\n    /**\n     * @brief Clean encryption / decryption context.\n     * @note After cleanup, a context is free to be reused if necessary.\n     * @return Returns APR_ENOTIMPL if not supported.\n     */\n    apr_status_t (*shutdown)(void);\n\n    /**\n     * @brief: fetch the most recent error from this driver.\n     * @param result - the result structure\n     * @param f - context pointer\n     * @return APR_SUCCESS for success.\n     */\n    apr_status_t (*error)(const apu_err_t **result, const apr_crypto_t *f);\n\n};\n\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "third_party/include/aprutil/private/apr_dbd_internal.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* Overview of what this is and does:\n * http://www.apache.org/~niq/dbd.html\n */\n\n#ifndef APR_DBD_INTERNAL_H\n#define APR_DBD_INTERNAL_H\n\n#include <stdarg.h>\n\n#include \"apr_dbd.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define TXN_IGNORE_ERRORS(t) \\\n  ((t) && ((t)->mode & APR_DBD_TRANSACTION_IGNORE_ERRORS))\n#define TXN_NOTICE_ERRORS(t) \\\n  ((t) && !((t)->mode & APR_DBD_TRANSACTION_IGNORE_ERRORS))\n\n#define TXN_DO_COMMIT(t)   (!((t)->mode & APR_DBD_TRANSACTION_ROLLBACK))\n#define TXN_DO_ROLLBACK(t) ((t)->mode & APR_DBD_TRANSACTION_ROLLBACK)\n\n#define TXN_MODE_BITS \\\n  (APR_DBD_TRANSACTION_ROLLBACK|APR_DBD_TRANSACTION_IGNORE_ERRORS)\n\nstruct apr_dbd_driver_t {\n    /** name */\n    const char *name;\n\n    /** init: allow driver to perform once-only initialisation.\n     *  Called once only.  May be NULL\n     */\n    void (*init)(apr_pool_t *pool);\n\n    /** native_handle: return the native database handle of the underlying db\n     *\n     * @param handle - apr_dbd handle\n     * @return - native handle\n     */\n    void *(*native_handle)(apr_dbd_t *handle);\n\n    /** open: obtain a database connection from the server rec.\n     *  Must be explicitly closed when you're finished with it.\n     *  WARNING: only use this when you need a connection with\n     *  a lifetime other than a request\n     *\n     *  @param pool - a pool to use for error messages (if any).\n     *  @param params - connection parameters.\n     *  @param error - descriptive error.\n     *  @return database handle, or NULL on error.\n     */\n    apr_dbd_t *(*open)(apr_pool_t *pool, const char *params,\n                       const char **error);\n\n    /** check_conn: check status of a database connection\n     *\n     *  @param pool - a pool to use for error messages (if any).\n     *  @param handle - the connection to check\n     *  @return APR_SUCCESS or error\n     */\n    apr_status_t (*check_conn)(apr_pool_t *pool, apr_dbd_t *handle);\n\n    /** close: close/release a connection obtained from open()\n     *\n     *  @param handle - the connection to release\n     *  @return APR_SUCCESS or error\n     */\n    apr_status_t (*close)(apr_dbd_t *handle);\n\n    /** set_dbname: select database name.  May be a no-op if not supported.\n     *\n     *  @param pool - working pool\n     *  @param handle - the connection\n     *  @param name - the database to select\n     *  @return 0 for success or error code\n     */\n    int (*set_dbname)(apr_pool_t* pool, apr_dbd_t *handle, const char *name);\n\n    /** transaction: start a transaction.  May be a no-op.\n     *\n     *  @param pool   - a pool to use for error messages (if any).\n     *  @param handle - the connection\n     *  @param trans  - ptr to a transaction.  May be null on entry\n     *  @return 0 for success or error code\n     */\n    int (*start_transaction)(apr_pool_t *pool, apr_dbd_t *handle,\n                             apr_dbd_transaction_t **trans);\n\n    /** end_transaction: end a transaction\n     *  (commit on success, rollback on error).\n     *  May be a no-op.\n     *\n     *  @param trans - the transaction.\n     *  @return 0 for success or error code\n     */\n    int (*end_transaction)(apr_dbd_transaction_t *trans);\n\n    /** query: execute an SQL query that doesn't return a result set\n     *\n     *  @param handle - the connection\n     *  @param nrows - number of rows affected.\n     *  @param statement - the SQL statement to execute\n     *  @return 0 for success or error code\n     */\n    int (*query)(apr_dbd_t *handle, int *nrows, const char *statement);\n\n    /** select: execute an SQL query that returns a result set\n     *\n     *  @param pool - pool to allocate the result set\n     *  @param handle - the connection\n     *  @param res - pointer to result set pointer.  May point to NULL on entry\n     *  @param statement - the SQL statement to execute\n     *  @param random - 1 to support random access to results (seek any row);\n     *                  0 to support only looping through results in order\n     *                    (async access - faster)\n     *  @return 0 for success or error code\n     */\n    int (*select)(apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_results_t **res,\n                  const char *statement, int random);\n\n    /** num_cols: get the number of columns in a results set\n     *\n     *  @param res - result set.\n     *  @return number of columns\n     */\n    int (*num_cols)(apr_dbd_results_t *res);\n\n    /** num_tuples: get the number of rows in a results set\n     *  of a synchronous select\n     *\n     *  @param res - result set.\n     *  @return number of rows, or -1 if the results are asynchronous\n     */\n    int (*num_tuples)(apr_dbd_results_t *res);\n\n    /** get_row: get a row from a result set\n     *\n     *  @param pool - pool to allocate the row\n     *  @param res - result set pointer\n     *  @param row - pointer to row pointer.  May point to NULL on entry\n     *  @param rownum - row number, or -1 for \"next row\".  Ignored if random\n     *                  access is not supported.\n     *  @return 0 for success, -1 for rownum out of range or data finished\n     */\n    int (*get_row)(apr_pool_t *pool, apr_dbd_results_t *res,\n                   apr_dbd_row_t **row, int rownum);\n  \n    /** get_entry: get an entry from a row\n     *\n     *  @param row - row pointer\n     *  @param col - entry number\n     *  @param val - entry to fill\n     *  @return 0 for success, -1 for no data, +1 for general error\n     */\n    const char* (*get_entry)(const apr_dbd_row_t *row, int col);\n  \n    /** error: get current error message (if any)\n     *\n     *  @param handle - the connection\n     *  @param errnum - error code from operation that returned an error\n     *  @return the database current error message, or message for errnum\n     *          (implementation-dependent whether errnum is ignored)\n     */\n    const char *(*error)(apr_dbd_t *handle, int errnum);\n  \n    /** escape: escape a string so it is safe for use in query/select\n     *\n     *  @param pool - pool to alloc the result from\n     *  @param string - the string to escape\n     *  @param handle - the connection\n     *  @return the escaped, safe string\n     */\n    const char *(*escape)(apr_pool_t *pool, const char *string,\n                          apr_dbd_t *handle);\n  \n    /** prepare: prepare a statement\n     *\n     *  @param pool - pool to alloc the result from\n     *  @param handle - the connection\n     *  @param query - the SQL query\n     *  @param label - A label for the prepared statement.\n     *                 use NULL for temporary prepared statements\n     *                 (eg within a Request in httpd)\n     *  @param nargs - number of parameters in the query\n     *  @param nvals - number of values passed in p[b]query/select\n     *  @param types - pointer to an array with types of parameters\n     *  @param statement - statement to prepare.  May point to null on entry.\n     *  @return 0 for success or error code\n     */\n    int (*prepare)(apr_pool_t *pool, apr_dbd_t *handle, const char *query,\n                   const char *label, int nargs, int nvals,\n                   apr_dbd_type_e *types, apr_dbd_prepared_t **statement);\n\n    /** pvquery: query using a prepared statement + args\n     *\n     *  @param pool - working pool\n     *  @param handle - the connection\n     *  @param nrows - number of rows affected.\n     *  @param statement - the prepared statement to execute\n     *  @param args - args to prepared statement\n     *  @return 0 for success or error code\n     */\n    int (*pvquery)(apr_pool_t *pool, apr_dbd_t *handle, int *nrows,\n                   apr_dbd_prepared_t *statement, va_list args);\n\n    /** pvselect: select using a prepared statement + args\n     *\n     *  @param pool - working pool\n     *  @param handle - the connection\n     *  @param res - pointer to query results.  May point to NULL on entry\n     *  @param statement - the prepared statement to execute\n     *  @param random - Whether to support random-access to results\n     *  @param args - args to prepared statement\n     *  @return 0 for success or error code\n     */\n    int (*pvselect)(apr_pool_t *pool, apr_dbd_t *handle,\n                    apr_dbd_results_t **res,\n                    apr_dbd_prepared_t *statement, int random, va_list args);\n\n    /** pquery: query using a prepared statement + args\n     *\n     *  @param pool - working pool\n     *  @param handle - the connection\n     *  @param nrows - number of rows affected.\n     *  @param statement - the prepared statement to execute\n     *  @param args - args to prepared statement\n     *  @return 0 for success or error code\n     */\n    int (*pquery)(apr_pool_t *pool, apr_dbd_t *handle, int *nrows,\n                  apr_dbd_prepared_t *statement, const char **args);\n\n    /** pselect: select using a prepared statement + args\n     *\n     *  @param pool - working pool\n     *  @param handle - the connection\n     *  @param res - pointer to query results.  May point to NULL on entry\n     *  @param statement - the prepared statement to execute\n     *  @param random - Whether to support random-access to results\n     *  @param args - args to prepared statement\n     *  @return 0 for success or error code\n     */\n    int (*pselect)(apr_pool_t *pool, apr_dbd_t *handle,\n                   apr_dbd_results_t **res, apr_dbd_prepared_t *statement,\n                   int random, const char **args);\n\n  \n    /** get_name: get a column title from a result set\n     *\n     *  @param res - result set pointer\n     *  @param col - entry number\n     *  @return param name, or NULL if col is out of bounds.\n     */\n    const char* (*get_name)(const apr_dbd_results_t *res, int col);\n\n    /** transaction_mode_get: get the mode of transaction\n     *\n     *  @param trans - the transaction.\n     *  @return mode of transaction\n     */\n    int (*transaction_mode_get)(apr_dbd_transaction_t *trans);\n\n    /** transaction_mode_set: get the mode of transaction\n     *\n     *  @param trans - the transaction.\n     *  @param mode  - new mode of the transaction\n     *  @return the mode of transaction in force after the call\n     */\n    int (*transaction_mode_set)(apr_dbd_transaction_t *trans, int mode);\n\n    /** format of prepared statement parameters */\n    const char *pformat;\n\n    /** pvbquery: query using a prepared statement + binary args\n     *\n     *  @param pool - working pool\n     *  @param handle - the connection\n     *  @param nrows - number of rows affected.\n     *  @param statement - the prepared statement to execute\n     *  @param args - binary args to prepared statement\n     *  @return 0 for success or error code\n     */\n    int (*pvbquery)(apr_pool_t *pool, apr_dbd_t *handle, int *nrows,\n                    apr_dbd_prepared_t *statement, va_list args);\n\n    /** pvbselect: select using a prepared statement + binary args\n     *\n     *  @param pool - working pool\n     *  @param handle - the connection\n     *  @param res - pointer to query results.  May point to NULL on entry\n     *  @param statement - the prepared statement to execute\n     *  @param random - Whether to support random-access to results\n     *  @param args - binary args to prepared statement\n     *  @return 0 for success or error code\n     */\n    int (*pvbselect)(apr_pool_t *pool, apr_dbd_t *handle,\n                     apr_dbd_results_t **res,\n                     apr_dbd_prepared_t *statement, int random, va_list args);\n\n    /** pbquery: query using a prepared statement + binary args\n     *\n     *  @param pool - working pool\n     *  @param handle - the connection\n     *  @param nrows - number of rows affected.\n     *  @param statement - the prepared statement to execute\n     *  @param args - binary args to prepared statement\n     *  @return 0 for success or error code\n     */\n    int (*pbquery)(apr_pool_t *pool, apr_dbd_t *handle, int *nrows,\n                   apr_dbd_prepared_t *statement,const void **args);\n\n    /** pbselect: select using a prepared statement + binary args\n     *\n     *  @param pool - working pool\n     *  @param handle - the connection\n     *  @param res - pointer to query results.  May point to NULL on entry\n     *  @param statement - the prepared statement to execute\n     *  @param random - Whether to support random-access to results\n     *  @param args - binary args to prepared statement\n     *  @return 0 for success or error code\n     */\n    int (*pbselect)(apr_pool_t *pool, apr_dbd_t *handle,\n                    apr_dbd_results_t **res, apr_dbd_prepared_t *statement,\n                    int random, const void **args);\n  \n    /** datum_get: get a binary entry from a row\n     *\n     *  @param row - row pointer\n     *  @param col - entry number\n     *  @param type - type of data to get\n     *  @param data - pointer to data, allocated by the caller\n     *  @return APR_SUCCESS, an error code on error or if col is out of bounds\n     */\n    apr_status_t (*datum_get)(const apr_dbd_row_t *row, int col,\n                              apr_dbd_type_e type, void *data);\n};\n\n/* Export mutex lock/unlock for drivers that need it \n * deprecated; create a per-dbd mutex within the (*init) function\n * to avoid blocking other providers running on other threads\n */\nAPU_DECLARE(apr_status_t) apr_dbd_mutex_lock(void);\nAPU_DECLARE(apr_status_t) apr_dbd_mutex_unlock(void);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "third_party/include/aprutil/private/apr_dbd_odbc_v2.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/*  ONLY USED FOR ODBC Version 2   -DODBCV2\n*\n*   Re-define everything to work (more-or-less) in an ODBC V2 environment\n*       Random access to retrieved rows is not supported - i.e. calls to apr_dbd_select() cannot\n*       have a 'random' argument of 1.  apr_dbd_get_row() must always pass rownum as 0 (get next row)\n*\n*/\n\n#define SQLHANDLE SQLHENV /* Presumes that ENV, DBC, and STMT handles are all the same datatype */\n#define SQL_NULL_HANDLE 0\n#define SQL_HANDLE_STMT 1\n#define SQL_HANDLE_DBC  2\n#define SQL_HANDLE_ENV  3\n#define SQL_NO_DATA     SQL_NO_DATA_FOUND\n\n#ifndef SQL_SUCCEEDED\n#define SQL_SUCCEEDED(rc) (((rc)&(~1))==0)\n#endif\n\n#undef SQLSetEnvAttr\n#define SQLSetEnvAttr(henv, Attribute, Value, StringLength)  (0)\n\n#undef SQLAllocHandle\n#define SQLAllocHandle(type, parent, hndl) \\\n(     (type == SQL_HANDLE_STMT) ? SQLAllocStmt(parent, hndl) \\\n    : (type == SQL_HANDLE_ENV)  ? SQLAllocEnv(hndl) \\\n    :                             SQLAllocConnect(parent, hndl)  \\\n)\n\n#undef SQLFreeHandle\n#define SQLFreeHandle(type, hndl) \\\n(     (type == SQL_HANDLE_STMT) ? SQLFreeStmt(hndl, SQL_DROP) \\\n    : (type == SQL_HANDLE_ENV)  ? SQLFreeEnv(hndl) \\\n    :                             SQLFreeConnect(hndl)  \\\n)\n\n#undef SQLGetDiagRec\n#define SQLGetDiagRec(type, h, i, state, native, buffer, bufsize, reslen) \\\n        SQLError(  (type == SQL_HANDLE_ENV) ? h : NULL, \\\n                   (type == SQL_HANDLE_DBC) ? h : NULL, \\\n                   (type == SQL_HANDLE_STMT) ? h : NULL, \\\n                   state, native, buffer, bufsize, reslen)\n\n#undef SQLCloseCursor\n#define SQLCloseCursor(stmt) SQLFreeStmt(stmt, SQL_CLOSE)\n\n#undef SQLGetConnectAttr\n#define SQLGetConnectAttr(hdbc, fOption, ValuePtr, BufferLength, NULL) \\\n    SQLGetConnectOption(hdbc, fOption, ValuePtr)\n\n#undef SQLSetConnectAttr\n#define SQLSetConnectAttr(hdbc, fOption, ValuePtr, BufferLength) \\\n        SQLSetConnectOption(hdbc, fOption, (SQLUINTEGER) ValuePtr)\n\n#undef SQLSetStmtAttr\n#define SQLSetStmtAttr(hstmt, fOption, ValuePtr, BufferLength) (0); return APR_ENOTIMPL;\n\n#undef SQLEndTran\n#define SQLEndTran(hType, hdbc,type)  SQLTransact(henv, hdbc, type)\n\n#undef SQLFetchScroll\n#define SQLFetchScroll(stmt, orient, rownum) (0); return APR_ENOTIMPL;\n\n#define SQL_DESC_TYPE           SQL_COLUMN_TYPE\n#define SQL_DESC_CONCISE_TYPE   SQL_COLUMN_TYPE\n#define SQL_DESC_DISPLAY_SIZE   SQL_COLUMN_DISPLAY_SIZE\n#define SQL_DESC_OCTET_LENGTH   SQL_COLUMN_LENGTH\n#define SQL_DESC_UNSIGNED       SQL_COLUMN_UNSIGNED\n\n#undef SQLColAttribute\n#define SQLColAttribute(s, c, f, a, l, m, n) SQLColAttributes(s, c, f, a, l, m, n)\n\n#define SQL_ATTR_ACCESS_MODE            SQL_ACCESS_MODE\n#define SQL_ATTR_AUTOCOMMIT             SQL_AUTOCOMMIT\n#define SQL_ATTR_CONNECTION_TIMEOUT     113\n#define SQL_ATTR_CURRENT_CATALOG        SQL_CURRENT_QUALIFIER\n#define SQL_ATTR_DISCONNECT_BEHAVIOR    114\n#define SQL_ATTR_ENLIST_IN_DTC          1207\n#define SQL_ATTR_ENLIST_IN_XA           1208\n\n#define SQL_ATTR_CONNECTION_DEAD        1209\n#define SQL_CD_TRUE                     1L   /* Connection is closed/dead */\n#define SQL_CD_FALSE                    0L   /* Connection is open/available */\n\n#define SQL_ATTR_LOGIN_TIMEOUT          SQL_LOGIN_TIMEOUT\n#define SQL_ATTR_ODBC_CURSORS           SQL_ODBC_CURSORS\n#define SQL_ATTR_PACKET_SIZE            SQL_PACKET_SIZE\n#define SQL_ATTR_QUIET_MODE             SQL_QUIET_MODE\n#define SQL_ATTR_TRACE                  SQL_OPT_TRACE\n#define SQL_ATTR_TRACEFILE              SQL_OPT_TRACEFILE\n#define SQL_ATTR_TRANSLATE_LIB          SQL_TRANSLATE_DLL\n#define SQL_ATTR_TRANSLATE_OPTION       SQL_TRANSLATE_OPTION\n#define SQL_ATTR_TXN_ISOLATION          SQL_TXN_ISOLATION\n\n#define SQL_ATTR_CURSOR_SCROLLABLE -1\n\n#define SQL_C_SBIGINT (SQL_BIGINT+SQL_SIGNED_OFFSET)   /* SIGNED BIGINT */\n#define SQL_C_UBIGINT (SQL_BIGINT+SQL_UNSIGNED_OFFSET) /* UNSIGNED BIGINT */\n\n#define SQL_FALSE           0\n#define SQL_TRUE            1\n\n"
  },
  {
    "path": "third_party/include/aprutil/private/apr_dbm_private.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APR_DBM_PRIVATE_H\n#define APR_DBM_PRIVATE_H\n\n#include \"apr.h\"\n#include \"apr_errno.h\"\n#include \"apr_pools.h\"\n#include \"apr_dbm.h\"\n#include \"apr_file_io.h\"\n\n#include \"apu.h\"\n\n/* ### for now, include the DBM selection; this will go away once we start\n   ### building and linking all of the DBMs at once. */\n#include \"apu_select_dbm.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @internal */\n\n/**\n * Most DBM libraries take a POSIX mode for creating files.  Don't trust\n * the mode_t type, some platforms may not support it, int is safe.\n */\nAPU_DECLARE(int) apr_posix_perms2mode(apr_fileperms_t perm);\n\n/**\n * Structure to describe the operations of the DBM\n */\ntypedef struct {\n    /** The name of the DBM Type */\n    const char *name;\n\n    /** Open the DBM */\n    apr_status_t (*open)(apr_dbm_t **pdb, const char *pathname,\n                         apr_int32_t mode, apr_fileperms_t perm,\n                         apr_pool_t *pool);\n\n    /** Close the DBM */\n    void (*close)(apr_dbm_t *dbm);\n\n    /** Fetch a dbm record value by key */\n    apr_status_t (*fetch)(apr_dbm_t *dbm, apr_datum_t key,\n                                   apr_datum_t * pvalue);\n\n    /** Store a dbm record value by key */\n    apr_status_t (*store)(apr_dbm_t *dbm, apr_datum_t key, apr_datum_t value);\n\n    /** Delete a dbm record value by key */\n    apr_status_t (*del)(apr_dbm_t *dbm, apr_datum_t key);\n\n    /** Search for a key within the dbm */\n    int (*exists)(apr_dbm_t *dbm, apr_datum_t key);\n\n    /** Retrieve the first record key from a dbm */\n    apr_status_t (*firstkey)(apr_dbm_t *dbm, apr_datum_t * pkey);\n\n    /** Retrieve the next record key from a dbm */\n    apr_status_t (*nextkey)(apr_dbm_t *dbm, apr_datum_t * pkey);\n\n    /** Proactively toss any memory associated with the apr_datum_t. */\n    void (*freedatum)(apr_dbm_t *dbm, apr_datum_t data);\n\n    /** Get the names that the DBM will use for a given pathname. */\n    void (*getusednames)(apr_pool_t *pool,\n                         const char *pathname,\n                         const char **used1,\n                         const char **used2);\n\n} apr_dbm_type_t;\n\n\n/**\n * The actual DBM\n */\nstruct apr_dbm_t\n{ \n    /** Associated pool */\n    apr_pool_t *pool;\n\n    /** pointer to DB Implementation Specific data */\n    void *file;\n\n    /** Current integer error code */\n    int errcode;\n    /** Current string error code */\n    const char *errmsg;\n\n    /** the type of DBM */\n    const apr_dbm_type_t *type;\n};\n\n\n/* Declare all of the DBM provider tables */\nAPU_MODULE_DECLARE_DATA extern const apr_dbm_type_t apr_dbm_type_sdbm;\nAPU_MODULE_DECLARE_DATA extern const apr_dbm_type_t apr_dbm_type_gdbm;\nAPU_MODULE_DECLARE_DATA extern const apr_dbm_type_t apr_dbm_type_ndbm;\nAPU_MODULE_DECLARE_DATA extern const apr_dbm_type_t apr_dbm_type_db;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* APR_DBM_PRIVATE_H */\n"
  },
  {
    "path": "third_party/include/aprutil/private/apu_config.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* \n * Note: This is a Windows specific version of apu_config.hw. It is copied\n * as apu_config.h at the start of a Windows build.\n */\n\n#ifdef WIN32\n\n#ifndef APU_CONFIG_H\n#define APU_CONFIG_H\n\n/* Compile win32 with DSO support for .dll builds */\n#ifdef APU_DECLARE_STATIC\n#define APU_DSO_BUILD           0\n#else\n#define APU_DSO_BUILD           1\n#endif\n\n/* Presume a standard, modern (5.x) mysql sdk/\n#define HAVE_MY_GLOBAL_H        1\n\n/* my_sys.h is broken on VC/Win32, and apparently not required */\n/* #undef HAVE_MY_SYS_H           0 */\n\n/*\n * Windows does not have GDBM, and we always use the bundled (new) Expat\n */\n\n/* Define if you have the gdbm library (-lgdbm).  */\n/* #undef HAVE_LIBGDBM */\n\n/* define if Expat 1.0 or 1.1 was found */\n/* #undef APR_HAVE_OLD_EXPAT */\n\n\n#endif /* APU_CONFIG_H */\n#endif /* WIN32 */\n"
  },
  {
    "path": "third_party/include/aprutil/private/apu_config.hnw",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* \n * Note: This is a NetWare specific version of apu_config.hnw. It is copied\n * as apu_config.h at the start of a NetWare build.\n */\n\n#ifdef NETWARE\n\n#ifndef APU_CONFIG_H\n#define APU_CONFIG_H\n\n/* Always compile Netware with DSO support for .nlm builds */\n#define APU_DSO_BUILD           0\n\n/*\n * NetWare does not have GDBM, and we always use the bundled (new) Expat\n */\n\n/* Define if you have the gdbm library (-lgdbm). */\n/* #undef HAVE_LIBGDBM */\n\n/* define if Expat 1.0 or 1.1 was found */\n/* #undef APR_HAVE_OLD_EXPAT */\n\n/* NetWare uses its own ICONV implementation. */\n#define HAVE_ICONV_H 1\n\n/*\n * check for newer NDKs which use now correctly 'const char*' with iconv.\n */\n#include <ndkvers.h>\n#if (CURRENT_NDK_THRESHOLD >= 705110000)\n#define APU_ICONV_INBUF_CONST\n#endif\n\n#endif /* APU_CONFIG_H */\n#endif /* NETWARE */\n\n"
  },
  {
    "path": "third_party/include/aprutil/private/apu_config.hw",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* \n * Note: This is a Windows specific version of apu_config.hw. It is copied\n * as apu_config.h at the start of a Windows build.\n */\n\n#ifdef WIN32\n\n#ifndef APU_CONFIG_H\n#define APU_CONFIG_H\n\n/* Compile win32 with DSO support for .dll builds */\n#ifdef APU_DECLARE_STATIC\n#define APU_DSO_BUILD           0\n#else\n#define APU_DSO_BUILD           1\n#endif\n\n/* Presume a standard, modern (5.x) mysql sdk/\n#define HAVE_MY_GLOBAL_H        1\n\n/* my_sys.h is broken on VC/Win32, and apparently not required */\n/* #undef HAVE_MY_SYS_H           0 */\n\n/*\n * Windows does not have GDBM, and we always use the bundled (new) Expat\n */\n\n/* Define if you have the gdbm library (-lgdbm).  */\n/* #undef HAVE_LIBGDBM */\n\n/* define if Expat 1.0 or 1.1 was found */\n/* #undef APR_HAVE_OLD_EXPAT */\n\n\n#endif /* APU_CONFIG_H */\n#endif /* WIN32 */\n"
  },
  {
    "path": "third_party/include/aprutil/private/apu_internal.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"apr.h\"\n#include \"apr_dso.h\"\n#include \"apu.h\"\n\n#ifndef APU_INTERNAL_H\n#define APU_INTERNAL_H\n\n#if APU_DSO_BUILD\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* For modular dso loading, an internal interlock to allow us to\n * continue to initialize modules by multiple threads, the caller\n * of apu_dso_load must lock first, and not unlock until any init\n * finalization is complete.\n */\napr_status_t apu_dso_init(apr_pool_t *pool);\n\napr_status_t apu_dso_mutex_lock(void);\napr_status_t apu_dso_mutex_unlock(void);\n\napr_status_t apu_dso_load(apr_dso_handle_t **dso, apr_dso_handle_sym_t *dsoptr, const char *module,\n                          const char *modsym, apr_pool_t *pool);\n\n#if APR_HAS_LDAP\n\n/* For LDAP internal builds, wrap our LDAP namespace */\n\nstruct apr__ldap_dso_fntable {\n    int (*info)(apr_pool_t *pool, apr_ldap_err_t **result_err);\n    int (*init)(apr_pool_t *pool, LDAP **ldap, const char *hostname,\n                int portno, int secure, apr_ldap_err_t **result_err);\n    int (*ssl_init)(apr_pool_t *pool, const char *cert_auth_file,\n                    int cert_file_type, apr_ldap_err_t **result_err);\n    int (*ssl_deinit)(void);\n    int (*get_option)(apr_pool_t *pool, LDAP *ldap, int option,\n                      void *outvalue, apr_ldap_err_t **result_err);\n    int (*set_option)(apr_pool_t *pool, LDAP *ldap, int option,\n                      const void *invalue, apr_ldap_err_t **result_err);\n    apr_status_t (*rebind_init)(apr_pool_t *pool);\n    apr_status_t (*rebind_add)(apr_pool_t *pool, LDAP *ld,\n                               const char *bindDN, const char *bindPW);\n    apr_status_t (*rebind_remove)(LDAP *ld);\n};\n\n#endif /* APR_HAS_LDAP */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* APU_DSO_BUILD */\n\n#endif /* APU_INTERNAL_H */\n\n"
  },
  {
    "path": "third_party/include/aprutil/private/apu_select_dbm.h",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APU_SELECT_DBM_H\n#define APU_SELECT_DBM_H\n\n/*\n** The following macros control what features APRUTIL will use\n*/\n#define APU_USE_SDBM    1\n#define APU_USE_GDBM    0\n#define APU_USE_NDBM    0\n#define APU_USE_DB      0\n\n#endif\t/* !APU_SELECT_DBM_H */\n"
  },
  {
    "path": "third_party/include/aprutil/private/apu_select_dbm.h.in",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APU_SELECT_DBM_H\n#define APU_SELECT_DBM_H\n\n/*\n** The following macros control what features APRUTIL will use\n*/\n#define APU_USE_SDBM    @apu_use_sdbm@\n#define APU_USE_NDBM    @apu_use_ndbm@\n#define APU_USE_GDBM    @apu_use_gdbm@\n#define APU_USE_DB      @apu_use_db@\n\n#endif\t/* !APU_SELECT_DBM_H */\n"
  },
  {
    "path": "third_party/include/aprutil/private/apu_select_dbm.hw",
    "content": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef APU_SELECT_DBM_H\n#define APU_SELECT_DBM_H\n\n/*\n** The following macros control what features APRUTIL will use\n*/\n#define APU_USE_SDBM    1\n#define APU_USE_GDBM    0\n#define APU_USE_NDBM    0\n#define APU_USE_DB      0\n\n#endif\t/* !APU_SELECT_DBM_H */\n"
  },
  {
    "path": "third_party/include/curl/config-win32.h",
    "content": "#ifndef HEADER_CURL_CONFIG_WIN32_H\n#define HEADER_CURL_CONFIG_WIN32_H\n/***************************************************************************\n *                                  _   _ ____  _\n *  Project                     ___| | | |  _ \\| |\n *                             / __| | | | |_) | |\n *                            | (__| |_| |  _ <| |___\n *                             \\___|\\___/|_| \\_\\_____|\n *\n * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.\n *\n * This software is licensed as described in the file COPYING, which\n * you should have received as part of this distribution. The terms\n * are also available at http://curl.haxx.se/docs/copyright.html.\n *\n * You may opt to use, copy, modify, merge, publish, distribute and/or sell\n * copies of the Software, and permit persons to whom the Software is\n * furnished to do so, under the terms of the COPYING file.\n *\n * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY\n * KIND, either express or implied.\n *\n ***************************************************************************/\n\n/* ================================================================ */\n/*               Hand crafted config file for Windows               */\n/* ================================================================ */\n\n/* ---------------------------------------------------------------- */\n/*                          HEADER FILES                            */\n/* ---------------------------------------------------------------- */\n\n/* Define if you have the <arpa/inet.h> header file. */\n/* #define HAVE_ARPA_INET_H 1 */\n\n/* Define if you have the <assert.h> header file. */\n#define HAVE_ASSERT_H 1\n\n/* Define if you have the <crypto.h> header file. */\n/* #define HAVE_CRYPTO_H 1 */\n\n/* Define if you have the <errno.h> header file. */\n#define HAVE_ERRNO_H 1\n\n/* Define if you have the <err.h> header file. */\n/* #define HAVE_ERR_H 1 */\n\n/* Define if you have the <fcntl.h> header file. */\n#define HAVE_FCNTL_H 1\n\n/* Define if you have the <getopt.h> header file. */\n#if defined(__MINGW32__) || defined(__POCC__)\n#define HAVE_GETOPT_H 1\n#endif\n\n/* Define if you have the <io.h> header file. */\n#define HAVE_IO_H 1\n\n/* Define if you have the <limits.h> header file. */\n#define HAVE_LIMITS_H 1\n\n/* Define if you have the <locale.h> header file. */\n#define HAVE_LOCALE_H 1\n\n/* Define if you need <malloc.h> header even with <stdlib.h> header file. */\n#if !defined(__SALFORDC__) && !defined(__POCC__)\n#define NEED_MALLOC_H 1\n#endif\n\n/* Define if you have the <netdb.h> header file. */\n/* #define HAVE_NETDB_H 1 */\n\n/* Define if you have the <netinet/in.h> header file. */\n/* #define HAVE_NETINET_IN_H 1 */\n\n/* Define if you have the <process.h> header file. */\n#ifndef __SALFORDC__\n#define HAVE_PROCESS_H 1\n#endif\n\n/* Define if you have the <signal.h> header file. */\n#define HAVE_SIGNAL_H 1\n\n/* Define if you have the <sgtty.h> header file. */\n/* #define HAVE_SGTTY_H 1 */\n\n/* Define if you have the <ssl.h> header file. */\n/* #define HAVE_SSL_H 1 */\n\n/* Define if you have the <stdlib.h> header file. */\n#define HAVE_STDLIB_H 1\n\n/* Define if you have the <sys/param.h> header file. */\n/* #define HAVE_SYS_PARAM_H 1 */\n\n/* Define if you have the <sys/select.h> header file. */\n/* #define HAVE_SYS_SELECT_H 1 */\n\n/* Define if you have the <sys/socket.h> header file. */\n/* #define HAVE_SYS_SOCKET_H 1 */\n\n/* Define if you have the <sys/sockio.h> header file. */\n/* #define HAVE_SYS_SOCKIO_H 1 */\n\n/* Define if you have the <sys/stat.h> header file. */\n#define HAVE_SYS_STAT_H 1\n\n/* Define if you have the <sys/time.h> header file. */\n/* #define HAVE_SYS_TIME_H 1 */\n\n/* Define if you have the <sys/types.h> header file. */\n#define HAVE_SYS_TYPES_H 1\n\n/* Define if you have the <sys/utime.h> header file. */\n#ifndef __BORLANDC__\n#define HAVE_SYS_UTIME_H 1\n#endif\n\n/* Define if you have the <termio.h> header file. */\n/* #define HAVE_TERMIO_H 1 */\n\n/* Define if you have the <termios.h> header file. */\n/* #define HAVE_TERMIOS_H 1 */\n\n/* Define if you have the <time.h> header file. */\n#define HAVE_TIME_H 1\n\n/* Define if you have the <unistd.h> header file. */\n#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \\\n    defined(__POCC__)\n#define HAVE_UNISTD_H 1\n#endif\n\n/* Define if you have the <windows.h> header file. */\n#define HAVE_WINDOWS_H 1\n\n/* Define if you have the <winsock.h> header file. */\n#define HAVE_WINSOCK_H 1\n\n/* Define if you have the <winsock2.h> header file. */\n#ifndef __SALFORDC__\n#define HAVE_WINSOCK2_H 1\n#endif\n\n/* Define if you have the <ws2tcpip.h> header file. */\n#ifndef __SALFORDC__\n#define HAVE_WS2TCPIP_H 1\n#endif\n\n/* ---------------------------------------------------------------- */\n/*                        OTHER HEADER INFO                         */\n/* ---------------------------------------------------------------- */\n\n/* Define if sig_atomic_t is an available typedef. */\n#define HAVE_SIG_ATOMIC_T 1\n\n/* Define if you have the ANSI C header files. */\n#define STDC_HEADERS 1\n\n/* Define if you can safely include both <sys/time.h> and <time.h>. */\n/* #define TIME_WITH_SYS_TIME 1 */\n\n/* ---------------------------------------------------------------- */\n/*                             FUNCTIONS                            */\n/* ---------------------------------------------------------------- */\n\n/* Define if you have the closesocket function. */\n#define HAVE_CLOSESOCKET 1\n\n/* Define if you don't have vprintf but do have _doprnt. */\n/* #define HAVE_DOPRNT 1 */\n\n/* Define if you have the ftruncate function. */\n#define HAVE_FTRUNCATE 1\n\n/* Define if you have the gethostbyaddr function. */\n#define HAVE_GETHOSTBYADDR 1\n\n/* Define if you have the gethostname function. */\n#define HAVE_GETHOSTNAME 1\n\n/* Define if you have the getpass function. */\n/* #define HAVE_GETPASS 1 */\n\n/* Define if you have the getservbyname function. */\n#define HAVE_GETSERVBYNAME 1\n\n/* Define if you have the getprotobyname function. */\n#define HAVE_GETPROTOBYNAME\n\n/* Define if you have the gettimeofday function. */\n/* #define HAVE_GETTIMEOFDAY 1 */\n\n/* Define if you have the inet_addr function. */\n#define HAVE_INET_ADDR 1\n\n/* Define if you have the ioctlsocket function. */\n#define HAVE_IOCTLSOCKET 1\n\n/* Define if you have a working ioctlsocket FIONBIO function. */\n#define HAVE_IOCTLSOCKET_FIONBIO 1\n\n/* Define if you have the perror function. */\n#define HAVE_PERROR 1\n\n/* Define if you have the RAND_screen function when using SSL. */\n#define HAVE_RAND_SCREEN 1\n\n/* Define if you have the `RAND_status' function when using SSL. */\n#define HAVE_RAND_STATUS 1\n\n/* Define if you have the `CRYPTO_cleanup_all_ex_data' function.\n   This is present in OpenSSL versions after 0.9.6b */\n#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1\n\n/* Define if you have the select function. */\n#define HAVE_SELECT 1\n\n/* Define if you have the setlocale function. */\n#define HAVE_SETLOCALE 1\n\n/* Define if you have the setmode function. */\n#define HAVE_SETMODE 1\n\n/* Define if you have the setvbuf function. */\n#define HAVE_SETVBUF 1\n\n/* Define if you have the socket function. */\n#define HAVE_SOCKET 1\n\n/* Define if you have the strcasecmp function. */\n/* #define HAVE_STRCASECMP 1 */\n\n/* Define if you have the strdup function. */\n#define HAVE_STRDUP 1\n\n/* Define if you have the strftime function. */\n#define HAVE_STRFTIME 1\n\n/* Define if you have the stricmp function. */\n#define HAVE_STRICMP 1\n\n/* Define if you have the strncasecmp function. */\n/* #define HAVE_STRNCASECMP 1 */\n\n/* Define if you have the strnicmp function. */\n#define HAVE_STRNICMP 1\n\n/* Define if you have the strstr function. */\n#define HAVE_STRSTR 1\n\n/* Define if you have the strtoll function. */\n#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__POCC__)\n#define HAVE_STRTOLL 1\n#endif\n\n/* Define if you have the tcgetattr function. */\n/* #define HAVE_TCGETATTR 1 */\n\n/* Define if you have the tcsetattr function. */\n/* #define HAVE_TCSETATTR 1 */\n\n/* Define if you have the utime function. */\n#ifndef __BORLANDC__\n#define HAVE_UTIME 1\n#endif\n\n/* Define to the type qualifier of arg 1 for getnameinfo. */\n#define GETNAMEINFO_QUAL_ARG1 const\n\n/* Define to the type of arg 1 for getnameinfo. */\n#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *\n\n/* Define to the type of arg 2 for getnameinfo. */\n#define GETNAMEINFO_TYPE_ARG2 socklen_t\n\n/* Define to the type of args 4 and 6 for getnameinfo. */\n#define GETNAMEINFO_TYPE_ARG46 DWORD\n\n/* Define to the type of arg 7 for getnameinfo. */\n#define GETNAMEINFO_TYPE_ARG7 int\n\n/* Define if you have the recv function. */\n#define HAVE_RECV 1\n\n/* Define to the type of arg 1 for recv. */\n#define RECV_TYPE_ARG1 SOCKET\n\n/* Define to the type of arg 2 for recv. */\n#define RECV_TYPE_ARG2 char *\n\n/* Define to the type of arg 3 for recv. */\n#define RECV_TYPE_ARG3 int\n\n/* Define to the type of arg 4 for recv. */\n#define RECV_TYPE_ARG4 int\n\n/* Define to the function return type for recv. */\n#define RECV_TYPE_RETV int\n\n/* Define if you have the recvfrom function. */\n#define HAVE_RECVFROM 1\n\n/* Define to the type of arg 1 for recvfrom. */\n#define RECVFROM_TYPE_ARG1 SOCKET\n\n/* Define to the type pointed by arg 2 for recvfrom. */\n#define RECVFROM_TYPE_ARG2 char\n\n/* Define to the type of arg 3 for recvfrom. */\n#define RECVFROM_TYPE_ARG3 int\n\n/* Define to the type of arg 4 for recvfrom. */\n#define RECVFROM_TYPE_ARG4 int\n\n/* Define to the type pointed by arg 5 for recvfrom. */\n#define RECVFROM_TYPE_ARG5 struct sockaddr\n\n/* Define to the type pointed by arg 6 for recvfrom. */\n#define RECVFROM_TYPE_ARG6 int\n\n/* Define to the function return type for recvfrom. */\n#define RECVFROM_TYPE_RETV int\n\n/* Define if you have the send function. */\n#define HAVE_SEND 1\n\n/* Define to the type of arg 1 for send. */\n#define SEND_TYPE_ARG1 SOCKET\n\n/* Define to the type qualifier of arg 2 for send. */\n#define SEND_QUAL_ARG2 const\n\n/* Define to the type of arg 2 for send. */\n#define SEND_TYPE_ARG2 char *\n\n/* Define to the type of arg 3 for send. */\n#define SEND_TYPE_ARG3 int\n\n/* Define to the type of arg 4 for send. */\n#define SEND_TYPE_ARG4 int\n\n/* Define to the function return type for send. */\n#define SEND_TYPE_RETV int\n\n/* ---------------------------------------------------------------- */\n/*                       TYPEDEF REPLACEMENTS                       */\n/* ---------------------------------------------------------------- */\n\n/* Define if in_addr_t is not an available 'typedefed' type. */\n#define in_addr_t unsigned long\n\n/* Define to the return type of signal handlers (int or void). */\n#define RETSIGTYPE void\n\n/* Define if ssize_t is not an available 'typedefed' type. */\n#ifndef _SSIZE_T_DEFINED\n#  if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \\\n      defined(__POCC__) || \\\n      defined(__MINGW32__)\n#  elif defined(_WIN64)\n#    define _SSIZE_T_DEFINED\n#    define ssize_t __int64\n#  else\n#    define _SSIZE_T_DEFINED\n#    define ssize_t int\n#  endif\n#endif\n\n/* ---------------------------------------------------------------- */\n/*                            TYPE SIZES                            */\n/* ---------------------------------------------------------------- */\n\n/* Define to the size of `int', as computed by sizeof. */\n#define SIZEOF_INT 4\n\n/* Define to the size of `long double', as computed by sizeof. */\n#define SIZEOF_LONG_DOUBLE 16\n\n/* Define to the size of `long long', as computed by sizeof. */\n/* #define SIZEOF_LONG_LONG 8 */\n\n/* Define to the size of `short', as computed by sizeof. */\n#define SIZEOF_SHORT 2\n\n/* Define to the size of `size_t', as computed by sizeof. */\n#if defined(_WIN64)\n#  define SIZEOF_SIZE_T 8\n#else\n#  define SIZEOF_SIZE_T 4\n#endif\n\n/* ---------------------------------------------------------------- */\n/*                          STRUCT RELATED                          */\n/* ---------------------------------------------------------------- */\n\n/* Define if you have struct sockaddr_storage. */\n#if !defined(__SALFORDC__) && !defined(__BORLANDC__)\n#define HAVE_STRUCT_SOCKADDR_STORAGE 1\n#endif\n\n/* Define if you have struct timeval. */\n#define HAVE_STRUCT_TIMEVAL 1\n\n/* Define if struct sockaddr_in6 has the sin6_scope_id member. */\n#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1\n\n/* ---------------------------------------------------------------- */\n/*               BSD-style lwIP TCP/IP stack SPECIFIC               */\n/* ---------------------------------------------------------------- */\n\n/* Define to use BSD-style lwIP TCP/IP stack. */\n/* #define USE_LWIPSOCK 1 */\n\n#ifdef USE_LWIPSOCK\n#  undef USE_WINSOCK\n#  undef HAVE_WINSOCK_H\n#  undef HAVE_WINSOCK2_H\n#  undef HAVE_WS2TCPIP_H\n#  undef HAVE_ERRNO_H\n#  undef HAVE_GETHOSTNAME\n#  undef HAVE_GETNAMEINFO\n#  undef LWIP_POSIX_SOCKETS_IO_NAMES\n#  undef RECV_TYPE_ARG1\n#  undef RECV_TYPE_ARG3\n#  undef SEND_TYPE_ARG1\n#  undef SEND_TYPE_ARG3\n#  define HAVE_FREEADDRINFO\n#  define HAVE_GETADDRINFO\n#  define HAVE_GETHOSTBYNAME\n#  define HAVE_GETHOSTBYNAME_R\n#  define HAVE_GETHOSTBYNAME_R_6\n#  define LWIP_POSIX_SOCKETS_IO_NAMES 0\n#  define RECV_TYPE_ARG1 int\n#  define RECV_TYPE_ARG3 size_t\n#  define SEND_TYPE_ARG1 int\n#  define SEND_TYPE_ARG3 size_t\n#endif\n\n/* ---------------------------------------------------------------- */\n/*                        Watt-32 tcp/ip SPECIFIC                   */\n/* ---------------------------------------------------------------- */\n\n#ifdef USE_WATT32\n  #include <tcp.h>\n  #undef byte\n  #undef word\n  #undef USE_WINSOCK\n  #undef HAVE_WINSOCK_H\n  #undef HAVE_WINSOCK2_H\n  #undef HAVE_WS2TCPIP_H\n  #define HAVE_GETADDRINFO\n  #define HAVE_GETNAMEINFO\n  #define HAVE_SYS_IOCTL_H\n  #define HAVE_SYS_SOCKET_H\n  #define HAVE_NETINET_IN_H\n  #define HAVE_NETDB_H\n  #define HAVE_ARPA_INET_H\n  #define HAVE_FREEADDRINFO\n  #define SOCKET int\n#endif\n\n\n/* ---------------------------------------------------------------- */\n/*                        COMPILER SPECIFIC                         */\n/* ---------------------------------------------------------------- */\n\n/* Define to nothing if compiler does not support 'const' qualifier. */\n/* #define const */\n\n/* Define to nothing if compiler does not support 'volatile' qualifier. */\n/* #define volatile */\n\n/* Windows should not have HAVE_GMTIME_R defined */\n/* #undef HAVE_GMTIME_R */\n\n/* Define if the compiler supports C99 variadic macro style. */\n#if defined(_MSC_VER) && (_MSC_VER >= 1400)\n#define HAVE_VARIADIC_MACROS_C99 1\n#endif\n\n/* Define if the compiler supports the 'long long' data type. */\n#if defined(__MINGW32__) || defined(__WATCOMC__)\n#define HAVE_LONGLONG 1\n#endif\n\n/* Define to avoid VS2005 complaining about portable C functions. */\n#if defined(_MSC_VER) && (_MSC_VER >= 1400)\n#define _CRT_SECURE_NO_DEPRECATE 1\n#define _CRT_NONSTDC_NO_DEPRECATE 1\n#endif\n\n/* VS2005 and later dafault size for time_t is 64-bit, unless\n   _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */\n#if defined(_MSC_VER) && (_MSC_VER >= 1400)\n#  ifndef _USE_32BIT_TIME_T\n#    define SIZEOF_TIME_T 8\n#  else\n#    define SIZEOF_TIME_T 4\n#  endif\n#endif\n\n/* Officially, Microsoft's Windows SDK versions 6.X do not support Windows\n   2000 as a supported build target. VS2008 default installations provide\n   an embedded Windows SDK v6.0A along with the claim that Windows 2000 is\n   a valid build target for VS2008. Popular belief is that binaries built\n   with VS2008 using Windows SDK versions 6.X and Windows 2000 as a build\n   target are functional. */\n#if defined(_MSC_VER) && (_MSC_VER >= 1500)\n#  define VS2008_MIN_TARGET 0x0500\n#endif\n\n/* When no build target is specified VS2008 default build target is Windows\n   Vista, which leaves out even Winsows XP. If no build target has been given\n   for VS2008 we will target the minimum Officially supported build target,\n   which happens to be Windows XP. */\n#if defined(_MSC_VER) && (_MSC_VER >= 1500)\n#  define VS2008_DEF_TARGET  0x0501\n#endif\n\n/* VS2008 default target settings and minimum build target check. */\n#if defined(_MSC_VER) && (_MSC_VER >= 1500)\n#  ifndef _WIN32_WINNT\n#    define _WIN32_WINNT VS2008_DEF_TARGET\n#  endif\n#  ifndef WINVER\n#    define WINVER VS2008_DEF_TARGET\n#  endif\n#  if (_WIN32_WINNT < VS2008_MIN_TARGET) || (WINVER < VS2008_MIN_TARGET)\n#    error VS2008 does not support Windows build targets prior to Windows 2000\n#  endif\n#endif\n\n/* When no build target is specified Pelles C 5.00 and later default build\n   target is Windows Vista. We override default target to be Windows 2000. */\n#if defined(__POCC__) && (__POCC__ >= 500)\n#  ifndef _WIN32_WINNT\n#    define _WIN32_WINNT 0x0500\n#  endif\n#  ifndef WINVER\n#    define WINVER 0x0500\n#  endif\n#endif\n\n/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is\n   quite convoluted, compiler dependent and even build target dependent. */\n#if defined(HAVE_WS2TCPIP_H)\n#  if defined(__POCC__)\n#    define HAVE_FREEADDRINFO           1\n#    define HAVE_GETADDRINFO            1\n#    define HAVE_GETADDRINFO_THREADSAFE 1\n#    define HAVE_GETNAMEINFO            1\n#  elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)\n#    define HAVE_FREEADDRINFO           1\n#    define HAVE_GETADDRINFO            1\n#    define HAVE_GETADDRINFO_THREADSAFE 1\n#    define HAVE_GETNAMEINFO            1\n#  elif defined(_MSC_VER) && (_MSC_VER >= 1200)\n#    define HAVE_FREEADDRINFO           1\n#    define HAVE_GETADDRINFO            1\n#    define HAVE_GETADDRINFO_THREADSAFE 1\n#    define HAVE_GETNAMEINFO            1\n#  endif\n#endif\n\n#if defined(__POCC__)\n#  ifndef _MSC_VER\n#    error Microsoft extensions /Ze compiler option is required\n#  endif\n#  ifndef __POCC__OLDNAMES\n#    error Compatibility names /Go compiler option is required\n#  endif\n#endif\n\n/* ---------------------------------------------------------------- */\n/*                        LARGE FILE SUPPORT                        */\n/* ---------------------------------------------------------------- */\n\n#if defined(_MSC_VER) && !defined(_WIN32_WCE)\n#  if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)\n#    define USE_WIN32_LARGE_FILES\n#  else\n#    define USE_WIN32_SMALL_FILES\n#  endif\n#endif\n\n#if defined(__MINGW32__) && !defined(USE_WIN32_LARGE_FILES)\n#  define USE_WIN32_LARGE_FILES\n#endif\n\n#if defined(__WATCOMC__) && !defined(USE_WIN32_LARGE_FILES)\n#  define USE_WIN32_LARGE_FILES\n#endif\n\n#if defined(__POCC__)\n#  undef USE_WIN32_LARGE_FILES\n#endif\n\n#if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)\n#  define USE_WIN32_SMALL_FILES\n#endif\n\n/* ---------------------------------------------------------------- */\n/*                       DNS RESOLVER SPECIALTY                     */\n/* ---------------------------------------------------------------- */\n\n/*\n * Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS.\n */\n\n/* Define to enable c-ares asynchronous DNS lookups. */\n/* #define USE_ARES 1 */\n\n/* Default define to enable threaded asynchronous DNS lookups. */\n#if !defined(USE_SYNC_DNS) && !defined(USE_ARES) && \\\n    !defined(USE_THREADS_WIN32)\n#  define USE_THREADS_WIN32 1\n#endif\n\n#if defined(USE_ARES) && defined(USE_THREADS_WIN32)\n#  error \"Only one DNS lookup specialty may be defined at most\"\n#endif\n\n/* ---------------------------------------------------------------- */\n/*                           LDAP SUPPORT                           */\n/* ---------------------------------------------------------------- */\n\n#if defined(CURL_HAS_NOVELL_LDAPSDK) || defined(CURL_HAS_MOZILLA_LDAPSDK)\n#undef CURL_LDAP_WIN\n#define HAVE_LDAP_SSL_H 1\n#define HAVE_LDAP_URL_PARSE 1\n#elif defined(CURL_HAS_OPENLDAP_LDAPSDK)\n#undef CURL_LDAP_WIN\n#define HAVE_LDAP_URL_PARSE 1\n#else\n#undef HAVE_LDAP_URL_PARSE\n#define CURL_LDAP_WIN 1\n#endif\n\n#if defined(__WATCOMC__) && defined(CURL_LDAP_WIN)\n#if __WATCOMC__ < 1280\n#define WINBERAPI  __declspec(cdecl)\n#define WINLDAPAPI __declspec(cdecl)\n#endif\n#endif\n\n#if defined(__POCC__) && defined(CURL_LDAP_WIN)\n#  define CURL_DISABLE_LDAP 1\n#endif\n\n/* ---------------------------------------------------------------- */\n/*                       ADDITIONAL DEFINITIONS                     */\n/* ---------------------------------------------------------------- */\n\n/* Define cpu-machine-OS */\n#undef OS\n#if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */\n#define OS \"i386-pc-win32\"\n#elif defined(_M_X64) || defined(__x86_64__) /* x86_64 (MSVC >=2005 or gcc) */\n#define OS \"x86_64-pc-win32\"\n#elif defined(_M_IA64) /* Itanium */\n#define OS \"ia64-pc-win32\"\n#else\n#define OS \"unknown-pc-win32\"\n#endif\n\n/* Name of package */\n#define PACKAGE \"curl\"\n\n/* If you want to build curl with the built-in manual */\n#define USE_MANUAL 1\n\n#if defined(__POCC__) || (USE_IPV6)\n#  define ENABLE_IPV6 1\n#endif\n\n#endif /* HEADER_CURL_CONFIG_WIN32_H */\n"
  },
  {
    "path": "third_party/include/curl/curl.h",
    "content": "#ifndef __CURL_CURL_H\n#define __CURL_CURL_H\n/***************************************************************************\n *                                  _   _ ____  _\n *  Project                     ___| | | |  _ \\| |\n *                             / __| | | | |_) | |\n *                            | (__| |_| |  _ <| |___\n *                             \\___|\\___/|_| \\_\\_____|\n *\n * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\n *\n * This software is licensed as described in the file COPYING, which\n * you should have received as part of this distribution. The terms\n * are also available at http://curl.haxx.se/docs/copyright.html.\n *\n * You may opt to use, copy, modify, merge, publish, distribute and/or sell\n * copies of the Software, and permit persons to whom the Software is\n * furnished to do so, under the terms of the COPYING file.\n *\n * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY\n * KIND, either express or implied.\n *\n ***************************************************************************/\n\n/*\n * If you have libcurl problems, all docs and details are found here:\n *   http://curl.haxx.se/libcurl/\n *\n * curl-library mailing list subscription and unsubscription web interface:\n *   http://cool.haxx.se/mailman/listinfo/curl-library/\n */\n\n#include \"curlver.h\"         /* libcurl version defines   */\n#include \"curlbuild.h\"       /* libcurl build definitions */\n#include \"curlrules.h\"       /* libcurl rules enforcement */\n\n/*\n * Define WIN32 when build target is Win32 API\n */\n\n#if (defined(_WIN32) || defined(__WIN32__)) && \\\n     !defined(WIN32) && !defined(__SYMBIAN32__)\n#define WIN32\n#endif\n\n#include <stdio.h>\n#include <limits.h>\n\n#if defined(__FreeBSD__) && (__FreeBSD__ >= 2)\n/* Needed for __FreeBSD_version symbol definition */\n#include <osreldate.h>\n#endif\n\n/* The include stuff here below is mainly for time_t! */\n#include <sys/types.h>\n#include <time.h>\n\n#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)\n#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || defined(__LWIP_OPT_H__))\n/* The check above prevents the winsock2 inclusion if winsock.h already was\n   included, since they can't co-exist without problems */\n#include <winsock2.h>\n#include <ws2tcpip.h>\n#endif\n#endif\n\n/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish\n   libc5-based Linux systems. Only include it on systems that are known to\n   require it! */\n#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \\\n    defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \\\n    defined(ANDROID) || defined(__ANDROID__) || \\\n   (defined(__FreeBSD_version) && (__FreeBSD_version < 800000))\n#include <sys/select.h>\n#endif\n\n#if !defined(WIN32) && !defined(_WIN32_WCE)\n#include <sys/socket.h>\n#endif\n\n#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__)\n#include <sys/time.h>\n#endif\n\n#ifdef __BEOS__\n#include <support/SupportDefs.h>\n#endif\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef void CURL;\n\n/*\n * libcurl external API function linkage decorations.\n */\n\n#ifdef CURL_STATICLIB\n#  define CURL_EXTERN\n#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)\n#  if defined(BUILDING_LIBCURL)\n#    define CURL_EXTERN  __declspec(dllexport)\n#  else\n#    define CURL_EXTERN  __declspec(dllimport)\n#  endif\n#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)\n#  define CURL_EXTERN CURL_EXTERN_SYMBOL\n#else\n#  define CURL_EXTERN\n#endif\n\n#ifndef curl_socket_typedef\n/* socket typedef */\n#if defined(WIN32) && !defined(__LWIP_OPT_H__)\ntypedef SOCKET curl_socket_t;\n#define CURL_SOCKET_BAD INVALID_SOCKET\n#else\ntypedef int curl_socket_t;\n#define CURL_SOCKET_BAD -1\n#endif\n#define curl_socket_typedef\n#endif /* curl_socket_typedef */\n\nstruct curl_httppost {\n  struct curl_httppost *next;       /* next entry in the list */\n  char *name;                       /* pointer to allocated name */\n  long namelength;                  /* length of name length */\n  char *contents;                   /* pointer to allocated data contents */\n  long contentslength;              /* length of contents field */\n  char *buffer;                     /* pointer to allocated buffer contents */\n  long bufferlength;                /* length of buffer field */\n  char *contenttype;                /* Content-Type */\n  struct curl_slist* contentheader; /* list of extra headers for this form */\n  struct curl_httppost *more;       /* if one field name has more than one\n                                       file, this link should link to following\n                                       files */\n  long flags;                       /* as defined below */\n#define HTTPPOST_FILENAME (1<<0)    /* specified content is a file name */\n#define HTTPPOST_READFILE (1<<1)    /* specified content is a file name */\n#define HTTPPOST_PTRNAME (1<<2)     /* name is only stored pointer\n                                       do not free in formfree */\n#define HTTPPOST_PTRCONTENTS (1<<3) /* contents is only stored pointer\n                                       do not free in formfree */\n#define HTTPPOST_BUFFER (1<<4)      /* upload file from buffer */\n#define HTTPPOST_PTRBUFFER (1<<5)   /* upload file from pointer contents */\n#define HTTPPOST_CALLBACK (1<<6)    /* upload file contents by using the\n                                       regular read callback to get the data\n                                       and pass the given pointer as custom\n                                       pointer */\n\n  char *showfilename;               /* The file name to show. If not set, the\n                                       actual file name will be used (if this\n                                       is a file part) */\n  void *userp;                      /* custom pointer used for\n                                       HTTPPOST_CALLBACK posts */\n};\n\ntypedef int (*curl_progress_callback)(void *clientp,\n                                      double dltotal,\n                                      double dlnow,\n                                      double ultotal,\n                                      double ulnow);\n\n#ifndef CURL_MAX_WRITE_SIZE\n  /* Tests have proven that 20K is a very bad buffer size for uploads on\n     Windows, while 16K for some odd reason performed a lot better.\n     We do the ifndef check to allow this value to easier be changed at build\n     time for those who feel adventurous. The practical minimum is about\n     400 bytes since libcurl uses a buffer of this size as a scratch area\n     (unrelated to network send operations). */\n#define CURL_MAX_WRITE_SIZE 16384\n#endif\n\n#ifndef CURL_MAX_HTTP_HEADER\n/* The only reason to have a max limit for this is to avoid the risk of a bad\n   server feeding libcurl with a never-ending header that will cause reallocs\n   infinitely */\n#define CURL_MAX_HTTP_HEADER (100*1024)\n#endif\n\n/* This is a magic return code for the write callback that, when returned,\n   will signal libcurl to pause receiving on the current transfer. */\n#define CURL_WRITEFUNC_PAUSE 0x10000001\n\ntypedef size_t (*curl_write_callback)(char *buffer,\n                                      size_t size,\n                                      size_t nitems,\n                                      void *outstream);\n\n\n\n/* enumeration of file types */\ntypedef enum {\n  CURLFILETYPE_FILE = 0,\n  CURLFILETYPE_DIRECTORY,\n  CURLFILETYPE_SYMLINK,\n  CURLFILETYPE_DEVICE_BLOCK,\n  CURLFILETYPE_DEVICE_CHAR,\n  CURLFILETYPE_NAMEDPIPE,\n  CURLFILETYPE_SOCKET,\n  CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */\n\n  CURLFILETYPE_UNKNOWN /* should never occur */\n} curlfiletype;\n\n#define CURLFINFOFLAG_KNOWN_FILENAME    (1<<0)\n#define CURLFINFOFLAG_KNOWN_FILETYPE    (1<<1)\n#define CURLFINFOFLAG_KNOWN_TIME        (1<<2)\n#define CURLFINFOFLAG_KNOWN_PERM        (1<<3)\n#define CURLFINFOFLAG_KNOWN_UID         (1<<4)\n#define CURLFINFOFLAG_KNOWN_GID         (1<<5)\n#define CURLFINFOFLAG_KNOWN_SIZE        (1<<6)\n#define CURLFINFOFLAG_KNOWN_HLINKCOUNT  (1<<7)\n\n/* Content of this structure depends on information which is known and is\n   achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man\n   page for callbacks returning this structure -- some fields are mandatory,\n   some others are optional. The FLAG field has special meaning. */\nstruct curl_fileinfo {\n  char *filename;\n  curlfiletype filetype;\n  time_t time;\n  unsigned int perm;\n  int uid;\n  int gid;\n  curl_off_t size;\n  long int hardlinks;\n\n  struct {\n    /* If some of these fields is not NULL, it is a pointer to b_data. */\n    char *time;\n    char *perm;\n    char *user;\n    char *group;\n    char *target; /* pointer to the target filename of a symlink */\n  } strings;\n\n  unsigned int flags;\n\n  /* used internally */\n  char * b_data;\n  size_t b_size;\n  size_t b_used;\n};\n\n/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */\n#define CURL_CHUNK_BGN_FUNC_OK      0\n#define CURL_CHUNK_BGN_FUNC_FAIL    1 /* tell the lib to end the task */\n#define CURL_CHUNK_BGN_FUNC_SKIP    2 /* skip this chunk over */\n\n/* if splitting of data transfer is enabled, this callback is called before\n   download of an individual chunk started. Note that parameter \"remains\" works\n   only for FTP wildcard downloading (for now), otherwise is not used */\ntypedef long (*curl_chunk_bgn_callback)(const void *transfer_info,\n                                        void *ptr,\n                                        int remains);\n\n/* return codes for CURLOPT_CHUNK_END_FUNCTION */\n#define CURL_CHUNK_END_FUNC_OK      0\n#define CURL_CHUNK_END_FUNC_FAIL    1 /* tell the lib to end the task */\n\n/* If splitting of data transfer is enabled this callback is called after\n   download of an individual chunk finished.\n   Note! After this callback was set then it have to be called FOR ALL chunks.\n   Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC.\n   This is the reason why we don't need \"transfer_info\" parameter in this\n   callback and we are not interested in \"remains\" parameter too. */\ntypedef long (*curl_chunk_end_callback)(void *ptr);\n\n/* return codes for FNMATCHFUNCTION */\n#define CURL_FNMATCHFUNC_MATCH    0 /* string corresponds to the pattern */\n#define CURL_FNMATCHFUNC_NOMATCH  1 /* pattern doesn't match the string */\n#define CURL_FNMATCHFUNC_FAIL     2 /* an error occurred */\n\n/* callback type for wildcard downloading pattern matching. If the\n   string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */\ntypedef int (*curl_fnmatch_callback)(void *ptr,\n                                     const char *pattern,\n                                     const char *string);\n\n/* These are the return codes for the seek callbacks */\n#define CURL_SEEKFUNC_OK       0\n#define CURL_SEEKFUNC_FAIL     1 /* fail the entire transfer */\n#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so\n                                    libcurl might try other means instead */\ntypedef int (*curl_seek_callback)(void *instream,\n                                  curl_off_t offset,\n                                  int origin); /* 'whence' */\n\n/* This is a return code for the read callback that, when returned, will\n   signal libcurl to immediately abort the current transfer. */\n#define CURL_READFUNC_ABORT 0x10000000\n/* This is a return code for the read callback that, when returned, will\n   signal libcurl to pause sending data on the current transfer. */\n#define CURL_READFUNC_PAUSE 0x10000001\n\ntypedef size_t (*curl_read_callback)(char *buffer,\n                                      size_t size,\n                                      size_t nitems,\n                                      void *instream);\n\ntypedef enum  {\n  CURLSOCKTYPE_IPCXN,  /* socket created for a specific IP connection */\n  CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */\n  CURLSOCKTYPE_LAST    /* never use */\n} curlsocktype;\n\n/* The return code from the sockopt_callback can signal information back\n   to libcurl: */\n#define CURL_SOCKOPT_OK 0\n#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return\n                                CURLE_ABORTED_BY_CALLBACK */\n#define CURL_SOCKOPT_ALREADY_CONNECTED 2\n\ntypedef int (*curl_sockopt_callback)(void *clientp,\n                                     curl_socket_t curlfd,\n                                     curlsocktype purpose);\n\nstruct curl_sockaddr {\n  int family;\n  int socktype;\n  int protocol;\n  unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it\n                           turned really ugly and painful on the systems that\n                           lack this type */\n  struct sockaddr addr;\n};\n\ntypedef curl_socket_t\n(*curl_opensocket_callback)(void *clientp,\n                            curlsocktype purpose,\n                            struct curl_sockaddr *address);\n\ntypedef int\n(*curl_closesocket_callback)(void *clientp, curl_socket_t item);\n\ntypedef enum {\n  CURLIOE_OK,            /* I/O operation successful */\n  CURLIOE_UNKNOWNCMD,    /* command was unknown to callback */\n  CURLIOE_FAILRESTART,   /* failed to restart the read */\n  CURLIOE_LAST           /* never use */\n} curlioerr;\n\ntypedef enum  {\n  CURLIOCMD_NOP,         /* no operation */\n  CURLIOCMD_RESTARTREAD, /* restart the read stream from start */\n  CURLIOCMD_LAST         /* never use */\n} curliocmd;\n\ntypedef curlioerr (*curl_ioctl_callback)(CURL *handle,\n                                         int cmd,\n                                         void *clientp);\n\n/*\n * The following typedef's are signatures of malloc, free, realloc, strdup and\n * calloc respectively.  Function pointers of these types can be passed to the\n * curl_global_init_mem() function to set user defined memory management\n * callback routines.\n */\ntypedef void *(*curl_malloc_callback)(size_t size);\ntypedef void (*curl_free_callback)(void *ptr);\ntypedef void *(*curl_realloc_callback)(void *ptr, size_t size);\ntypedef char *(*curl_strdup_callback)(const char *str);\ntypedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);\n\n/* the kind of data that is passed to information_callback*/\ntypedef enum {\n  CURLINFO_TEXT = 0,\n  CURLINFO_HEADER_IN,    /* 1 */\n  CURLINFO_HEADER_OUT,   /* 2 */\n  CURLINFO_DATA_IN,      /* 3 */\n  CURLINFO_DATA_OUT,     /* 4 */\n  CURLINFO_SSL_DATA_IN,  /* 5 */\n  CURLINFO_SSL_DATA_OUT, /* 6 */\n  CURLINFO_END\n} curl_infotype;\n\ntypedef int (*curl_debug_callback)\n       (CURL *handle,      /* the handle/transfer this concerns */\n        curl_infotype type, /* what kind of data */\n        char *data,        /* points to the data */\n        size_t size,       /* size of the data pointed to */\n        void *userptr);    /* whatever the user please */\n\n/* All possible error codes from all sorts of curl functions. Future versions\n   may return other values, stay prepared.\n\n   Always add new return codes last. Never *EVER* remove any. The return\n   codes must remain the same!\n */\n\ntypedef enum {\n  CURLE_OK = 0,\n  CURLE_UNSUPPORTED_PROTOCOL,    /* 1 */\n  CURLE_FAILED_INIT,             /* 2 */\n  CURLE_URL_MALFORMAT,           /* 3 */\n  CURLE_NOT_BUILT_IN,            /* 4 - [was obsoleted in August 2007 for\n                                    7.17.0, reused in April 2011 for 7.21.5] */\n  CURLE_COULDNT_RESOLVE_PROXY,   /* 5 */\n  CURLE_COULDNT_RESOLVE_HOST,    /* 6 */\n  CURLE_COULDNT_CONNECT,         /* 7 */\n  CURLE_FTP_WEIRD_SERVER_REPLY,  /* 8 */\n  CURLE_REMOTE_ACCESS_DENIED,    /* 9 a service was denied by the server\n                                    due to lack of access - when login fails\n                                    this is not returned. */\n  CURLE_FTP_ACCEPT_FAILED,       /* 10 - [was obsoleted in April 2006 for\n                                    7.15.4, reused in Dec 2011 for 7.24.0]*/\n  CURLE_FTP_WEIRD_PASS_REPLY,    /* 11 */\n  CURLE_FTP_ACCEPT_TIMEOUT,      /* 12 - timeout occurred accepting server\n                                    [was obsoleted in August 2007 for 7.17.0,\n                                    reused in Dec 2011 for 7.24.0]*/\n  CURLE_FTP_WEIRD_PASV_REPLY,    /* 13 */\n  CURLE_FTP_WEIRD_227_FORMAT,    /* 14 */\n  CURLE_FTP_CANT_GET_HOST,       /* 15 */\n  CURLE_OBSOLETE16,              /* 16 - NOT USED */\n  CURLE_FTP_COULDNT_SET_TYPE,    /* 17 */\n  CURLE_PARTIAL_FILE,            /* 18 */\n  CURLE_FTP_COULDNT_RETR_FILE,   /* 19 */\n  CURLE_OBSOLETE20,              /* 20 - NOT USED */\n  CURLE_QUOTE_ERROR,             /* 21 - quote command failure */\n  CURLE_HTTP_RETURNED_ERROR,     /* 22 */\n  CURLE_WRITE_ERROR,             /* 23 */\n  CURLE_OBSOLETE24,              /* 24 - NOT USED */\n  CURLE_UPLOAD_FAILED,           /* 25 - failed upload \"command\" */\n  CURLE_READ_ERROR,              /* 26 - couldn't open/read from file */\n  CURLE_OUT_OF_MEMORY,           /* 27 */\n  /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error\n           instead of a memory allocation error if CURL_DOES_CONVERSIONS\n           is defined\n  */\n  CURLE_OPERATION_TIMEDOUT,      /* 28 - the timeout time was reached */\n  CURLE_OBSOLETE29,              /* 29 - NOT USED */\n  CURLE_FTP_PORT_FAILED,         /* 30 - FTP PORT operation failed */\n  CURLE_FTP_COULDNT_USE_REST,    /* 31 - the REST command failed */\n  CURLE_OBSOLETE32,              /* 32 - NOT USED */\n  CURLE_RANGE_ERROR,             /* 33 - RANGE \"command\" didn't work */\n  CURLE_HTTP_POST_ERROR,         /* 34 */\n  CURLE_SSL_CONNECT_ERROR,       /* 35 - wrong when connecting with SSL */\n  CURLE_BAD_DOWNLOAD_RESUME,     /* 36 - couldn't resume download */\n  CURLE_FILE_COULDNT_READ_FILE,  /* 37 */\n  CURLE_LDAP_CANNOT_BIND,        /* 38 */\n  CURLE_LDAP_SEARCH_FAILED,      /* 39 */\n  CURLE_OBSOLETE40,              /* 40 - NOT USED */\n  CURLE_FUNCTION_NOT_FOUND,      /* 41 */\n  CURLE_ABORTED_BY_CALLBACK,     /* 42 */\n  CURLE_BAD_FUNCTION_ARGUMENT,   /* 43 */\n  CURLE_OBSOLETE44,              /* 44 - NOT USED */\n  CURLE_INTERFACE_FAILED,        /* 45 - CURLOPT_INTERFACE failed */\n  CURLE_OBSOLETE46,              /* 46 - NOT USED */\n  CURLE_TOO_MANY_REDIRECTS ,     /* 47 - catch endless re-direct loops */\n  CURLE_UNKNOWN_OPTION,          /* 48 - User specified an unknown option */\n  CURLE_TELNET_OPTION_SYNTAX ,   /* 49 - Malformed telnet option */\n  CURLE_OBSOLETE50,              /* 50 - NOT USED */\n  CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint\n                                     wasn't verified fine */\n  CURLE_GOT_NOTHING,             /* 52 - when this is a specific error */\n  CURLE_SSL_ENGINE_NOTFOUND,     /* 53 - SSL crypto engine not found */\n  CURLE_SSL_ENGINE_SETFAILED,    /* 54 - can not set SSL crypto engine as\n                                    default */\n  CURLE_SEND_ERROR,              /* 55 - failed sending network data */\n  CURLE_RECV_ERROR,              /* 56 - failure in receiving network data */\n  CURLE_OBSOLETE57,              /* 57 - NOT IN USE */\n  CURLE_SSL_CERTPROBLEM,         /* 58 - problem with the local certificate */\n  CURLE_SSL_CIPHER,              /* 59 - couldn't use specified cipher */\n  CURLE_SSL_CACERT,              /* 60 - problem with the CA cert (path?) */\n  CURLE_BAD_CONTENT_ENCODING,    /* 61 - Unrecognized/bad encoding */\n  CURLE_LDAP_INVALID_URL,        /* 62 - Invalid LDAP URL */\n  CURLE_FILESIZE_EXCEEDED,       /* 63 - Maximum file size exceeded */\n  CURLE_USE_SSL_FAILED,          /* 64 - Requested FTP SSL level failed */\n  CURLE_SEND_FAIL_REWIND,        /* 65 - Sending the data requires a rewind\n                                    that failed */\n  CURLE_SSL_ENGINE_INITFAILED,   /* 66 - failed to initialise ENGINE */\n  CURLE_LOGIN_DENIED,            /* 67 - user, password or similar was not\n                                    accepted and we failed to login */\n  CURLE_TFTP_NOTFOUND,           /* 68 - file not found on server */\n  CURLE_TFTP_PERM,               /* 69 - permission problem on server */\n  CURLE_REMOTE_DISK_FULL,        /* 70 - out of disk space on server */\n  CURLE_TFTP_ILLEGAL,            /* 71 - Illegal TFTP operation */\n  CURLE_TFTP_UNKNOWNID,          /* 72 - Unknown transfer ID */\n  CURLE_REMOTE_FILE_EXISTS,      /* 73 - File already exists */\n  CURLE_TFTP_NOSUCHUSER,         /* 74 - No such user */\n  CURLE_CONV_FAILED,             /* 75 - conversion failed */\n  CURLE_CONV_REQD,               /* 76 - caller must register conversion\n                                    callbacks using curl_easy_setopt options\n                                    CURLOPT_CONV_FROM_NETWORK_FUNCTION,\n                                    CURLOPT_CONV_TO_NETWORK_FUNCTION, and\n                                    CURLOPT_CONV_FROM_UTF8_FUNCTION */\n  CURLE_SSL_CACERT_BADFILE,      /* 77 - could not load CACERT file, missing\n                                    or wrong format */\n  CURLE_REMOTE_FILE_NOT_FOUND,   /* 78 - remote file not found */\n  CURLE_SSH,                     /* 79 - error from the SSH layer, somewhat\n                                    generic so the error message will be of\n                                    interest when this has happened */\n\n  CURLE_SSL_SHUTDOWN_FAILED,     /* 80 - Failed to shut down the SSL\n                                    connection */\n  CURLE_AGAIN,                   /* 81 - socket is not ready for send/recv,\n                                    wait till it's ready and try again (Added\n                                    in 7.18.2) */\n  CURLE_SSL_CRL_BADFILE,         /* 82 - could not load CRL file, missing or\n                                    wrong format (Added in 7.19.0) */\n  CURLE_SSL_ISSUER_ERROR,        /* 83 - Issuer check failed.  (Added in\n                                    7.19.0) */\n  CURLE_FTP_PRET_FAILED,         /* 84 - a PRET command failed */\n  CURLE_RTSP_CSEQ_ERROR,         /* 85 - mismatch of RTSP CSeq numbers */\n  CURLE_RTSP_SESSION_ERROR,      /* 86 - mismatch of RTSP Session Ids */\n  CURLE_FTP_BAD_FILE_LIST,       /* 87 - unable to parse FTP file list */\n  CURLE_CHUNK_FAILED,            /* 88 - chunk callback reported error */\n  CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the\n                                    session will be queued */\n  CURL_LAST /* never use! */\n} CURLcode;\n\n#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all\n                          the obsolete stuff removed! */\n\n/* Previously obsoletes error codes re-used in 7.24.0 */\n#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED\n#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT\n\n/*  compatibility with older names */\n#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING\n\n/* The following were added in 7.21.5, April 2011 */\n#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION\n\n/* The following were added in 7.17.1 */\n/* These are scheduled to disappear by 2009 */\n#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION\n\n/* The following were added in 7.17.0 */\n/* These are scheduled to disappear by 2009 */\n#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */\n#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46\n#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44\n#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10\n#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16\n#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32\n#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29\n#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12\n#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20\n#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40\n#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24\n#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57\n#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN\n\n#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED\n#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE\n#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR\n#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL\n#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS\n#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR\n#define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED\n\n/* The following were added earlier */\n\n#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT\n\n#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR\n#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED\n#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED\n\n#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE\n#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME\n\n/* This was the error code 50 in 7.7.3 and a few earlier versions, this\n   is no longer used by libcurl but is instead #defined here only to not\n   make programs break */\n#define CURLE_ALREADY_COMPLETE 99999\n\n#endif /*!CURL_NO_OLDIES*/\n\n/* This prototype applies to all conversion callbacks */\ntypedef CURLcode (*curl_conv_callback)(char *buffer, size_t length);\n\ntypedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl,    /* easy handle */\n                                          void *ssl_ctx, /* actually an\n                                                            OpenSSL SSL_CTX */\n                                          void *userptr);\n\ntypedef enum {\n  CURLPROXY_HTTP = 0,   /* added in 7.10, new in 7.19.4 default is to use\n                           CONNECT HTTP/1.1 */\n  CURLPROXY_HTTP_1_0 = 1,   /* added in 7.19.4, force to use CONNECT\n                               HTTP/1.0  */\n  CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already\n                           in 7.10 */\n  CURLPROXY_SOCKS5 = 5, /* added in 7.10 */\n  CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */\n  CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the\n                                   host name rather than the IP address. added\n                                   in 7.18.0 */\n} curl_proxytype;  /* this enum was added in 7.10 */\n\n/*\n * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options:\n *\n * CURLAUTH_NONE         - No HTTP authentication\n * CURLAUTH_BASIC        - HTTP Basic authentication (default)\n * CURLAUTH_DIGEST       - HTTP Digest authentication\n * CURLAUTH_GSSNEGOTIATE - HTTP GSS-Negotiate authentication\n * CURLAUTH_NTLM         - HTTP NTLM authentication\n * CURLAUTH_DIGEST_IE    - HTTP Digest authentication with IE flavour\n * CURLAUTH_NTLM_WB      - HTTP NTLM authentication delegated to winbind helper\n * CURLAUTH_ONLY         - Use together with a single other type to force no\n *                         authentication or just that single type\n * CURLAUTH_ANY          - All fine types set\n * CURLAUTH_ANYSAFE      - All fine types except Basic\n */\n\n#define CURLAUTH_NONE         ((unsigned long)0)\n#define CURLAUTH_BASIC        (((unsigned long)1)<<0)\n#define CURLAUTH_DIGEST       (((unsigned long)1)<<1)\n#define CURLAUTH_GSSNEGOTIATE (((unsigned long)1)<<2)\n#define CURLAUTH_NTLM         (((unsigned long)1)<<3)\n#define CURLAUTH_DIGEST_IE    (((unsigned long)1)<<4)\n#define CURLAUTH_NTLM_WB      (((unsigned long)1)<<5)\n#define CURLAUTH_ONLY         (((unsigned long)1)<<31)\n#define CURLAUTH_ANY          (~CURLAUTH_DIGEST_IE)\n#define CURLAUTH_ANYSAFE      (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))\n\n#define CURLSSH_AUTH_ANY       ~0     /* all types supported by the server */\n#define CURLSSH_AUTH_NONE      0      /* none allowed, silly but complete */\n#define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */\n#define CURLSSH_AUTH_PASSWORD  (1<<1) /* password */\n#define CURLSSH_AUTH_HOST      (1<<2) /* host key files */\n#define CURLSSH_AUTH_KEYBOARD  (1<<3) /* keyboard interactive */\n#define CURLSSH_AUTH_AGENT     (1<<4) /* agent (ssh-agent, pageant...) */\n#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY\n\n#define CURLGSSAPI_DELEGATION_NONE        0      /* no delegation (default) */\n#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */\n#define CURLGSSAPI_DELEGATION_FLAG        (1<<1) /* delegate always */\n\n#define CURL_ERROR_SIZE 256\n\nstruct curl_khkey {\n  const char *key; /* points to a zero-terminated string encoded with base64\n                      if len is zero, otherwise to the \"raw\" data */\n  size_t len;\n  enum type {\n    CURLKHTYPE_UNKNOWN,\n    CURLKHTYPE_RSA1,\n    CURLKHTYPE_RSA,\n    CURLKHTYPE_DSS\n  } keytype;\n};\n\n/* this is the set of return values expected from the curl_sshkeycallback\n   callback */\nenum curl_khstat {\n  CURLKHSTAT_FINE_ADD_TO_FILE,\n  CURLKHSTAT_FINE,\n  CURLKHSTAT_REJECT, /* reject the connection, return an error */\n  CURLKHSTAT_DEFER,  /* do not accept it, but we can't answer right now so\n                        this causes a CURLE_DEFER error but otherwise the\n                        connection will be left intact etc */\n  CURLKHSTAT_LAST    /* not for use, only a marker for last-in-list */\n};\n\n/* this is the set of status codes pass in to the callback */\nenum curl_khmatch {\n  CURLKHMATCH_OK,       /* match */\n  CURLKHMATCH_MISMATCH, /* host found, key mismatch! */\n  CURLKHMATCH_MISSING,  /* no matching host/key found */\n  CURLKHMATCH_LAST      /* not for use, only a marker for last-in-list */\n};\n\ntypedef int\n  (*curl_sshkeycallback) (CURL *easy,     /* easy handle */\n                          const struct curl_khkey *knownkey, /* known */\n                          const struct curl_khkey *foundkey, /* found */\n                          enum curl_khmatch, /* libcurl's view on the keys */\n                          void *clientp); /* custom pointer passed from app */\n\n/* parameter for the CURLOPT_USE_SSL option */\ntypedef enum {\n  CURLUSESSL_NONE,    /* do not attempt to use SSL */\n  CURLUSESSL_TRY,     /* try using SSL, proceed anyway otherwise */\n  CURLUSESSL_CONTROL, /* SSL for the control connection or fail */\n  CURLUSESSL_ALL,     /* SSL for all communication or fail */\n  CURLUSESSL_LAST     /* not an option, never use */\n} curl_usessl;\n\n/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */\n\n/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the\n   name of improving interoperability with older servers. Some SSL libraries\n   have introduced work-arounds for this flaw but those work-arounds sometimes\n   make the SSL communication fail. To regain functionality with those broken\n   servers, a user can this way allow the vulnerability back. */\n#define CURLSSLOPT_ALLOW_BEAST (1<<0)\n\n#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all\n                          the obsolete stuff removed! */\n\n/* Backwards compatibility with older names */\n/* These are scheduled to disappear by 2009 */\n\n#define CURLFTPSSL_NONE CURLUSESSL_NONE\n#define CURLFTPSSL_TRY CURLUSESSL_TRY\n#define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL\n#define CURLFTPSSL_ALL CURLUSESSL_ALL\n#define CURLFTPSSL_LAST CURLUSESSL_LAST\n#define curl_ftpssl curl_usessl\n#endif /*!CURL_NO_OLDIES*/\n\n/* parameter for the CURLOPT_FTP_SSL_CCC option */\ntypedef enum {\n  CURLFTPSSL_CCC_NONE,    /* do not send CCC */\n  CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */\n  CURLFTPSSL_CCC_ACTIVE,  /* Initiate the shutdown */\n  CURLFTPSSL_CCC_LAST     /* not an option, never use */\n} curl_ftpccc;\n\n/* parameter for the CURLOPT_FTPSSLAUTH option */\ntypedef enum {\n  CURLFTPAUTH_DEFAULT, /* let libcurl decide */\n  CURLFTPAUTH_SSL,     /* use \"AUTH SSL\" */\n  CURLFTPAUTH_TLS,     /* use \"AUTH TLS\" */\n  CURLFTPAUTH_LAST /* not an option, never use */\n} curl_ftpauth;\n\n/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */\ntypedef enum {\n  CURLFTP_CREATE_DIR_NONE,  /* do NOT create missing dirs! */\n  CURLFTP_CREATE_DIR,       /* (FTP/SFTP) if CWD fails, try MKD and then CWD\n                               again if MKD succeeded, for SFTP this does\n                               similar magic */\n  CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD\n                               again even if MKD failed! */\n  CURLFTP_CREATE_DIR_LAST   /* not an option, never use */\n} curl_ftpcreatedir;\n\n/* parameter for the CURLOPT_FTP_FILEMETHOD option */\ntypedef enum {\n  CURLFTPMETHOD_DEFAULT,   /* let libcurl pick */\n  CURLFTPMETHOD_MULTICWD,  /* single CWD operation for each path part */\n  CURLFTPMETHOD_NOCWD,     /* no CWD at all */\n  CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */\n  CURLFTPMETHOD_LAST       /* not an option, never use */\n} curl_ftpmethod;\n\n/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */\n#define CURLPROTO_HTTP   (1<<0)\n#define CURLPROTO_HTTPS  (1<<1)\n#define CURLPROTO_FTP    (1<<2)\n#define CURLPROTO_FTPS   (1<<3)\n#define CURLPROTO_SCP    (1<<4)\n#define CURLPROTO_SFTP   (1<<5)\n#define CURLPROTO_TELNET (1<<6)\n#define CURLPROTO_LDAP   (1<<7)\n#define CURLPROTO_LDAPS  (1<<8)\n#define CURLPROTO_DICT   (1<<9)\n#define CURLPROTO_FILE   (1<<10)\n#define CURLPROTO_TFTP   (1<<11)\n#define CURLPROTO_IMAP   (1<<12)\n#define CURLPROTO_IMAPS  (1<<13)\n#define CURLPROTO_POP3   (1<<14)\n#define CURLPROTO_POP3S  (1<<15)\n#define CURLPROTO_SMTP   (1<<16)\n#define CURLPROTO_SMTPS  (1<<17)\n#define CURLPROTO_RTSP   (1<<18)\n#define CURLPROTO_RTMP   (1<<19)\n#define CURLPROTO_RTMPT  (1<<20)\n#define CURLPROTO_RTMPE  (1<<21)\n#define CURLPROTO_RTMPTE (1<<22)\n#define CURLPROTO_RTMPS  (1<<23)\n#define CURLPROTO_RTMPTS (1<<24)\n#define CURLPROTO_GOPHER (1<<25)\n#define CURLPROTO_ALL    (~0) /* enable everything */\n\n/* long may be 32 or 64 bits, but we should never depend on anything else\n   but 32 */\n#define CURLOPTTYPE_LONG          0\n#define CURLOPTTYPE_OBJECTPOINT   10000\n#define CURLOPTTYPE_FUNCTIONPOINT 20000\n#define CURLOPTTYPE_OFF_T         30000\n\n/* name is uppercase CURLOPT_<name>,\n   type is one of the defined CURLOPTTYPE_<type>\n   number is unique identifier */\n#ifdef CINIT\n#undef CINIT\n#endif\n\n#ifdef CURL_ISOCPP\n#define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu\n#else\n/* The macro \"##\" is ISO C, we assume pre-ISO C doesn't support it. */\n#define LONG          CURLOPTTYPE_LONG\n#define OBJECTPOINT   CURLOPTTYPE_OBJECTPOINT\n#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT\n#define OFF_T         CURLOPTTYPE_OFF_T\n#define CINIT(name,type,number) CURLOPT_/**/name = type + number\n#endif\n\n/*\n * This macro-mania below setups the CURLOPT_[what] enum, to be used with\n * curl_easy_setopt(). The first argument in the CINIT() macro is the [what]\n * word.\n */\n\ntypedef enum {\n  /* This is the FILE * or void * the regular output should be written to. */\n  CINIT(FILE, OBJECTPOINT, 1),\n\n  /* The full URL to get/put */\n  CINIT(URL,  OBJECTPOINT, 2),\n\n  /* Port number to connect to, if other than default. */\n  CINIT(PORT, LONG, 3),\n\n  /* Name of proxy to use. */\n  CINIT(PROXY, OBJECTPOINT, 4),\n\n  /* \"name:password\" to use when fetching. */\n  CINIT(USERPWD, OBJECTPOINT, 5),\n\n  /* \"name:password\" to use with proxy. */\n  CINIT(PROXYUSERPWD, OBJECTPOINT, 6),\n\n  /* Range to get, specified as an ASCII string. */\n  CINIT(RANGE, OBJECTPOINT, 7),\n\n  /* not used */\n\n  /* Specified file stream to upload from (use as input): */\n  CINIT(INFILE, OBJECTPOINT, 9),\n\n  /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE\n   * bytes big. If this is not used, error messages go to stderr instead: */\n  CINIT(ERRORBUFFER, OBJECTPOINT, 10),\n\n  /* Function that will be called to store the output (instead of fwrite). The\n   * parameters will use fwrite() syntax, make sure to follow them. */\n  CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11),\n\n  /* Function that will be called to read the input (instead of fread). The\n   * parameters will use fread() syntax, make sure to follow them. */\n  CINIT(READFUNCTION, FUNCTIONPOINT, 12),\n\n  /* Time-out the read operation after this amount of seconds */\n  CINIT(TIMEOUT, LONG, 13),\n\n  /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about\n   * how large the file being sent really is. That allows better error\n   * checking and better verifies that the upload was successful. -1 means\n   * unknown size.\n   *\n   * For large file support, there is also a _LARGE version of the key\n   * which takes an off_t type, allowing platforms with larger off_t\n   * sizes to handle larger files.  See below for INFILESIZE_LARGE.\n   */\n  CINIT(INFILESIZE, LONG, 14),\n\n  /* POST static input fields. */\n  CINIT(POSTFIELDS, OBJECTPOINT, 15),\n\n  /* Set the referrer page (needed by some CGIs) */\n  CINIT(REFERER, OBJECTPOINT, 16),\n\n  /* Set the FTP PORT string (interface name, named or numerical IP address)\n     Use i.e '-' to use default address. */\n  CINIT(FTPPORT, OBJECTPOINT, 17),\n\n  /* Set the User-Agent string (examined by some CGIs) */\n  CINIT(USERAGENT, OBJECTPOINT, 18),\n\n  /* If the download receives less than \"low speed limit\" bytes/second\n   * during \"low speed time\" seconds, the operations is aborted.\n   * You could i.e if you have a pretty high speed connection, abort if\n   * it is less than 2000 bytes/sec during 20 seconds.\n   */\n\n  /* Set the \"low speed limit\" */\n  CINIT(LOW_SPEED_LIMIT, LONG, 19),\n\n  /* Set the \"low speed time\" */\n  CINIT(LOW_SPEED_TIME, LONG, 20),\n\n  /* Set the continuation offset.\n   *\n   * Note there is also a _LARGE version of this key which uses\n   * off_t types, allowing for large file offsets on platforms which\n   * use larger-than-32-bit off_t's.  Look below for RESUME_FROM_LARGE.\n   */\n  CINIT(RESUME_FROM, LONG, 21),\n\n  /* Set cookie in request: */\n  CINIT(COOKIE, OBJECTPOINT, 22),\n\n  /* This points to a linked list of headers, struct curl_slist kind */\n  CINIT(HTTPHEADER, OBJECTPOINT, 23),\n\n  /* This points to a linked list of post entries, struct curl_httppost */\n  CINIT(HTTPPOST, OBJECTPOINT, 24),\n\n  /* name of the file keeping your private SSL-certificate */\n  CINIT(SSLCERT, OBJECTPOINT, 25),\n\n  /* password for the SSL or SSH private key */\n  CINIT(KEYPASSWD, OBJECTPOINT, 26),\n\n  /* send TYPE parameter? */\n  CINIT(CRLF, LONG, 27),\n\n  /* send linked-list of QUOTE commands */\n  CINIT(QUOTE, OBJECTPOINT, 28),\n\n  /* send FILE * or void * to store headers to, if you use a callback it\n     is simply passed to the callback unmodified */\n  CINIT(WRITEHEADER, OBJECTPOINT, 29),\n\n  /* point to a file to read the initial cookies from, also enables\n     \"cookie awareness\" */\n  CINIT(COOKIEFILE, OBJECTPOINT, 31),\n\n  /* What version to specifically try to use.\n     See CURL_SSLVERSION defines below. */\n  CINIT(SSLVERSION, LONG, 32),\n\n  /* What kind of HTTP time condition to use, see defines */\n  CINIT(TIMECONDITION, LONG, 33),\n\n  /* Time to use with the above condition. Specified in number of seconds\n     since 1 Jan 1970 */\n  CINIT(TIMEVALUE, LONG, 34),\n\n  /* 35 = OBSOLETE */\n\n  /* Custom request, for customizing the get command like\n     HTTP: DELETE, TRACE and others\n     FTP: to use a different list command\n     */\n  CINIT(CUSTOMREQUEST, OBJECTPOINT, 36),\n\n  /* HTTP request, for odd commands like DELETE, TRACE and others */\n  CINIT(STDERR, OBJECTPOINT, 37),\n\n  /* 38 is not used */\n\n  /* send linked-list of post-transfer QUOTE commands */\n  CINIT(POSTQUOTE, OBJECTPOINT, 39),\n\n  CINIT(WRITEINFO, OBJECTPOINT, 40), /* DEPRECATED, do not use! */\n\n  CINIT(VERBOSE, LONG, 41),      /* talk a lot */\n  CINIT(HEADER, LONG, 42),       /* throw the header out too */\n  CINIT(NOPROGRESS, LONG, 43),   /* shut off the progress meter */\n  CINIT(NOBODY, LONG, 44),       /* use HEAD to get http document */\n  CINIT(FAILONERROR, LONG, 45),  /* no output on http error codes >= 300 */\n  CINIT(UPLOAD, LONG, 46),       /* this is an upload */\n  CINIT(POST, LONG, 47),         /* HTTP POST method */\n  CINIT(DIRLISTONLY, LONG, 48),  /* bare names when listing directories */\n\n  CINIT(APPEND, LONG, 50),       /* Append instead of overwrite on upload! */\n\n  /* Specify whether to read the user+password from the .netrc or the URL.\n   * This must be one of the CURL_NETRC_* enums below. */\n  CINIT(NETRC, LONG, 51),\n\n  CINIT(FOLLOWLOCATION, LONG, 52),  /* use Location: Luke! */\n\n  CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */\n  CINIT(PUT, LONG, 54),          /* HTTP PUT */\n\n  /* 55 = OBSOLETE */\n\n  /* Function that will be called instead of the internal progress display\n   * function. This function should be defined as the curl_progress_callback\n   * prototype defines. */\n  CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56),\n\n  /* Data passed to the progress callback */\n  CINIT(PROGRESSDATA, OBJECTPOINT, 57),\n\n  /* We want the referrer field set automatically when following locations */\n  CINIT(AUTOREFERER, LONG, 58),\n\n  /* Port of the proxy, can be set in the proxy string as well with:\n     \"[host]:[port]\" */\n  CINIT(PROXYPORT, LONG, 59),\n\n  /* size of the POST input data, if strlen() is not good to use */\n  CINIT(POSTFIELDSIZE, LONG, 60),\n\n  /* tunnel non-http operations through a HTTP proxy */\n  CINIT(HTTPPROXYTUNNEL, LONG, 61),\n\n  /* Set the interface string to use as outgoing network interface */\n  CINIT(INTERFACE, OBJECTPOINT, 62),\n\n  /* Set the krb4/5 security level, this also enables krb4/5 awareness.  This\n   * is a string, 'clear', 'safe', 'confidential' or 'private'.  If the string\n   * is set but doesn't match one of these, 'private' will be used.  */\n  CINIT(KRBLEVEL, OBJECTPOINT, 63),\n\n  /* Set if we should verify the peer in ssl handshake, set 1 to verify. */\n  CINIT(SSL_VERIFYPEER, LONG, 64),\n\n  /* The CApath or CAfile used to validate the peer certificate\n     this option is used only if SSL_VERIFYPEER is true */\n  CINIT(CAINFO, OBJECTPOINT, 65),\n\n  /* 66 = OBSOLETE */\n  /* 67 = OBSOLETE */\n\n  /* Maximum number of http redirects to follow */\n  CINIT(MAXREDIRS, LONG, 68),\n\n  /* Pass a long set to 1 to get the date of the requested document (if\n     possible)! Pass a zero to shut it off. */\n  CINIT(FILETIME, LONG, 69),\n\n  /* This points to a linked list of telnet options */\n  CINIT(TELNETOPTIONS, OBJECTPOINT, 70),\n\n  /* Max amount of cached alive connections */\n  CINIT(MAXCONNECTS, LONG, 71),\n\n  CINIT(CLOSEPOLICY, LONG, 72), /* DEPRECATED, do not use! */\n\n  /* 73 = OBSOLETE */\n\n  /* Set to explicitly use a new connection for the upcoming transfer.\n     Do not use this unless you're absolutely sure of this, as it makes the\n     operation slower and is less friendly for the network. */\n  CINIT(FRESH_CONNECT, LONG, 74),\n\n  /* Set to explicitly forbid the upcoming transfer's connection to be re-used\n     when done. Do not use this unless you're absolutely sure of this, as it\n     makes the operation slower and is less friendly for the network. */\n  CINIT(FORBID_REUSE, LONG, 75),\n\n  /* Set to a file name that contains random data for libcurl to use to\n     seed the random engine when doing SSL connects. */\n  CINIT(RANDOM_FILE, OBJECTPOINT, 76),\n\n  /* Set to the Entropy Gathering Daemon socket pathname */\n  CINIT(EGDSOCKET, OBJECTPOINT, 77),\n\n  /* Time-out connect operations after this amount of seconds, if connects are\n     OK within this time, then fine... This only aborts the connect phase. */\n  CINIT(CONNECTTIMEOUT, LONG, 78),\n\n  /* Function that will be called to store headers (instead of fwrite). The\n   * parameters will use fwrite() syntax, make sure to follow them. */\n  CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79),\n\n  /* Set this to force the HTTP request to get back to GET. Only really usable\n     if POST, PUT or a custom request have been used first.\n   */\n  CINIT(HTTPGET, LONG, 80),\n\n  /* Set if we should verify the Common name from the peer certificate in ssl\n   * handshake, set 1 to check existence, 2 to ensure that it matches the\n   * provided hostname. */\n  CINIT(SSL_VERIFYHOST, LONG, 81),\n\n  /* Specify which file name to write all known cookies in after completed\n     operation. Set file name to \"-\" (dash) to make it go to stdout. */\n  CINIT(COOKIEJAR, OBJECTPOINT, 82),\n\n  /* Specify which SSL ciphers to use */\n  CINIT(SSL_CIPHER_LIST, OBJECTPOINT, 83),\n\n  /* Specify which HTTP version to use! This must be set to one of the\n     CURL_HTTP_VERSION* enums set below. */\n  CINIT(HTTP_VERSION, LONG, 84),\n\n  /* Specifically switch on or off the FTP engine's use of the EPSV command. By\n     default, that one will always be attempted before the more traditional\n     PASV command. */\n  CINIT(FTP_USE_EPSV, LONG, 85),\n\n  /* type of the file keeping your SSL-certificate (\"DER\", \"PEM\", \"ENG\") */\n  CINIT(SSLCERTTYPE, OBJECTPOINT, 86),\n\n  /* name of the file keeping your private SSL-key */\n  CINIT(SSLKEY, OBJECTPOINT, 87),\n\n  /* type of the file keeping your private SSL-key (\"DER\", \"PEM\", \"ENG\") */\n  CINIT(SSLKEYTYPE, OBJECTPOINT, 88),\n\n  /* crypto engine for the SSL-sub system */\n  CINIT(SSLENGINE, OBJECTPOINT, 89),\n\n  /* set the crypto engine for the SSL-sub system as default\n     the param has no meaning...\n   */\n  CINIT(SSLENGINE_DEFAULT, LONG, 90),\n\n  /* Non-zero value means to use the global dns cache */\n  CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */\n\n  /* DNS cache timeout */\n  CINIT(DNS_CACHE_TIMEOUT, LONG, 92),\n\n  /* send linked-list of pre-transfer QUOTE commands */\n  CINIT(PREQUOTE, OBJECTPOINT, 93),\n\n  /* set the debug function */\n  CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94),\n\n  /* set the data for the debug function */\n  CINIT(DEBUGDATA, OBJECTPOINT, 95),\n\n  /* mark this as start of a cookie session */\n  CINIT(COOKIESESSION, LONG, 96),\n\n  /* The CApath directory used to validate the peer certificate\n     this option is used only if SSL_VERIFYPEER is true */\n  CINIT(CAPATH, OBJECTPOINT, 97),\n\n  /* Instruct libcurl to use a smaller receive buffer */\n  CINIT(BUFFERSIZE, LONG, 98),\n\n  /* Instruct libcurl to not use any signal/alarm handlers, even when using\n     timeouts. This option is useful for multi-threaded applications.\n     See libcurl-the-guide for more background information. */\n  CINIT(NOSIGNAL, LONG, 99),\n\n  /* Provide a CURLShare for mutexing non-ts data */\n  CINIT(SHARE, OBJECTPOINT, 100),\n\n  /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),\n     CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */\n  CINIT(PROXYTYPE, LONG, 101),\n\n  /* Set the Accept-Encoding string. Use this to tell a server you would like\n     the response to be compressed. Before 7.21.6, this was known as\n     CURLOPT_ENCODING */\n  CINIT(ACCEPT_ENCODING, OBJECTPOINT, 102),\n\n  /* Set pointer to private data */\n  CINIT(PRIVATE, OBJECTPOINT, 103),\n\n  /* Set aliases for HTTP 200 in the HTTP Response header */\n  CINIT(HTTP200ALIASES, OBJECTPOINT, 104),\n\n  /* Continue to send authentication (user+password) when following locations,\n     even when hostname changed. This can potentially send off the name\n     and password to whatever host the server decides. */\n  CINIT(UNRESTRICTED_AUTH, LONG, 105),\n\n  /* Specifically switch on or off the FTP engine's use of the EPRT command (\n     it also disables the LPRT attempt). By default, those ones will always be\n     attempted before the good old traditional PORT command. */\n  CINIT(FTP_USE_EPRT, LONG, 106),\n\n  /* Set this to a bitmask value to enable the particular authentications\n     methods you like. Use this in combination with CURLOPT_USERPWD.\n     Note that setting multiple bits may cause extra network round-trips. */\n  CINIT(HTTPAUTH, LONG, 107),\n\n  /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx\n     in second argument. The function must be matching the\n     curl_ssl_ctx_callback proto. */\n  CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108),\n\n  /* Set the userdata for the ssl context callback function's third\n     argument */\n  CINIT(SSL_CTX_DATA, OBJECTPOINT, 109),\n\n  /* FTP Option that causes missing dirs to be created on the remote server.\n     In 7.19.4 we introduced the convenience enums for this option using the\n     CURLFTP_CREATE_DIR prefix.\n  */\n  CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110),\n\n  /* Set this to a bitmask value to enable the particular authentications\n     methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.\n     Note that setting multiple bits may cause extra network round-trips. */\n  CINIT(PROXYAUTH, LONG, 111),\n\n  /* FTP option that changes the timeout, in seconds, associated with\n     getting a response.  This is different from transfer timeout time and\n     essentially places a demand on the FTP server to acknowledge commands\n     in a timely manner. */\n  CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112),\n#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT\n\n  /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to\n     tell libcurl to resolve names to those IP versions only. This only has\n     affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */\n  CINIT(IPRESOLVE, LONG, 113),\n\n  /* Set this option to limit the size of a file that will be downloaded from\n     an HTTP or FTP server.\n\n     Note there is also _LARGE version which adds large file support for\n     platforms which have larger off_t sizes.  See MAXFILESIZE_LARGE below. */\n  CINIT(MAXFILESIZE, LONG, 114),\n\n  /* See the comment for INFILESIZE above, but in short, specifies\n   * the size of the file being uploaded.  -1 means unknown.\n   */\n  CINIT(INFILESIZE_LARGE, OFF_T, 115),\n\n  /* Sets the continuation offset.  There is also a LONG version of this;\n   * look above for RESUME_FROM.\n   */\n  CINIT(RESUME_FROM_LARGE, OFF_T, 116),\n\n  /* Sets the maximum size of data that will be downloaded from\n   * an HTTP or FTP server.  See MAXFILESIZE above for the LONG version.\n   */\n  CINIT(MAXFILESIZE_LARGE, OFF_T, 117),\n\n  /* Set this option to the file name of your .netrc file you want libcurl\n     to parse (using the CURLOPT_NETRC option). If not set, libcurl will do\n     a poor attempt to find the user's home directory and check for a .netrc\n     file in there. */\n  CINIT(NETRC_FILE, OBJECTPOINT, 118),\n\n  /* Enable SSL/TLS for FTP, pick one of:\n     CURLUSESSL_TRY     - try using SSL, proceed anyway otherwise\n     CURLUSESSL_CONTROL - SSL for the control connection or fail\n     CURLUSESSL_ALL     - SSL for all communication or fail\n  */\n  CINIT(USE_SSL, LONG, 119),\n\n  /* The _LARGE version of the standard POSTFIELDSIZE option */\n  CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),\n\n  /* Enable/disable the TCP Nagle algorithm */\n  CINIT(TCP_NODELAY, LONG, 121),\n\n  /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */\n  /* 123 OBSOLETE. Gone in 7.16.0 */\n  /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */\n  /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */\n  /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */\n  /* 127 OBSOLETE. Gone in 7.16.0 */\n  /* 128 OBSOLETE. Gone in 7.16.0 */\n\n  /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option\n     can be used to change libcurl's default action which is to first try\n     \"AUTH SSL\" and then \"AUTH TLS\" in this order, and proceed when a OK\n     response has been received.\n\n     Available parameters are:\n     CURLFTPAUTH_DEFAULT - let libcurl decide\n     CURLFTPAUTH_SSL     - try \"AUTH SSL\" first, then TLS\n     CURLFTPAUTH_TLS     - try \"AUTH TLS\" first, then SSL\n  */\n  CINIT(FTPSSLAUTH, LONG, 129),\n\n  CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130),\n  CINIT(IOCTLDATA, OBJECTPOINT, 131),\n\n  /* 132 OBSOLETE. Gone in 7.16.0 */\n  /* 133 OBSOLETE. Gone in 7.16.0 */\n\n  /* zero terminated string for pass on to the FTP server when asked for\n     \"account\" info */\n  CINIT(FTP_ACCOUNT, OBJECTPOINT, 134),\n\n  /* feed cookies into cookie engine */\n  CINIT(COOKIELIST, OBJECTPOINT, 135),\n\n  /* ignore Content-Length */\n  CINIT(IGNORE_CONTENT_LENGTH, LONG, 136),\n\n  /* Set to non-zero to skip the IP address received in a 227 PASV FTP server\n     response. Typically used for FTP-SSL purposes but is not restricted to\n     that. libcurl will then instead use the same IP address it used for the\n     control connection. */\n  CINIT(FTP_SKIP_PASV_IP, LONG, 137),\n\n  /* Select \"file method\" to use when doing FTP, see the curl_ftpmethod\n     above. */\n  CINIT(FTP_FILEMETHOD, LONG, 138),\n\n  /* Local port number to bind the socket to */\n  CINIT(LOCALPORT, LONG, 139),\n\n  /* Number of ports to try, including the first one set with LOCALPORT.\n     Thus, setting it to 1 will make no additional attempts but the first.\n  */\n  CINIT(LOCALPORTRANGE, LONG, 140),\n\n  /* no transfer, set up connection and let application use the socket by\n     extracting it with CURLINFO_LASTSOCKET */\n  CINIT(CONNECT_ONLY, LONG, 141),\n\n  /* Function that will be called to convert from the\n     network encoding (instead of using the iconv calls in libcurl) */\n  CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142),\n\n  /* Function that will be called to convert to the\n     network encoding (instead of using the iconv calls in libcurl) */\n  CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143),\n\n  /* Function that will be called to convert from UTF8\n     (instead of using the iconv calls in libcurl)\n     Note that this is used only for SSL certificate processing */\n  CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144),\n\n  /* if the connection proceeds too quickly then need to slow it down */\n  /* limit-rate: maximum number of bytes per second to send or receive */\n  CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145),\n  CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146),\n\n  /* Pointer to command string to send if USER/PASS fails. */\n  CINIT(FTP_ALTERNATIVE_TO_USER, OBJECTPOINT, 147),\n\n  /* callback function for setting socket options */\n  CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148),\n  CINIT(SOCKOPTDATA, OBJECTPOINT, 149),\n\n  /* set to 0 to disable session ID re-use for this transfer, default is\n     enabled (== 1) */\n  CINIT(SSL_SESSIONID_CACHE, LONG, 150),\n\n  /* allowed SSH authentication methods */\n  CINIT(SSH_AUTH_TYPES, LONG, 151),\n\n  /* Used by scp/sftp to do public/private key authentication */\n  CINIT(SSH_PUBLIC_KEYFILE, OBJECTPOINT, 152),\n  CINIT(SSH_PRIVATE_KEYFILE, OBJECTPOINT, 153),\n\n  /* Send CCC (Clear Command Channel) after authentication */\n  CINIT(FTP_SSL_CCC, LONG, 154),\n\n  /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */\n  CINIT(TIMEOUT_MS, LONG, 155),\n  CINIT(CONNECTTIMEOUT_MS, LONG, 156),\n\n  /* set to zero to disable the libcurl's decoding and thus pass the raw body\n     data to the application even when it is encoded/compressed */\n  CINIT(HTTP_TRANSFER_DECODING, LONG, 157),\n  CINIT(HTTP_CONTENT_DECODING, LONG, 158),\n\n  /* Permission used when creating new files and directories on the remote\n     server for protocols that support it, SFTP/SCP/FILE */\n  CINIT(NEW_FILE_PERMS, LONG, 159),\n  CINIT(NEW_DIRECTORY_PERMS, LONG, 160),\n\n  /* Set the behaviour of POST when redirecting. Values must be set to one\n     of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */\n  CINIT(POSTREDIR, LONG, 161),\n\n  /* used by scp/sftp to verify the host's public key */\n  CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162),\n\n  /* Callback function for opening socket (instead of socket(2)). Optionally,\n     callback is able change the address or refuse to connect returning\n     CURL_SOCKET_BAD.  The callback should have type\n     curl_opensocket_callback */\n  CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163),\n  CINIT(OPENSOCKETDATA, OBJECTPOINT, 164),\n\n  /* POST volatile input fields. */\n  CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165),\n\n  /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */\n  CINIT(PROXY_TRANSFER_MODE, LONG, 166),\n\n  /* Callback function for seeking in the input stream */\n  CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167),\n  CINIT(SEEKDATA, OBJECTPOINT, 168),\n\n  /* CRL file */\n  CINIT(CRLFILE, OBJECTPOINT, 169),\n\n  /* Issuer certificate */\n  CINIT(ISSUERCERT, OBJECTPOINT, 170),\n\n  /* (IPv6) Address scope */\n  CINIT(ADDRESS_SCOPE, LONG, 171),\n\n  /* Collect certificate chain info and allow it to get retrievable with\n     CURLINFO_CERTINFO after the transfer is complete. (Unfortunately) only\n     working with OpenSSL-powered builds. */\n  CINIT(CERTINFO, LONG, 172),\n\n  /* \"name\" and \"pwd\" to use when fetching. */\n  CINIT(USERNAME, OBJECTPOINT, 173),\n  CINIT(PASSWORD, OBJECTPOINT, 174),\n\n    /* \"name\" and \"pwd\" to use with Proxy when fetching. */\n  CINIT(PROXYUSERNAME, OBJECTPOINT, 175),\n  CINIT(PROXYPASSWORD, OBJECTPOINT, 176),\n\n  /* Comma separated list of hostnames defining no-proxy zones. These should\n     match both hostnames directly, and hostnames within a domain. For\n     example, local.com will match local.com and www.local.com, but NOT\n     notlocal.com or www.notlocal.com. For compatibility with other\n     implementations of this, .local.com will be considered to be the same as\n     local.com. A single * is the only valid wildcard, and effectively\n     disables the use of proxy. */\n  CINIT(NOPROXY, OBJECTPOINT, 177),\n\n  /* block size for TFTP transfers */\n  CINIT(TFTP_BLKSIZE, LONG, 178),\n\n  /* Socks Service */\n  CINIT(SOCKS5_GSSAPI_SERVICE, OBJECTPOINT, 179),\n\n  /* Socks Service */\n  CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),\n\n  /* set the bitmask for the protocols that are allowed to be used for the\n     transfer, which thus helps the app which takes URLs from users or other\n     external inputs and want to restrict what protocol(s) to deal\n     with. Defaults to CURLPROTO_ALL. */\n  CINIT(PROTOCOLS, LONG, 181),\n\n  /* set the bitmask for the protocols that libcurl is allowed to follow to,\n     as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs\n     to be set in both bitmasks to be allowed to get redirected to. Defaults\n     to all protocols except FILE and SCP. */\n  CINIT(REDIR_PROTOCOLS, LONG, 182),\n\n  /* set the SSH knownhost file name to use */\n  CINIT(SSH_KNOWNHOSTS, OBJECTPOINT, 183),\n\n  /* set the SSH host key callback, must point to a curl_sshkeycallback\n     function */\n  CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184),\n\n  /* set the SSH host key callback custom pointer */\n  CINIT(SSH_KEYDATA, OBJECTPOINT, 185),\n\n  /* set the SMTP mail originator */\n  CINIT(MAIL_FROM, OBJECTPOINT, 186),\n\n  /* set the SMTP mail receiver(s) */\n  CINIT(MAIL_RCPT, OBJECTPOINT, 187),\n\n  /* FTP: send PRET before PASV */\n  CINIT(FTP_USE_PRET, LONG, 188),\n\n  /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */\n  CINIT(RTSP_REQUEST, LONG, 189),\n\n  /* The RTSP session identifier */\n  CINIT(RTSP_SESSION_ID, OBJECTPOINT, 190),\n\n  /* The RTSP stream URI */\n  CINIT(RTSP_STREAM_URI, OBJECTPOINT, 191),\n\n  /* The Transport: header to use in RTSP requests */\n  CINIT(RTSP_TRANSPORT, OBJECTPOINT, 192),\n\n  /* Manually initialize the client RTSP CSeq for this handle */\n  CINIT(RTSP_CLIENT_CSEQ, LONG, 193),\n\n  /* Manually initialize the server RTSP CSeq for this handle */\n  CINIT(RTSP_SERVER_CSEQ, LONG, 194),\n\n  /* The stream to pass to INTERLEAVEFUNCTION. */\n  CINIT(INTERLEAVEDATA, OBJECTPOINT, 195),\n\n  /* Let the application define a custom write method for RTP data */\n  CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196),\n\n  /* Turn on wildcard matching */\n  CINIT(WILDCARDMATCH, LONG, 197),\n\n  /* Directory matching callback called before downloading of an\n     individual file (chunk) started */\n  CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198),\n\n  /* Directory matching callback called after the file (chunk)\n     was downloaded, or skipped */\n  CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199),\n\n  /* Change match (fnmatch-like) callback for wildcard matching */\n  CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200),\n\n  /* Let the application define custom chunk data pointer */\n  CINIT(CHUNK_DATA, OBJECTPOINT, 201),\n\n  /* FNMATCH_FUNCTION user pointer */\n  CINIT(FNMATCH_DATA, OBJECTPOINT, 202),\n\n  /* send linked-list of name:port:address sets */\n  CINIT(RESOLVE, OBJECTPOINT, 203),\n\n  /* Set a username for authenticated TLS */\n  CINIT(TLSAUTH_USERNAME, OBJECTPOINT, 204),\n\n  /* Set a password for authenticated TLS */\n  CINIT(TLSAUTH_PASSWORD, OBJECTPOINT, 205),\n\n  /* Set authentication type for authenticated TLS */\n  CINIT(TLSAUTH_TYPE, OBJECTPOINT, 206),\n\n  /* Set to 1 to enable the \"TE:\" header in HTTP requests to ask for\n     compressed transfer-encoded responses. Set to 0 to disable the use of TE:\n     in outgoing requests. The current default is 0, but it might change in a\n     future libcurl release.\n\n     libcurl will ask for the compressed methods it knows of, and if that\n     isn't any, it will not ask for transfer-encoding at all even if this\n     option is set to 1.\n\n  */\n  CINIT(TRANSFER_ENCODING, LONG, 207),\n\n  /* Callback function for closing socket (instead of close(2)). The callback\n     should have type curl_closesocket_callback */\n  CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208),\n  CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209),\n\n  /* allow GSSAPI credential delegation */\n  CINIT(GSSAPI_DELEGATION, LONG, 210),\n\n  /* Set the name servers to use for DNS resolution */\n  CINIT(DNS_SERVERS, OBJECTPOINT, 211),\n\n  /* Time-out accept operations (currently for FTP only) after this amount\n     of miliseconds. */\n  CINIT(ACCEPTTIMEOUT_MS, LONG, 212),\n\n  /* Set TCP keepalive */\n  CINIT(TCP_KEEPALIVE, LONG, 213),\n\n  /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */\n  CINIT(TCP_KEEPIDLE, LONG, 214),\n  CINIT(TCP_KEEPINTVL, LONG, 215),\n\n  /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */\n  CINIT(SSL_OPTIONS, LONG, 216),\n\n  /* set the SMTP auth originator */\n  CINIT(MAIL_AUTH, OBJECTPOINT, 217),\n\n  CURLOPT_LASTENTRY /* the last unused */\n} CURLoption;\n\n#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all\n                          the obsolete stuff removed! */\n\n/* Backwards compatibility with older names */\n/* These are scheduled to disappear by 2011 */\n\n/* This was added in version 7.19.1 */\n#define CURLOPT_POST301 CURLOPT_POSTREDIR\n\n/* These are scheduled to disappear by 2009 */\n\n/* The following were added in 7.17.0 */\n#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD\n#define CURLOPT_FTPAPPEND CURLOPT_APPEND\n#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY\n#define CURLOPT_FTP_SSL CURLOPT_USE_SSL\n\n/* The following were added earlier */\n\n#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD\n#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL\n\n#else\n/* This is set if CURL_NO_OLDIES is defined at compile-time */\n#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */\n#endif\n\n\n  /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host\n     name resolves addresses using more than one IP protocol version, this\n     option might be handy to force libcurl to use a specific IP version. */\n#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP\n                                     versions that your system allows */\n#define CURL_IPRESOLVE_V4       1 /* resolve to ipv4 addresses */\n#define CURL_IPRESOLVE_V6       2 /* resolve to ipv6 addresses */\n\n  /* three convenient \"aliases\" that follow the name scheme better */\n#define CURLOPT_WRITEDATA CURLOPT_FILE\n#define CURLOPT_READDATA  CURLOPT_INFILE\n#define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER\n#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER\n\n  /* These enums are for use with the CURLOPT_HTTP_VERSION option. */\nenum {\n  CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd\n                             like the library to choose the best possible\n                             for us! */\n  CURL_HTTP_VERSION_1_0,  /* please use HTTP 1.0 in the request */\n  CURL_HTTP_VERSION_1_1,  /* please use HTTP 1.1 in the request */\n\n  CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */\n};\n\n/*\n * Public API enums for RTSP requests\n */\nenum {\n    CURL_RTSPREQ_NONE, /* first in list */\n    CURL_RTSPREQ_OPTIONS,\n    CURL_RTSPREQ_DESCRIBE,\n    CURL_RTSPREQ_ANNOUNCE,\n    CURL_RTSPREQ_SETUP,\n    CURL_RTSPREQ_PLAY,\n    CURL_RTSPREQ_PAUSE,\n    CURL_RTSPREQ_TEARDOWN,\n    CURL_RTSPREQ_GET_PARAMETER,\n    CURL_RTSPREQ_SET_PARAMETER,\n    CURL_RTSPREQ_RECORD,\n    CURL_RTSPREQ_RECEIVE,\n    CURL_RTSPREQ_LAST /* last in list */\n};\n\n  /* These enums are for use with the CURLOPT_NETRC option. */\nenum CURL_NETRC_OPTION {\n  CURL_NETRC_IGNORED,     /* The .netrc will never be read.\n                           * This is the default. */\n  CURL_NETRC_OPTIONAL,    /* A user:password in the URL will be preferred\n                           * to one in the .netrc. */\n  CURL_NETRC_REQUIRED,    /* A user:password in the URL will be ignored.\n                           * Unless one is set programmatically, the .netrc\n                           * will be queried. */\n  CURL_NETRC_LAST\n};\n\nenum {\n  CURL_SSLVERSION_DEFAULT,\n  CURL_SSLVERSION_TLSv1,\n  CURL_SSLVERSION_SSLv2,\n  CURL_SSLVERSION_SSLv3,\n\n  CURL_SSLVERSION_LAST /* never use, keep last */\n};\n\nenum CURL_TLSAUTH {\n  CURL_TLSAUTH_NONE,\n  CURL_TLSAUTH_SRP,\n  CURL_TLSAUTH_LAST /* never use, keep last */\n};\n\n/* symbols to use with CURLOPT_POSTREDIR.\n   CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303\n   can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302\n   | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */\n\n#define CURL_REDIR_GET_ALL  0\n#define CURL_REDIR_POST_301 1\n#define CURL_REDIR_POST_302 2\n#define CURL_REDIR_POST_303 4\n#define CURL_REDIR_POST_ALL \\\n    (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)\n\ntypedef enum {\n  CURL_TIMECOND_NONE,\n\n  CURL_TIMECOND_IFMODSINCE,\n  CURL_TIMECOND_IFUNMODSINCE,\n  CURL_TIMECOND_LASTMOD,\n\n  CURL_TIMECOND_LAST\n} curl_TimeCond;\n\n\n/* curl_strequal() and curl_strnequal() are subject for removal in a future\n   libcurl, see lib/README.curlx for details */\nCURL_EXTERN int (curl_strequal)(const char *s1, const char *s2);\nCURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n);\n\n/* name is uppercase CURLFORM_<name> */\n#ifdef CFINIT\n#undef CFINIT\n#endif\n\n#ifdef CURL_ISOCPP\n#define CFINIT(name) CURLFORM_ ## name\n#else\n/* The macro \"##\" is ISO C, we assume pre-ISO C doesn't support it. */\n#define CFINIT(name) CURLFORM_/**/name\n#endif\n\ntypedef enum {\n  CFINIT(NOTHING),        /********* the first one is unused ************/\n\n  /*  */\n  CFINIT(COPYNAME),\n  CFINIT(PTRNAME),\n  CFINIT(NAMELENGTH),\n  CFINIT(COPYCONTENTS),\n  CFINIT(PTRCONTENTS),\n  CFINIT(CONTENTSLENGTH),\n  CFINIT(FILECONTENT),\n  CFINIT(ARRAY),\n  CFINIT(OBSOLETE),\n  CFINIT(FILE),\n\n  CFINIT(BUFFER),\n  CFINIT(BUFFERPTR),\n  CFINIT(BUFFERLENGTH),\n\n  CFINIT(CONTENTTYPE),\n  CFINIT(CONTENTHEADER),\n  CFINIT(FILENAME),\n  CFINIT(END),\n  CFINIT(OBSOLETE2),\n\n  CFINIT(STREAM),\n\n  CURLFORM_LASTENTRY /* the last unused */\n} CURLformoption;\n\n#undef CFINIT /* done */\n\n/* structure to be used as parameter for CURLFORM_ARRAY */\nstruct curl_forms {\n  CURLformoption option;\n  const char     *value;\n};\n\n/* use this for multipart formpost building */\n/* Returns code for curl_formadd()\n *\n * Returns:\n * CURL_FORMADD_OK             on success\n * CURL_FORMADD_MEMORY         if the FormInfo allocation fails\n * CURL_FORMADD_OPTION_TWICE   if one option is given twice for one Form\n * CURL_FORMADD_NULL           if a null pointer was given for a char\n * CURL_FORMADD_MEMORY         if the allocation of a FormInfo struct failed\n * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used\n * CURL_FORMADD_INCOMPLETE     if the some FormInfo is not complete (or error)\n * CURL_FORMADD_MEMORY         if a curl_httppost struct cannot be allocated\n * CURL_FORMADD_MEMORY         if some allocation for string copying failed.\n * CURL_FORMADD_ILLEGAL_ARRAY  if an illegal option is used in an array\n *\n ***************************************************************************/\ntypedef enum {\n  CURL_FORMADD_OK, /* first, no error */\n\n  CURL_FORMADD_MEMORY,\n  CURL_FORMADD_OPTION_TWICE,\n  CURL_FORMADD_NULL,\n  CURL_FORMADD_UNKNOWN_OPTION,\n  CURL_FORMADD_INCOMPLETE,\n  CURL_FORMADD_ILLEGAL_ARRAY,\n  CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */\n\n  CURL_FORMADD_LAST /* last */\n} CURLFORMcode;\n\n/*\n * NAME curl_formadd()\n *\n * DESCRIPTION\n *\n * Pretty advanced function for building multi-part formposts. Each invoke\n * adds one part that together construct a full post. Then use\n * CURLOPT_HTTPPOST to send it off to libcurl.\n */\nCURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost,\n                                      struct curl_httppost **last_post,\n                                      ...);\n\n/*\n * callback function for curl_formget()\n * The void *arg pointer will be the one passed as second argument to\n *   curl_formget().\n * The character buffer passed to it must not be freed.\n * Should return the buffer length passed to it as the argument \"len\" on\n *   success.\n */\ntypedef size_t (*curl_formget_callback)(void *arg, const char *buf,\n                                        size_t len);\n\n/*\n * NAME curl_formget()\n *\n * DESCRIPTION\n *\n * Serialize a curl_httppost struct built with curl_formadd().\n * Accepts a void pointer as second argument which will be passed to\n * the curl_formget_callback function.\n * Returns 0 on success.\n */\nCURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg,\n                             curl_formget_callback append);\n/*\n * NAME curl_formfree()\n *\n * DESCRIPTION\n *\n * Free a multipart formpost previously built with curl_formadd().\n */\nCURL_EXTERN void curl_formfree(struct curl_httppost *form);\n\n/*\n * NAME curl_getenv()\n *\n * DESCRIPTION\n *\n * Returns a malloc()'ed string that MUST be curl_free()ed after usage is\n * complete. DEPRECATED - see lib/README.curlx\n */\nCURL_EXTERN char *curl_getenv(const char *variable);\n\n/*\n * NAME curl_version()\n *\n * DESCRIPTION\n *\n * Returns a static ascii string of the libcurl version.\n */\nCURL_EXTERN char *curl_version(void);\n\n/*\n * NAME curl_easy_escape()\n *\n * DESCRIPTION\n *\n * Escapes URL strings (converts all letters consider illegal in URLs to their\n * %XX versions). This function returns a new allocated string or NULL if an\n * error occurred.\n */\nCURL_EXTERN char *curl_easy_escape(CURL *handle,\n                                   const char *string,\n                                   int length);\n\n/* the previous version: */\nCURL_EXTERN char *curl_escape(const char *string,\n                              int length);\n\n\n/*\n * NAME curl_easy_unescape()\n *\n * DESCRIPTION\n *\n * Unescapes URL encoding in strings (converts all %XX codes to their 8bit\n * versions). This function returns a new allocated string or NULL if an error\n * occurred.\n * Conversion Note: On non-ASCII platforms the ASCII %XX codes are\n * converted into the host encoding.\n */\nCURL_EXTERN char *curl_easy_unescape(CURL *handle,\n                                     const char *string,\n                                     int length,\n                                     int *outlength);\n\n/* the previous version */\nCURL_EXTERN char *curl_unescape(const char *string,\n                                int length);\n\n/*\n * NAME curl_free()\n *\n * DESCRIPTION\n *\n * Provided for de-allocation in the same translation unit that did the\n * allocation. Added in libcurl 7.10\n */\nCURL_EXTERN void curl_free(void *p);\n\n/*\n * NAME curl_global_init()\n *\n * DESCRIPTION\n *\n * curl_global_init() should be invoked exactly once for each application that\n * uses libcurl and before any call of other libcurl functions.\n *\n * This function is not thread-safe!\n */\nCURL_EXTERN CURLcode curl_global_init(long flags);\n\n/*\n * NAME curl_global_init_mem()\n *\n * DESCRIPTION\n *\n * curl_global_init() or curl_global_init_mem() should be invoked exactly once\n * for each application that uses libcurl.  This function can be used to\n * initialize libcurl and set user defined memory management callback\n * functions.  Users can implement memory management routines to check for\n * memory leaks, check for mis-use of the curl library etc.  User registered\n * callback routines with be invoked by this library instead of the system\n * memory management routines like malloc, free etc.\n */\nCURL_EXTERN CURLcode curl_global_init_mem(long flags,\n                                          curl_malloc_callback m,\n                                          curl_free_callback f,\n                                          curl_realloc_callback r,\n                                          curl_strdup_callback s,\n                                          curl_calloc_callback c);\n\n/*\n * NAME curl_global_cleanup()\n *\n * DESCRIPTION\n *\n * curl_global_cleanup() should be invoked exactly once for each application\n * that uses libcurl\n */\nCURL_EXTERN void curl_global_cleanup(void);\n\n/* linked-list structure for the CURLOPT_QUOTE option (and other) */\nstruct curl_slist {\n  char *data;\n  struct curl_slist *next;\n};\n\n/*\n * NAME curl_slist_append()\n *\n * DESCRIPTION\n *\n * Appends a string to a linked list. If no list exists, it will be created\n * first. Returns the new list, after appending.\n */\nCURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *,\n                                                 const char *);\n\n/*\n * NAME curl_slist_free_all()\n *\n * DESCRIPTION\n *\n * free a previously built curl_slist.\n */\nCURL_EXTERN void curl_slist_free_all(struct curl_slist *);\n\n/*\n * NAME curl_getdate()\n *\n * DESCRIPTION\n *\n * Returns the time, in seconds since 1 Jan 1970 of the time string given in\n * the first argument. The time argument in the second parameter is unused\n * and should be set to NULL.\n */\nCURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused);\n\n/* info about the certificate chain, only for OpenSSL builds. Asked\n   for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */\nstruct curl_certinfo {\n  int num_of_certs;             /* number of certificates with information */\n  struct curl_slist **certinfo; /* for each index in this array, there's a\n                                   linked list with textual information in the\n                                   format \"name: value\" */\n};\n\n#define CURLINFO_STRING   0x100000\n#define CURLINFO_LONG     0x200000\n#define CURLINFO_DOUBLE   0x300000\n#define CURLINFO_SLIST    0x400000\n#define CURLINFO_MASK     0x0fffff\n#define CURLINFO_TYPEMASK 0xf00000\n\ntypedef enum {\n  CURLINFO_NONE, /* first, never use this */\n  CURLINFO_EFFECTIVE_URL    = CURLINFO_STRING + 1,\n  CURLINFO_RESPONSE_CODE    = CURLINFO_LONG   + 2,\n  CURLINFO_TOTAL_TIME       = CURLINFO_DOUBLE + 3,\n  CURLINFO_NAMELOOKUP_TIME  = CURLINFO_DOUBLE + 4,\n  CURLINFO_CONNECT_TIME     = CURLINFO_DOUBLE + 5,\n  CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,\n  CURLINFO_SIZE_UPLOAD      = CURLINFO_DOUBLE + 7,\n  CURLINFO_SIZE_DOWNLOAD    = CURLINFO_DOUBLE + 8,\n  CURLINFO_SPEED_DOWNLOAD   = CURLINFO_DOUBLE + 9,\n  CURLINFO_SPEED_UPLOAD     = CURLINFO_DOUBLE + 10,\n  CURLINFO_HEADER_SIZE      = CURLINFO_LONG   + 11,\n  CURLINFO_REQUEST_SIZE     = CURLINFO_LONG   + 12,\n  CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG   + 13,\n  CURLINFO_FILETIME         = CURLINFO_LONG   + 14,\n  CURLINFO_CONTENT_LENGTH_DOWNLOAD   = CURLINFO_DOUBLE + 15,\n  CURLINFO_CONTENT_LENGTH_UPLOAD     = CURLINFO_DOUBLE + 16,\n  CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,\n  CURLINFO_CONTENT_TYPE     = CURLINFO_STRING + 18,\n  CURLINFO_REDIRECT_TIME    = CURLINFO_DOUBLE + 19,\n  CURLINFO_REDIRECT_COUNT   = CURLINFO_LONG   + 20,\n  CURLINFO_PRIVATE          = CURLINFO_STRING + 21,\n  CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG   + 22,\n  CURLINFO_HTTPAUTH_AVAIL   = CURLINFO_LONG   + 23,\n  CURLINFO_PROXYAUTH_AVAIL  = CURLINFO_LONG   + 24,\n  CURLINFO_OS_ERRNO         = CURLINFO_LONG   + 25,\n  CURLINFO_NUM_CONNECTS     = CURLINFO_LONG   + 26,\n  CURLINFO_SSL_ENGINES      = CURLINFO_SLIST  + 27,\n  CURLINFO_COOKIELIST       = CURLINFO_SLIST  + 28,\n  CURLINFO_LASTSOCKET       = CURLINFO_LONG   + 29,\n  CURLINFO_FTP_ENTRY_PATH   = CURLINFO_STRING + 30,\n  CURLINFO_REDIRECT_URL     = CURLINFO_STRING + 31,\n  CURLINFO_PRIMARY_IP       = CURLINFO_STRING + 32,\n  CURLINFO_APPCONNECT_TIME  = CURLINFO_DOUBLE + 33,\n  CURLINFO_CERTINFO         = CURLINFO_SLIST  + 34,\n  CURLINFO_CONDITION_UNMET  = CURLINFO_LONG   + 35,\n  CURLINFO_RTSP_SESSION_ID  = CURLINFO_STRING + 36,\n  CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG   + 37,\n  CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG   + 38,\n  CURLINFO_RTSP_CSEQ_RECV   = CURLINFO_LONG   + 39,\n  CURLINFO_PRIMARY_PORT     = CURLINFO_LONG   + 40,\n  CURLINFO_LOCAL_IP         = CURLINFO_STRING + 41,\n  CURLINFO_LOCAL_PORT       = CURLINFO_LONG   + 42,\n  /* Fill in new entries below here! */\n\n  CURLINFO_LASTONE          = 42\n} CURLINFO;\n\n/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as\n   CURLINFO_HTTP_CODE */\n#define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE\n\ntypedef enum {\n  CURLCLOSEPOLICY_NONE, /* first, never use this */\n\n  CURLCLOSEPOLICY_OLDEST,\n  CURLCLOSEPOLICY_LEAST_RECENTLY_USED,\n  CURLCLOSEPOLICY_LEAST_TRAFFIC,\n  CURLCLOSEPOLICY_SLOWEST,\n  CURLCLOSEPOLICY_CALLBACK,\n\n  CURLCLOSEPOLICY_LAST /* last, never use this */\n} curl_closepolicy;\n\n#define CURL_GLOBAL_SSL (1<<0)\n#define CURL_GLOBAL_WIN32 (1<<1)\n#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)\n#define CURL_GLOBAL_NOTHING 0\n#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL\n#define CURL_GLOBAL_ACK_EINTR (1<<2)\n\n\n/*****************************************************************************\n * Setup defines, protos etc for the sharing stuff.\n */\n\n/* Different data locks for a single share */\ntypedef enum {\n  CURL_LOCK_DATA_NONE = 0,\n  /*  CURL_LOCK_DATA_SHARE is used internally to say that\n   *  the locking is just made to change the internal state of the share\n   *  itself.\n   */\n  CURL_LOCK_DATA_SHARE,\n  CURL_LOCK_DATA_COOKIE,\n  CURL_LOCK_DATA_DNS,\n  CURL_LOCK_DATA_SSL_SESSION,\n  CURL_LOCK_DATA_CONNECT,\n  CURL_LOCK_DATA_LAST\n} curl_lock_data;\n\n/* Different lock access types */\ntypedef enum {\n  CURL_LOCK_ACCESS_NONE = 0,   /* unspecified action */\n  CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */\n  CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */\n  CURL_LOCK_ACCESS_LAST        /* never use */\n} curl_lock_access;\n\ntypedef void (*curl_lock_function)(CURL *handle,\n                                   curl_lock_data data,\n                                   curl_lock_access locktype,\n                                   void *userptr);\ntypedef void (*curl_unlock_function)(CURL *handle,\n                                     curl_lock_data data,\n                                     void *userptr);\n\ntypedef void CURLSH;\n\ntypedef enum {\n  CURLSHE_OK,  /* all is fine */\n  CURLSHE_BAD_OPTION, /* 1 */\n  CURLSHE_IN_USE,     /* 2 */\n  CURLSHE_INVALID,    /* 3 */\n  CURLSHE_NOMEM,      /* 4 out of memory */\n  CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */\n  CURLSHE_LAST        /* never use */\n} CURLSHcode;\n\ntypedef enum {\n  CURLSHOPT_NONE,  /* don't use */\n  CURLSHOPT_SHARE,   /* specify a data type to share */\n  CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */\n  CURLSHOPT_LOCKFUNC,   /* pass in a 'curl_lock_function' pointer */\n  CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */\n  CURLSHOPT_USERDATA,   /* pass in a user data pointer used in the lock/unlock\n                           callback functions */\n  CURLSHOPT_LAST  /* never use */\n} CURLSHoption;\n\nCURL_EXTERN CURLSH *curl_share_init(void);\nCURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...);\nCURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *);\n\n/****************************************************************************\n * Structures for querying information about the curl library at runtime.\n */\n\ntypedef enum {\n  CURLVERSION_FIRST,\n  CURLVERSION_SECOND,\n  CURLVERSION_THIRD,\n  CURLVERSION_FOURTH,\n  CURLVERSION_LAST /* never actually use this */\n} CURLversion;\n\n/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by\n   basically all programs ever that want to get version information. It is\n   meant to be a built-in version number for what kind of struct the caller\n   expects. If the struct ever changes, we redefine the NOW to another enum\n   from above. */\n#define CURLVERSION_NOW CURLVERSION_FOURTH\n\ntypedef struct {\n  CURLversion age;          /* age of the returned struct */\n  const char *version;      /* LIBCURL_VERSION */\n  unsigned int version_num; /* LIBCURL_VERSION_NUM */\n  const char *host;         /* OS/host/cpu/machine when configured */\n  int features;             /* bitmask, see defines below */\n  const char *ssl_version;  /* human readable string */\n  long ssl_version_num;     /* not used anymore, always 0 */\n  const char *libz_version; /* human readable string */\n  /* protocols is terminated by an entry with a NULL protoname */\n  const char * const *protocols;\n\n  /* The fields below this were added in CURLVERSION_SECOND */\n  const char *ares;\n  int ares_num;\n\n  /* This field was added in CURLVERSION_THIRD */\n  const char *libidn;\n\n  /* These field were added in CURLVERSION_FOURTH */\n\n  /* Same as '_libiconv_version' if built with HAVE_ICONV */\n  int iconv_ver_num;\n\n  const char *libssh_version; /* human readable string */\n\n} curl_version_info_data;\n\n#define CURL_VERSION_IPV6      (1<<0)  /* IPv6-enabled */\n#define CURL_VERSION_KERBEROS4 (1<<1)  /* kerberos auth is supported */\n#define CURL_VERSION_SSL       (1<<2)  /* SSL options are present */\n#define CURL_VERSION_LIBZ      (1<<3)  /* libz features are present */\n#define CURL_VERSION_NTLM      (1<<4)  /* NTLM auth is supported */\n#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth support */\n#define CURL_VERSION_DEBUG     (1<<6)  /* built with debug capabilities */\n#define CURL_VERSION_ASYNCHDNS (1<<7)  /* asynchronous dns resolves */\n#define CURL_VERSION_SPNEGO    (1<<8)  /* SPNEGO auth */\n#define CURL_VERSION_LARGEFILE (1<<9)  /* supports files bigger than 2GB */\n#define CURL_VERSION_IDN       (1<<10) /* International Domain Names support */\n#define CURL_VERSION_SSPI      (1<<11) /* SSPI is supported */\n#define CURL_VERSION_CONV      (1<<12) /* character conversions supported */\n#define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */\n#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */\n#define CURL_VERSION_NTLM_WB   (1<<15) /* NTLM delegating to winbind helper */\n\n /*\n * NAME curl_version_info()\n *\n * DESCRIPTION\n *\n * This function returns a pointer to a static copy of the version info\n * struct. See above.\n */\nCURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);\n\n/*\n * NAME curl_easy_strerror()\n *\n * DESCRIPTION\n *\n * The curl_easy_strerror function may be used to turn a CURLcode value\n * into the equivalent human readable error string.  This is useful\n * for printing meaningful error messages.\n */\nCURL_EXTERN const char *curl_easy_strerror(CURLcode);\n\n/*\n * NAME curl_share_strerror()\n *\n * DESCRIPTION\n *\n * The curl_share_strerror function may be used to turn a CURLSHcode value\n * into the equivalent human readable error string.  This is useful\n * for printing meaningful error messages.\n */\nCURL_EXTERN const char *curl_share_strerror(CURLSHcode);\n\n/*\n * NAME curl_easy_pause()\n *\n * DESCRIPTION\n *\n * The curl_easy_pause function pauses or unpauses transfers. Select the new\n * state by setting the bitmask, use the convenience defines below.\n *\n */\nCURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);\n\n#define CURLPAUSE_RECV      (1<<0)\n#define CURLPAUSE_RECV_CONT (0)\n\n#define CURLPAUSE_SEND      (1<<2)\n#define CURLPAUSE_SEND_CONT (0)\n\n#define CURLPAUSE_ALL       (CURLPAUSE_RECV|CURLPAUSE_SEND)\n#define CURLPAUSE_CONT      (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)\n\n#ifdef  __cplusplus\n}\n#endif\n\n/* unfortunately, the easy.h and multi.h include files need options and info\n  stuff before they can be included! */\n#include \"easy.h\" /* nothing in curl is fun without the easy stuff */\n#include \"multi.h\"\n\n/* the typechecker doesn't work in C++ (yet) */\n#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \\\n    ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \\\n    !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK)\n#include \"typecheck-gcc.h\"\n#else\n#if defined(__STDC__) && (__STDC__ >= 1)\n/* This preprocessor magic that replaces a call with the exact same call is\n   only done to make sure application authors pass exactly three arguments\n   to these functions. */\n#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)\n#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)\n#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)\n#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)\n#endif /* __STDC__ >= 1 */\n#endif /* gcc >= 4.3 && !__cplusplus */\n\n#endif /* __CURL_CURL_H */\n"
  },
  {
    "path": "third_party/include/curl/curlbuild.h",
    "content": "#ifndef __CURL_CURLBUILD_H\n#define __CURL_CURLBUILD_H\n/***************************************************************************\n *                                  _   _ ____  _\n *  Project                     ___| | | |  _ \\| |\n *                             / __| | | | |_) | |\n *                            | (__| |_| |  _ <| |___\n *                             \\___|\\___/|_| \\_\\_____|\n *\n * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\n *\n * This software is licensed as described in the file COPYING, which\n * you should have received as part of this distribution. The terms\n * are also available at http://curl.haxx.se/docs/copyright.html.\n *\n * You may opt to use, copy, modify, merge, publish, distribute and/or sell\n * copies of the Software, and permit persons to whom the Software is\n * furnished to do so, under the terms of the COPYING file.\n *\n * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY\n * KIND, either express or implied.\n *\n ***************************************************************************/\n\n/* ================================================================ */\n/*               NOTES FOR CONFIGURE CAPABLE SYSTEMS                */\n/* ================================================================ */\n\n/*\n * NOTE 1:\n * -------\n *\n * See file include/curl/curlbuild.h.in, run configure, and forget\n * that this file exists it is only used for non-configure systems.\n * But you can keep reading if you want ;-)\n *\n */\n\n/* ================================================================ */\n/*                 NOTES FOR NON-CONFIGURE SYSTEMS                  */\n/* ================================================================ */\n\n/*\n * NOTE 1:\n * -------\n *\n * Nothing in this file is intended to be modified or adjusted by the\n * curl library user nor by the curl library builder.\n *\n * If you think that something actually needs to be changed, adjusted\n * or fixed in this file, then, report it on the libcurl development\n * mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/\n *\n * Try to keep one section per platform, compiler and architecture,\n * otherwise, if an existing section is reused for a different one and\n * later on the original is adjusted, probably the piggybacking one can\n * be adversely changed.\n *\n * In order to differentiate between platforms/compilers/architectures\n * use only compiler built in predefined preprocessor symbols.\n *\n * This header file shall only export symbols which are 'curl' or 'CURL'\n * prefixed, otherwise public name space would be polluted.\n *\n * NOTE 2:\n * -------\n *\n * For any given platform/compiler curl_off_t must be typedef'ed to a\n * 64-bit wide signed integral data type. The width of this data type\n * must remain constant and independent of any possible large file\n * support settings.\n *\n * As an exception to the above, curl_off_t shall be typedef'ed to a\n * 32-bit wide signed integral data type if there is no 64-bit type.\n *\n * As a general rule, curl_off_t shall not be mapped to off_t. This\n * rule shall only be violated if off_t is the only 64-bit data type\n * available and the size of off_t is independent of large file support\n * settings. Keep your build on the safe side avoiding an off_t gating.\n * If you have a 64-bit off_t then take for sure that another 64-bit\n * data type exists, dig deeper and you will find it.\n *\n * NOTE 3:\n * -------\n *\n * Right now you might be staring at file include/curl/curlbuild.h.dist or\n * at file include/curl/curlbuild.h, this is due to the following reason:\n * file include/curl/curlbuild.h.dist is renamed to include/curl/curlbuild.h\n * when the libcurl source code distribution archive file is created.\n *\n * File include/curl/curlbuild.h.dist is not included in the distribution\n * archive. File include/curl/curlbuild.h is not present in the git tree.\n *\n * The distributed include/curl/curlbuild.h file is only intended to be used\n * on systems which can not run the also distributed configure script.\n *\n * On systems capable of running the configure script, the configure process\n * will overwrite the distributed include/curl/curlbuild.h file with one that\n * is suitable and specific to the library being configured and built, which\n * is generated from the include/curl/curlbuild.h.in template file.\n *\n * If you check out from git on a non-configure platform, you must run the\n * appropriate buildconf* script to set up curlbuild.h and other local files.\n *\n */\n\n/* ================================================================ */\n/*  DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE  */\n/* ================================================================ */\n\n#ifdef CURL_SIZEOF_LONG\n#  error \"CURL_SIZEOF_LONG shall not be defined except in curlbuild.h\"\n   Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined\n#endif\n\n#ifdef CURL_TYPEOF_CURL_SOCKLEN_T\n#  error \"CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h\"\n   Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined\n#endif\n\n#ifdef CURL_SIZEOF_CURL_SOCKLEN_T\n#  error \"CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h\"\n   Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined\n#endif\n\n#ifdef CURL_TYPEOF_CURL_OFF_T\n#  error \"CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h\"\n   Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined\n#endif\n\n#ifdef CURL_FORMAT_CURL_OFF_T\n#  error \"CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h\"\n   Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined\n#endif\n\n#ifdef CURL_FORMAT_CURL_OFF_TU\n#  error \"CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h\"\n   Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined\n#endif\n\n#ifdef CURL_FORMAT_OFF_T\n#  error \"CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h\"\n   Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined\n#endif\n\n#ifdef CURL_SIZEOF_CURL_OFF_T\n#  error \"CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h\"\n   Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined\n#endif\n\n#ifdef CURL_SUFFIX_CURL_OFF_T\n#  error \"CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h\"\n   Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined\n#endif\n\n#ifdef CURL_SUFFIX_CURL_OFF_TU\n#  error \"CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h\"\n   Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined\n#endif\n\n/* ================================================================ */\n/*    EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY    */\n/* ================================================================ */\n\n#if defined(__DJGPP__) || defined(__GO32__)\n#  if defined(__DJGPP__) && (__DJGPP__ > 1)\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     long long\n#    define CURL_FORMAT_CURL_OFF_T     \"lld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"llu\"\n#    define CURL_FORMAT_OFF_T          \"%lld\"\n#    define CURL_SIZEOF_CURL_OFF_T     8\n#    define CURL_SUFFIX_CURL_OFF_T     LL\n#    define CURL_SUFFIX_CURL_OFF_TU    ULL\n#  else\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     long\n#    define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#    define CURL_FORMAT_OFF_T          \"%ld\"\n#    define CURL_SIZEOF_CURL_OFF_T     4\n#    define CURL_SUFFIX_CURL_OFF_T     L\n#    define CURL_SUFFIX_CURL_OFF_TU    UL\n#  endif\n#  define CURL_TYPEOF_CURL_SOCKLEN_T int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n#elif defined(__SALFORDC__)\n#  define CURL_SIZEOF_LONG           4\n#  define CURL_TYPEOF_CURL_OFF_T     long\n#  define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#  define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#  define CURL_FORMAT_OFF_T          \"%ld\"\n#  define CURL_SIZEOF_CURL_OFF_T     4\n#  define CURL_SUFFIX_CURL_OFF_T     L\n#  define CURL_SUFFIX_CURL_OFF_TU    UL\n#  define CURL_TYPEOF_CURL_SOCKLEN_T int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n#elif defined(__BORLANDC__)\n#  if (__BORLANDC__ < 0x520)\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     long\n#    define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#    define CURL_FORMAT_OFF_T          \"%ld\"\n#    define CURL_SIZEOF_CURL_OFF_T     4\n#    define CURL_SUFFIX_CURL_OFF_T     L\n#    define CURL_SUFFIX_CURL_OFF_TU    UL\n#  else\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     __int64\n#    define CURL_FORMAT_CURL_OFF_T     \"I64d\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"I64u\"\n#    define CURL_FORMAT_OFF_T          \"%I64d\"\n#    define CURL_SIZEOF_CURL_OFF_T     8\n#    define CURL_SUFFIX_CURL_OFF_T     i64\n#    define CURL_SUFFIX_CURL_OFF_TU    ui64\n#  endif\n#  define CURL_TYPEOF_CURL_SOCKLEN_T int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n#elif defined(__TURBOC__)\n#  define CURL_SIZEOF_LONG           4\n#  define CURL_TYPEOF_CURL_OFF_T     long\n#  define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#  define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#  define CURL_FORMAT_OFF_T          \"%ld\"\n#  define CURL_SIZEOF_CURL_OFF_T     4\n#  define CURL_SUFFIX_CURL_OFF_T     L\n#  define CURL_SUFFIX_CURL_OFF_TU    UL\n#  define CURL_TYPEOF_CURL_SOCKLEN_T int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n#elif defined(__WATCOMC__)\n#  if defined(__386__)\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     __int64\n#    define CURL_FORMAT_CURL_OFF_T     \"I64d\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"I64u\"\n#    define CURL_FORMAT_OFF_T          \"%I64d\"\n#    define CURL_SIZEOF_CURL_OFF_T     8\n#    define CURL_SUFFIX_CURL_OFF_T     i64\n#    define CURL_SUFFIX_CURL_OFF_TU    ui64\n#  else\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     long\n#    define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#    define CURL_FORMAT_OFF_T          \"%ld\"\n#    define CURL_SIZEOF_CURL_OFF_T     4\n#    define CURL_SUFFIX_CURL_OFF_T     L\n#    define CURL_SUFFIX_CURL_OFF_TU    UL\n#  endif\n#  define CURL_TYPEOF_CURL_SOCKLEN_T int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n#elif defined(__POCC__)\n#  if (__POCC__ < 280)\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     long\n#    define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#    define CURL_FORMAT_OFF_T          \"%ld\"\n#    define CURL_SIZEOF_CURL_OFF_T     4\n#    define CURL_SUFFIX_CURL_OFF_T     L\n#    define CURL_SUFFIX_CURL_OFF_TU    UL\n#  elif defined(_MSC_VER)\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     __int64\n#    define CURL_FORMAT_CURL_OFF_T     \"I64d\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"I64u\"\n#    define CURL_FORMAT_OFF_T          \"%I64d\"\n#    define CURL_SIZEOF_CURL_OFF_T     8\n#    define CURL_SUFFIX_CURL_OFF_T     i64\n#    define CURL_SUFFIX_CURL_OFF_TU    ui64\n#  else\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     long long\n#    define CURL_FORMAT_CURL_OFF_T     \"lld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"llu\"\n#    define CURL_FORMAT_OFF_T          \"%lld\"\n#    define CURL_SIZEOF_CURL_OFF_T     8\n#    define CURL_SUFFIX_CURL_OFF_T     LL\n#    define CURL_SUFFIX_CURL_OFF_TU    ULL\n#  endif\n#  define CURL_TYPEOF_CURL_SOCKLEN_T int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n#elif defined(__LCC__)\n#  define CURL_SIZEOF_LONG           4\n#  define CURL_TYPEOF_CURL_OFF_T     long\n#  define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#  define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#  define CURL_FORMAT_OFF_T          \"%ld\"\n#  define CURL_SIZEOF_CURL_OFF_T     4\n#  define CURL_SUFFIX_CURL_OFF_T     L\n#  define CURL_SUFFIX_CURL_OFF_TU    UL\n#  define CURL_TYPEOF_CURL_SOCKLEN_T int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n#elif defined(__SYMBIAN32__)\n#  if defined(__EABI__)  /* Treat all ARM compilers equally */\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     long long\n#    define CURL_FORMAT_CURL_OFF_T     \"lld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"llu\"\n#    define CURL_FORMAT_OFF_T          \"%lld\"\n#    define CURL_SIZEOF_CURL_OFF_T     8\n#    define CURL_SUFFIX_CURL_OFF_T     LL\n#    define CURL_SUFFIX_CURL_OFF_TU    ULL\n#  elif defined(__CW32__)\n#    pragma longlong on\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     long long\n#    define CURL_FORMAT_CURL_OFF_T     \"lld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"llu\"\n#    define CURL_FORMAT_OFF_T          \"%lld\"\n#    define CURL_SIZEOF_CURL_OFF_T     8\n#    define CURL_SUFFIX_CURL_OFF_T     LL\n#    define CURL_SUFFIX_CURL_OFF_TU    ULL\n#  elif defined(__VC32__)\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     __int64\n#    define CURL_FORMAT_CURL_OFF_T     \"lld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"llu\"\n#    define CURL_FORMAT_OFF_T          \"%lld\"\n#    define CURL_SIZEOF_CURL_OFF_T     8\n#    define CURL_SUFFIX_CURL_OFF_T     LL\n#    define CURL_SUFFIX_CURL_OFF_TU    ULL\n#  endif\n#  define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n#elif defined(__MWERKS__)\n#  define CURL_SIZEOF_LONG           4\n#  define CURL_TYPEOF_CURL_OFF_T     long long\n#  define CURL_FORMAT_CURL_OFF_T     \"lld\"\n#  define CURL_FORMAT_CURL_OFF_TU    \"llu\"\n#  define CURL_FORMAT_OFF_T          \"%lld\"\n#  define CURL_SIZEOF_CURL_OFF_T     8\n#  define CURL_SUFFIX_CURL_OFF_T     LL\n#  define CURL_SUFFIX_CURL_OFF_TU    ULL\n#  define CURL_TYPEOF_CURL_SOCKLEN_T int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n#elif defined(_WIN32_WCE)\n#  define CURL_SIZEOF_LONG           4\n#  define CURL_TYPEOF_CURL_OFF_T     __int64\n#  define CURL_FORMAT_CURL_OFF_T     \"I64d\"\n#  define CURL_FORMAT_CURL_OFF_TU    \"I64u\"\n#  define CURL_FORMAT_OFF_T          \"%I64d\"\n#  define CURL_SIZEOF_CURL_OFF_T     8\n#  define CURL_SUFFIX_CURL_OFF_T     i64\n#  define CURL_SUFFIX_CURL_OFF_TU    ui64\n#  define CURL_TYPEOF_CURL_SOCKLEN_T int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n#elif defined(__MINGW32__)\n#  define CURL_SIZEOF_LONG           4\n#  define CURL_TYPEOF_CURL_OFF_T     long long\n#  define CURL_FORMAT_CURL_OFF_T     \"I64d\"\n#  define CURL_FORMAT_CURL_OFF_TU    \"I64u\"\n#  define CURL_FORMAT_OFF_T          \"%I64d\"\n#  define CURL_SIZEOF_CURL_OFF_T     8\n#  define CURL_SUFFIX_CURL_OFF_T     LL\n#  define CURL_SUFFIX_CURL_OFF_TU    ULL\n#  define CURL_TYPEOF_CURL_SOCKLEN_T int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n#elif defined(__VMS)\n#  if defined(__VAX)\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     long\n#    define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#    define CURL_FORMAT_OFF_T          \"%ld\"\n#    define CURL_SIZEOF_CURL_OFF_T     4\n#    define CURL_SUFFIX_CURL_OFF_T     L\n#    define CURL_SUFFIX_CURL_OFF_TU    UL\n#  else\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     long long\n#    define CURL_FORMAT_CURL_OFF_T     \"lld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"llu\"\n#    define CURL_FORMAT_OFF_T          \"%lld\"\n#    define CURL_SIZEOF_CURL_OFF_T     8\n#    define CURL_SUFFIX_CURL_OFF_T     LL\n#    define CURL_SUFFIX_CURL_OFF_TU    ULL\n#  endif\n#  define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n#elif defined(__OS400__)\n#  if defined(__ILEC400__)\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     long long\n#    define CURL_FORMAT_CURL_OFF_T     \"lld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"llu\"\n#    define CURL_FORMAT_OFF_T          \"%lld\"\n#    define CURL_SIZEOF_CURL_OFF_T     8\n#    define CURL_SUFFIX_CURL_OFF_T     LL\n#    define CURL_SUFFIX_CURL_OFF_TU    ULL\n#    define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t\n#    define CURL_SIZEOF_CURL_SOCKLEN_T 4\n#    define CURL_PULL_SYS_TYPES_H      1\n#    define CURL_PULL_SYS_SOCKET_H     1\n#  endif\n\n#elif defined(__MVS__)\n#  if defined(__IBMC__) || defined(__IBMCPP__)\n#    if defined(_ILP32)\n#      define CURL_SIZEOF_LONG           4\n#    elif defined(_LP64)\n#      define CURL_SIZEOF_LONG           8\n#    endif\n#    if defined(_LONG_LONG)\n#      define CURL_TYPEOF_CURL_OFF_T     long long\n#      define CURL_FORMAT_CURL_OFF_T     \"lld\"\n#      define CURL_FORMAT_CURL_OFF_TU    \"llu\"\n#      define CURL_FORMAT_OFF_T          \"%lld\"\n#      define CURL_SIZEOF_CURL_OFF_T     8\n#      define CURL_SUFFIX_CURL_OFF_T     LL\n#      define CURL_SUFFIX_CURL_OFF_TU    ULL\n#    elif defined(_LP64)\n#      define CURL_TYPEOF_CURL_OFF_T     long\n#      define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#      define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#      define CURL_FORMAT_OFF_T          \"%ld\"\n#      define CURL_SIZEOF_CURL_OFF_T     8\n#      define CURL_SUFFIX_CURL_OFF_T     L\n#      define CURL_SUFFIX_CURL_OFF_TU    UL\n#    else\n#      define CURL_TYPEOF_CURL_OFF_T     long\n#      define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#      define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#      define CURL_FORMAT_OFF_T          \"%ld\"\n#      define CURL_SIZEOF_CURL_OFF_T     4\n#      define CURL_SUFFIX_CURL_OFF_T     L\n#      define CURL_SUFFIX_CURL_OFF_TU    UL\n#    endif\n#    define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t\n#    define CURL_SIZEOF_CURL_SOCKLEN_T 4\n#    define CURL_PULL_SYS_TYPES_H      1\n#    define CURL_PULL_SYS_SOCKET_H     1\n#  endif\n\n#elif defined(__370__)\n#  if defined(__IBMC__) || defined(__IBMCPP__)\n#    if defined(_ILP32)\n#      define CURL_SIZEOF_LONG           4\n#    elif defined(_LP64)\n#      define CURL_SIZEOF_LONG           8\n#    endif\n#    if defined(_LONG_LONG)\n#      define CURL_TYPEOF_CURL_OFF_T     long long\n#      define CURL_FORMAT_CURL_OFF_T     \"lld\"\n#      define CURL_FORMAT_CURL_OFF_TU    \"llu\"\n#      define CURL_FORMAT_OFF_T          \"%lld\"\n#      define CURL_SIZEOF_CURL_OFF_T     8\n#      define CURL_SUFFIX_CURL_OFF_T     LL\n#      define CURL_SUFFIX_CURL_OFF_TU    ULL\n#    elif defined(_LP64)\n#      define CURL_TYPEOF_CURL_OFF_T     long\n#      define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#      define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#      define CURL_FORMAT_OFF_T          \"%ld\"\n#      define CURL_SIZEOF_CURL_OFF_T     8\n#      define CURL_SUFFIX_CURL_OFF_T     L\n#      define CURL_SUFFIX_CURL_OFF_TU    UL\n#    else\n#      define CURL_TYPEOF_CURL_OFF_T     long\n#      define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#      define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#      define CURL_FORMAT_OFF_T          \"%ld\"\n#      define CURL_SIZEOF_CURL_OFF_T     4\n#      define CURL_SUFFIX_CURL_OFF_T     L\n#      define CURL_SUFFIX_CURL_OFF_TU    UL\n#    endif\n#    define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t\n#    define CURL_SIZEOF_CURL_SOCKLEN_T 4\n#    define CURL_PULL_SYS_TYPES_H      1\n#    define CURL_PULL_SYS_SOCKET_H     1\n#  endif\n\n#elif defined(TPF)\n#  define CURL_SIZEOF_LONG           8\n#  define CURL_TYPEOF_CURL_OFF_T     long\n#  define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#  define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#  define CURL_FORMAT_OFF_T          \"%ld\"\n#  define CURL_SIZEOF_CURL_OFF_T     8\n#  define CURL_SUFFIX_CURL_OFF_T     L\n#  define CURL_SUFFIX_CURL_OFF_TU    UL\n#  define CURL_TYPEOF_CURL_SOCKLEN_T int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n/* ===================================== */\n/*    KEEP MSVC THE PENULTIMATE ENTRY    */\n/* ===================================== */\n\n#elif defined(_MSC_VER)\n#  if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     __int64\n#    define CURL_FORMAT_CURL_OFF_T     \"I64d\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"I64u\"\n#    define CURL_FORMAT_OFF_T          \"%I64d\"\n#    define CURL_SIZEOF_CURL_OFF_T     8\n#    define CURL_SUFFIX_CURL_OFF_T     i64\n#    define CURL_SUFFIX_CURL_OFF_TU    ui64\n#  else\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     long\n#    define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#    define CURL_FORMAT_OFF_T          \"%ld\"\n#    define CURL_SIZEOF_CURL_OFF_T     4\n#    define CURL_SUFFIX_CURL_OFF_T     L\n#    define CURL_SUFFIX_CURL_OFF_TU    UL\n#  endif\n#  define CURL_TYPEOF_CURL_SOCKLEN_T int\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n\n/* ===================================== */\n/*    KEEP GENERIC GCC THE LAST ENTRY    */\n/* ===================================== */\n\n#elif defined(__GNUC__)\n#  if defined(__ILP32__) || \\\n      defined(__i386__) || defined(__ppc__) || defined(__arm__)\n#    define CURL_SIZEOF_LONG           4\n#    define CURL_TYPEOF_CURL_OFF_T     long long\n#    define CURL_FORMAT_CURL_OFF_T     \"lld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"llu\"\n#    define CURL_FORMAT_OFF_T          \"%lld\"\n#    define CURL_SIZEOF_CURL_OFF_T     8\n#    define CURL_SUFFIX_CURL_OFF_T     LL\n#    define CURL_SUFFIX_CURL_OFF_TU    ULL\n#  elif defined(__LP64__) || \\\n        defined(__x86_64__) || defined(__ppc64__)\n#    define CURL_SIZEOF_LONG           8\n#    define CURL_TYPEOF_CURL_OFF_T     long\n#    define CURL_FORMAT_CURL_OFF_T     \"ld\"\n#    define CURL_FORMAT_CURL_OFF_TU    \"lu\"\n#    define CURL_FORMAT_OFF_T          \"%ld\"\n#    define CURL_SIZEOF_CURL_OFF_T     8\n#    define CURL_SUFFIX_CURL_OFF_T     L\n#    define CURL_SUFFIX_CURL_OFF_TU    UL\n#  endif\n#  define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t\n#  define CURL_SIZEOF_CURL_SOCKLEN_T 4\n#  define CURL_PULL_SYS_TYPES_H      1\n#  define CURL_PULL_SYS_SOCKET_H     1\n\n#else\n#  error \"Unknown non-configure build target!\"\n   Error Compilation_aborted_Unknown_non_configure_build_target\n#endif\n\n/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file  */\n/* sys/types.h is required here to properly make type definitions below. */\n#ifdef CURL_PULL_SYS_TYPES_H\n#  include <sys/types.h>\n#endif\n\n/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file  */\n/* sys/socket.h is required here to properly make type definitions below. */\n#ifdef CURL_PULL_SYS_SOCKET_H\n#  include <sys/socket.h>\n#endif\n\n/* Data type definition of curl_socklen_t. */\n\n#ifdef CURL_TYPEOF_CURL_SOCKLEN_T\n  typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;\n#endif\n\n/* Data type definition of curl_off_t. */\n\n#ifdef CURL_TYPEOF_CURL_OFF_T\n  typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;\n#endif\n\n#endif /* __CURL_CURLBUILD_H */\n"
  },
  {
    "path": "third_party/include/curl/curlrules.h",
    "content": "#ifndef __CURL_CURLRULES_H\n#define __CURL_CURLRULES_H\n/***************************************************************************\n *                                  _   _ ____  _\n *  Project                     ___| | | |  _ \\| |\n *                             / __| | | | |_) | |\n *                            | (__| |_| |  _ <| |___\n *                             \\___|\\___/|_| \\_\\_____|\n *\n * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.\n *\n * This software is licensed as described in the file COPYING, which\n * you should have received as part of this distribution. The terms\n * are also available at http://curl.haxx.se/docs/copyright.html.\n *\n * You may opt to use, copy, modify, merge, publish, distribute and/or sell\n * copies of the Software, and permit persons to whom the Software is\n * furnished to do so, under the terms of the COPYING file.\n *\n * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY\n * KIND, either express or implied.\n *\n ***************************************************************************/\n\n/* ================================================================ */\n/*                    COMPILE TIME SANITY CHECKS                    */\n/* ================================================================ */\n\n/*\n * NOTE 1:\n * -------\n *\n * All checks done in this file are intentionally placed in a public\n * header file which is pulled by curl/curl.h when an application is\n * being built using an already built libcurl library. Additionally\n * this file is also included and used when building the library.\n *\n * If compilation fails on this file it is certainly sure that the\n * problem is elsewhere. It could be a problem in the curlbuild.h\n * header file, or simply that you are using different compilation\n * settings than those used to build the library.\n *\n * Nothing in this file is intended to be modified or adjusted by the\n * curl library user nor by the curl library builder.\n *\n * Do not deactivate any check, these are done to make sure that the\n * library is properly built and used.\n *\n * You can find further help on the libcurl development mailing list:\n * http://cool.haxx.se/mailman/listinfo/curl-library/\n *\n * NOTE 2\n * ------\n *\n * Some of the following compile time checks are based on the fact\n * that the dimension of a constant array can not be a negative one.\n * In this way if the compile time verification fails, the compilation\n * will fail issuing an error. The error description wording is compiler\n * dependent but it will be quite similar to one of the following:\n *\n *   \"negative subscript or subscript is too large\"\n *   \"array must have at least one element\"\n *   \"-1 is an illegal array size\"\n *   \"size of array is negative\"\n *\n * If you are building an application which tries to use an already\n * built libcurl library and you are getting this kind of errors on\n * this file, it is a clear indication that there is a mismatch between\n * how the library was built and how you are trying to use it for your\n * application. Your already compiled or binary library provider is the\n * only one who can give you the details you need to properly use it.\n */\n\n/*\n * Verify that some macros are actually defined.\n */\n\n#ifndef CURL_SIZEOF_LONG\n#  error \"CURL_SIZEOF_LONG definition is missing!\"\n   Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing\n#endif\n\n#ifndef CURL_TYPEOF_CURL_SOCKLEN_T\n#  error \"CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!\"\n   Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing\n#endif\n\n#ifndef CURL_SIZEOF_CURL_SOCKLEN_T\n#  error \"CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!\"\n   Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing\n#endif\n\n#ifndef CURL_TYPEOF_CURL_OFF_T\n#  error \"CURL_TYPEOF_CURL_OFF_T definition is missing!\"\n   Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing\n#endif\n\n#ifndef CURL_FORMAT_CURL_OFF_T\n#  error \"CURL_FORMAT_CURL_OFF_T definition is missing!\"\n   Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing\n#endif\n\n#ifndef CURL_FORMAT_CURL_OFF_TU\n#  error \"CURL_FORMAT_CURL_OFF_TU definition is missing!\"\n   Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing\n#endif\n\n#ifndef CURL_FORMAT_OFF_T\n#  error \"CURL_FORMAT_OFF_T definition is missing!\"\n   Error Compilation_aborted_CURL_FORMAT_OFF_T_is_missing\n#endif\n\n#ifndef CURL_SIZEOF_CURL_OFF_T\n#  error \"CURL_SIZEOF_CURL_OFF_T definition is missing!\"\n   Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing\n#endif\n\n#ifndef CURL_SUFFIX_CURL_OFF_T\n#  error \"CURL_SUFFIX_CURL_OFF_T definition is missing!\"\n   Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing\n#endif\n\n#ifndef CURL_SUFFIX_CURL_OFF_TU\n#  error \"CURL_SUFFIX_CURL_OFF_TU definition is missing!\"\n   Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing\n#endif\n\n/*\n * Macros private to this header file.\n */\n\n#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1\n\n#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1\n\n/*\n * Verify that the size previously defined and expected for long\n * is the same as the one reported by sizeof() at compile time.\n */\n\ntypedef char\n  __curl_rule_01__\n    [CurlchkszEQ(long, CURL_SIZEOF_LONG)];\n\n/*\n * Verify that the size previously defined and expected for\n * curl_off_t is actually the the same as the one reported\n * by sizeof() at compile time.\n */\n\ntypedef char\n  __curl_rule_02__\n    [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];\n\n/*\n * Verify at compile time that the size of curl_off_t as reported\n * by sizeof() is greater or equal than the one reported for long\n * for the current compilation.\n */\n\ntypedef char\n  __curl_rule_03__\n    [CurlchkszGE(curl_off_t, long)];\n\n/*\n * Verify that the size previously defined and expected for\n * curl_socklen_t is actually the the same as the one reported\n * by sizeof() at compile time.\n */\n\ntypedef char\n  __curl_rule_04__\n    [CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)];\n\n/*\n * Verify at compile time that the size of curl_socklen_t as reported\n * by sizeof() is greater or equal than the one reported for int for\n * the current compilation.\n */\n\ntypedef char\n  __curl_rule_05__\n    [CurlchkszGE(curl_socklen_t, int)];\n\n/* ================================================================ */\n/*          EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS           */\n/* ================================================================ */\n\n/*\n * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow\n * these to be visible and exported by the external libcurl interface API,\n * while also making them visible to the library internals, simply including\n * curl_setup.h, without actually needing to include curl.h internally.\n * If some day this section would grow big enough, all this should be moved\n * to its own header file.\n */\n\n/*\n * Figure out if we can use the ## preprocessor operator, which is supported\n * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__\n * or  __cplusplus so we need to carefully check for them too.\n */\n\n#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \\\n  defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \\\n  defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \\\n  defined(__ILEC400__)\n  /* This compiler is believed to have an ISO compatible preprocessor */\n#define CURL_ISOCPP\n#else\n  /* This compiler is believed NOT to have an ISO compatible preprocessor */\n#undef CURL_ISOCPP\n#endif\n\n/*\n * Macros for minimum-width signed and unsigned curl_off_t integer constants.\n */\n\n#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551)\n#  define __CURL_OFF_T_C_HLPR2(x) x\n#  define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x)\n#  define CURL_OFF_T_C(Val)  __CURL_OFF_T_C_HLPR1(Val) ## \\\n                             __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T)\n#  define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \\\n                             __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU)\n#else\n#  ifdef CURL_ISOCPP\n#    define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix\n#  else\n#    define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix\n#  endif\n#  define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix)\n#  define CURL_OFF_T_C(Val)  __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T)\n#  define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU)\n#endif\n\n/*\n * Get rid of macros private to this header file.\n */\n\n#undef CurlchkszEQ\n#undef CurlchkszGE\n\n/*\n * Get rid of macros not intended to exist beyond this point.\n */\n\n#undef CURL_PULL_WS2TCPIP_H\n#undef CURL_PULL_SYS_TYPES_H\n#undef CURL_PULL_SYS_SOCKET_H\n#undef CURL_PULL_SYS_POLL_H\n#undef CURL_PULL_STDINT_H\n#undef CURL_PULL_INTTYPES_H\n\n#undef CURL_TYPEOF_CURL_SOCKLEN_T\n#undef CURL_TYPEOF_CURL_OFF_T\n\n#ifdef CURL_NO_OLDIES\n#undef CURL_FORMAT_OFF_T /* not required since 7.19.0 - obsoleted in 7.20.0 */\n#endif\n\n#endif /* __CURL_CURLRULES_H */\n"
  },
  {
    "path": "third_party/include/curl/curlver.h",
    "content": "#ifndef __CURL_CURLVER_H\n#define __CURL_CURLVER_H\n/***************************************************************************\n *                                  _   _ ____  _\n *  Project                     ___| | | |  _ \\| |\n *                             / __| | | | |_) | |\n *                            | (__| |_| |  _ <| |___\n *                             \\___|\\___/|_| \\_\\_____|\n *\n * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\n *\n * This software is licensed as described in the file COPYING, which\n * you should have received as part of this distribution. The terms\n * are also available at http://curl.haxx.se/docs/copyright.html.\n *\n * You may opt to use, copy, modify, merge, publish, distribute and/or sell\n * copies of the Software, and permit persons to whom the Software is\n * furnished to do so, under the terms of the COPYING file.\n *\n * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY\n * KIND, either express or implied.\n *\n ***************************************************************************/\n\n/* This header file contains nothing but libcurl version info, generated by\n   a script at release-time. This was made its own header file in 7.11.2 */\n\n/* This is the global package copyright */\n#define LIBCURL_COPYRIGHT \"1996 - 2013 Daniel Stenberg, <daniel@haxx.se>.\"\n\n/* This is the version number of the libcurl package from which this header\n   file origins: */\n#define LIBCURL_VERSION \"7.30.0-DEV\"\n\n/* The numeric version number is also available \"in parts\" by using these\n   defines: */\n#define LIBCURL_VERSION_MAJOR 7\n#define LIBCURL_VERSION_MINOR 30\n#define LIBCURL_VERSION_PATCH 0\n\n/* This is the numeric version of the libcurl version number, meant for easier\n   parsing and comparions by programs. The LIBCURL_VERSION_NUM define will\n   always follow this syntax:\n\n         0xXXYYZZ\n\n   Where XX, YY and ZZ are the main version, release and patch numbers in\n   hexadecimal (using 8 bits each). All three numbers are always represented\n   using two digits.  1.2 would appear as \"0x010200\" while version 9.11.7\n   appears as \"0x090b07\".\n\n   This 6-digit (24 bits) hexadecimal number does not show pre-release number,\n   and it is always a greater number in a more recent release. It makes\n   comparisons with greater than and less than work.\n*/\n#define LIBCURL_VERSION_NUM 0x071e00\n\n/*\n * This is the date and time when the full source package was created. The\n * timestamp is not stored in git, as the timestamp is properly set in the\n * tarballs by the maketgz script.\n *\n * The format of the date should follow this template:\n *\n * \"Mon Feb 12 11:35:33 UTC 2007\"\n */\n#define LIBCURL_TIMESTAMP \"DEV\"\n\n#endif /* __CURL_CURLVER_H */\n"
  },
  {
    "path": "third_party/include/curl/easy.h",
    "content": "#ifndef __CURL_EASY_H\n#define __CURL_EASY_H\n/***************************************************************************\n *                                  _   _ ____  _\n *  Project                     ___| | | |  _ \\| |\n *                             / __| | | | |_) | |\n *                            | (__| |_| |  _ <| |___\n *                             \\___|\\___/|_| \\_\\_____|\n *\n * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.\n *\n * This software is licensed as described in the file COPYING, which\n * you should have received as part of this distribution. The terms\n * are also available at http://curl.haxx.se/docs/copyright.html.\n *\n * You may opt to use, copy, modify, merge, publish, distribute and/or sell\n * copies of the Software, and permit persons to whom the Software is\n * furnished to do so, under the terms of the COPYING file.\n *\n * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY\n * KIND, either express or implied.\n *\n ***************************************************************************/\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\nCURL_EXTERN CURL *curl_easy_init(void);\nCURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);\nCURL_EXTERN CURLcode curl_easy_perform(CURL *curl);\nCURL_EXTERN void curl_easy_cleanup(CURL *curl);\n\n/*\n * NAME curl_easy_getinfo()\n *\n * DESCRIPTION\n *\n * Request internal information from the curl session with this function.  The\n * third argument MUST be a pointer to a long, a pointer to a char * or a\n * pointer to a double (as the documentation describes elsewhere).  The data\n * pointed to will be filled in accordingly and can be relied upon only if the\n * function returns CURLE_OK.  This function is intended to get used *AFTER* a\n * performed transfer, all results from this function are undefined until the\n * transfer is completed.\n */\nCURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);\n\n\n/*\n * NAME curl_easy_duphandle()\n *\n * DESCRIPTION\n *\n * Creates a new curl session handle with the same options set for the handle\n * passed in. Duplicating a handle could only be a matter of cloning data and\n * options, internal state info and things like persistent connections cannot\n * be transferred. It is useful in multithreaded applications when you can run\n * curl_easy_duphandle() for each new thread to avoid a series of identical\n * curl_easy_setopt() invokes in every thread.\n */\nCURL_EXTERN CURL* curl_easy_duphandle(CURL *curl);\n\n/*\n * NAME curl_easy_reset()\n *\n * DESCRIPTION\n *\n * Re-initializes a CURL handle to the default values. This puts back the\n * handle to the same state as it was in when it was just created.\n *\n * It does keep: live connections, the Session ID cache, the DNS cache and the\n * cookies.\n */\nCURL_EXTERN void curl_easy_reset(CURL *curl);\n\n/*\n * NAME curl_easy_recv()\n *\n * DESCRIPTION\n *\n * Receives data from the connected socket. Use after successful\n * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.\n */\nCURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,\n                                    size_t *n);\n\n/*\n * NAME curl_easy_send()\n *\n * DESCRIPTION\n *\n * Sends data over the connected socket. Use after successful\n * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.\n */\nCURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,\n                                    size_t buflen, size_t *n);\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "third_party/include/curl/mprintf.h",
    "content": "#ifndef __CURL_MPRINTF_H\n#define __CURL_MPRINTF_H\n/***************************************************************************\n *                                  _   _ ____  _\n *  Project                     ___| | | |  _ \\| |\n *                             / __| | | | |_) | |\n *                            | (__| |_| |  _ <| |___\n *                             \\___|\\___/|_| \\_\\_____|\n *\n * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\n *\n * This software is licensed as described in the file COPYING, which\n * you should have received as part of this distribution. The terms\n * are also available at http://curl.haxx.se/docs/copyright.html.\n *\n * You may opt to use, copy, modify, merge, publish, distribute and/or sell\n * copies of the Software, and permit persons to whom the Software is\n * furnished to do so, under the terms of the COPYING file.\n *\n * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY\n * KIND, either express or implied.\n *\n ***************************************************************************/\n\n#include <stdarg.h>\n#include <stdio.h> /* needed for FILE */\n\n#include \"curl.h\"\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\nCURL_EXTERN int curl_mprintf(const char *format, ...);\nCURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...);\nCURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...);\nCURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength,\n                               const char *format, ...);\nCURL_EXTERN int curl_mvprintf(const char *format, va_list args);\nCURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args);\nCURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args);\nCURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength,\n                                const char *format, va_list args);\nCURL_EXTERN char *curl_maprintf(const char *format, ...);\nCURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);\n\n#ifdef _MPRINTF_REPLACE\n# undef printf\n# undef fprintf\n# undef sprintf\n# undef vsprintf\n# undef snprintf\n# undef vprintf\n# undef vfprintf\n# undef vsnprintf\n# undef aprintf\n# undef vaprintf\n# define printf curl_mprintf\n# define fprintf curl_mfprintf\n#ifdef CURLDEBUG\n/* When built with CURLDEBUG we define away the sprintf functions since we\n   don't want internal code to be using them */\n# define sprintf sprintf_was_used\n# define vsprintf vsprintf_was_used\n#else\n# define sprintf curl_msprintf\n# define vsprintf curl_mvsprintf\n#endif\n# define snprintf curl_msnprintf\n# define vprintf curl_mvprintf\n# define vfprintf curl_mvfprintf\n# define vsnprintf curl_mvsnprintf\n# define aprintf curl_maprintf\n# define vaprintf curl_mvaprintf\n#endif\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif /* __CURL_MPRINTF_H */\n"
  },
  {
    "path": "third_party/include/curl/multi.h",
    "content": "#ifndef __CURL_MULTI_H\n#define __CURL_MULTI_H\n/***************************************************************************\n *                                  _   _ ____  _\n *  Project                     ___| | | |  _ \\| |\n *                             / __| | | | |_) | |\n *                            | (__| |_| |  _ <| |___\n *                             \\___|\\___/|_| \\_\\_____|\n *\n * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.\n *\n * This software is licensed as described in the file COPYING, which\n * you should have received as part of this distribution. The terms\n * are also available at http://curl.haxx.se/docs/copyright.html.\n *\n * You may opt to use, copy, modify, merge, publish, distribute and/or sell\n * copies of the Software, and permit persons to whom the Software is\n * furnished to do so, under the terms of the COPYING file.\n *\n * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY\n * KIND, either express or implied.\n *\n ***************************************************************************/\n/*\n  This is an \"external\" header file. Don't give away any internals here!\n\n  GOALS\n\n  o Enable a \"pull\" interface. The application that uses libcurl decides where\n    and when to ask libcurl to get/send data.\n\n  o Enable multiple simultaneous transfers in the same thread without making it\n    complicated for the application.\n\n  o Enable the application to select() on its own file descriptors and curl's\n    file descriptors simultaneous easily.\n\n*/\n\n/*\n * This header file should not really need to include \"curl.h\" since curl.h\n * itself includes this file and we expect user applications to do #include\n * <curl/curl.h> without the need for especially including multi.h.\n *\n * For some reason we added this include here at one point, and rather than to\n * break existing (wrongly written) libcurl applications, we leave it as-is\n * but with this warning attached.\n */\n#include \"curl.h\"\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef void CURLM;\n\ntypedef enum {\n  CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or\n                                    curl_multi_socket*() soon */\n  CURLM_OK,\n  CURLM_BAD_HANDLE,      /* the passed-in handle is not a valid CURLM handle */\n  CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */\n  CURLM_OUT_OF_MEMORY,   /* if you ever get this, you're in deep sh*t */\n  CURLM_INTERNAL_ERROR,  /* this is a libcurl bug */\n  CURLM_BAD_SOCKET,      /* the passed in socket argument did not match */\n  CURLM_UNKNOWN_OPTION,  /* curl_multi_setopt() with unsupported option */\n  CURLM_LAST\n} CURLMcode;\n\n/* just to make code nicer when using curl_multi_socket() you can now check\n   for CURLM_CALL_MULTI_SOCKET too in the same style it works for\n   curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */\n#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM\n\ntypedef enum {\n  CURLMSG_NONE, /* first, not used */\n  CURLMSG_DONE, /* This easy handle has completed. 'result' contains\n                   the CURLcode of the transfer */\n  CURLMSG_LAST /* last, not used */\n} CURLMSG;\n\nstruct CURLMsg {\n  CURLMSG msg;       /* what this message means */\n  CURL *easy_handle; /* the handle it concerns */\n  union {\n    void *whatever;    /* message-specific data */\n    CURLcode result;   /* return code for transfer */\n  } data;\n};\ntypedef struct CURLMsg CURLMsg;\n\n/* Based on poll(2) structure and values.\n * We don't use pollfd and POLL* constants explicitly\n * to cover platforms without poll(). */\n#define CURL_WAIT_POLLIN    0x0001\n#define CURL_WAIT_POLLPRI   0x0002\n#define CURL_WAIT_POLLOUT   0x0004\n\nstruct curl_waitfd {\n  curl_socket_t fd;\n  short events;\n  short revents; /* not supported yet */\n};\n\n/*\n * Name:    curl_multi_init()\n *\n * Desc:    inititalize multi-style curl usage\n *\n * Returns: a new CURLM handle to use in all 'curl_multi' functions.\n */\nCURL_EXTERN CURLM *curl_multi_init(void);\n\n/*\n * Name:    curl_multi_add_handle()\n *\n * Desc:    add a standard curl handle to the multi stack\n *\n * Returns: CURLMcode type, general multi error code.\n */\nCURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle,\n                                            CURL *curl_handle);\n\n /*\n  * Name:    curl_multi_remove_handle()\n  *\n  * Desc:    removes a curl handle from the multi stack again\n  *\n  * Returns: CURLMcode type, general multi error code.\n  */\nCURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle,\n                                               CURL *curl_handle);\n\n /*\n  * Name:    curl_multi_fdset()\n  *\n  * Desc:    Ask curl for its fd_set sets. The app can use these to select() or\n  *          poll() on. We want curl_multi_perform() called as soon as one of\n  *          them are ready.\n  *\n  * Returns: CURLMcode type, general multi error code.\n  */\nCURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,\n                                       fd_set *read_fd_set,\n                                       fd_set *write_fd_set,\n                                       fd_set *exc_fd_set,\n                                       int *max_fd);\n\n/*\n * Name:     curl_multi_wait()\n *\n * Desc:     Poll on all fds within a CURLM set as well as any\n *           additional fds passed to the function.\n *\n * Returns:  CURLMcode type, general multi error code.\n */\nCURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,\n                                      struct curl_waitfd extra_fds[],\n                                      unsigned int extra_nfds,\n                                      int timeout_ms,\n                                      int *ret);\n\n /*\n  * Name:    curl_multi_perform()\n  *\n  * Desc:    When the app thinks there's data available for curl it calls this\n  *          function to read/write whatever there is right now. This returns\n  *          as soon as the reads and writes are done. This function does not\n  *          require that there actually is data available for reading or that\n  *          data can be written, it can be called just in case. It returns\n  *          the number of handles that still transfer data in the second\n  *          argument's integer-pointer.\n  *\n  * Returns: CURLMcode type, general multi error code. *NOTE* that this only\n  *          returns errors etc regarding the whole multi stack. There might\n  *          still have occurred problems on invidual transfers even when this\n  *          returns OK.\n  */\nCURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle,\n                                         int *running_handles);\n\n /*\n  * Name:    curl_multi_cleanup()\n  *\n  * Desc:    Cleans up and removes a whole multi stack. It does not free or\n  *          touch any individual easy handles in any way. We need to define\n  *          in what state those handles will be if this function is called\n  *          in the middle of a transfer.\n  *\n  * Returns: CURLMcode type, general multi error code.\n  */\nCURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);\n\n/*\n * Name:    curl_multi_info_read()\n *\n * Desc:    Ask the multi handle if there's any messages/informationals from\n *          the individual transfers. Messages include informationals such as\n *          error code from the transfer or just the fact that a transfer is\n *          completed. More details on these should be written down as well.\n *\n *          Repeated calls to this function will return a new struct each\n *          time, until a special \"end of msgs\" struct is returned as a signal\n *          that there is no more to get at this point.\n *\n *          The data the returned pointer points to will not survive calling\n *          curl_multi_cleanup().\n *\n *          The 'CURLMsg' struct is meant to be very simple and only contain\n *          very basic informations. If more involved information is wanted,\n *          we will provide the particular \"transfer handle\" in that struct\n *          and that should/could/would be used in subsequent\n *          curl_easy_getinfo() calls (or similar). The point being that we\n *          must never expose complex structs to applications, as then we'll\n *          undoubtably get backwards compatibility problems in the future.\n *\n * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out\n *          of structs. It also writes the number of messages left in the\n *          queue (after this read) in the integer the second argument points\n *          to.\n */\nCURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle,\n                                          int *msgs_in_queue);\n\n/*\n * Name:    curl_multi_strerror()\n *\n * Desc:    The curl_multi_strerror function may be used to turn a CURLMcode\n *          value into the equivalent human readable error string.  This is\n *          useful for printing meaningful error messages.\n *\n * Returns: A pointer to a zero-terminated error message.\n */\nCURL_EXTERN const char *curl_multi_strerror(CURLMcode);\n\n/*\n * Name:    curl_multi_socket() and\n *          curl_multi_socket_all()\n *\n * Desc:    An alternative version of curl_multi_perform() that allows the\n *          application to pass in one of the file descriptors that have been\n *          detected to have \"action\" on them and let libcurl perform.\n *          See man page for details.\n */\n#define CURL_POLL_NONE   0\n#define CURL_POLL_IN     1\n#define CURL_POLL_OUT    2\n#define CURL_POLL_INOUT  3\n#define CURL_POLL_REMOVE 4\n\n#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD\n\n#define CURL_CSELECT_IN   0x01\n#define CURL_CSELECT_OUT  0x02\n#define CURL_CSELECT_ERR  0x04\n\ntypedef int (*curl_socket_callback)(CURL *easy,      /* easy handle */\n                                    curl_socket_t s, /* socket */\n                                    int what,        /* see above */\n                                    void *userp,     /* private callback\n                                                        pointer */\n                                    void *socketp);  /* private socket\n                                                        pointer */\n/*\n * Name:    curl_multi_timer_callback\n *\n * Desc:    Called by libcurl whenever the library detects a change in the\n *          maximum number of milliseconds the app is allowed to wait before\n *          curl_multi_socket() or curl_multi_perform() must be called\n *          (to allow libcurl's timed events to take place).\n *\n * Returns: The callback should return zero.\n */\ntypedef int (*curl_multi_timer_callback)(CURLM *multi,    /* multi handle */\n                                         long timeout_ms, /* see above */\n                                         void *userp);    /* private callback\n                                                             pointer */\n\nCURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s,\n                                        int *running_handles);\n\nCURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle,\n                                               curl_socket_t s,\n                                               int ev_bitmask,\n                                               int *running_handles);\n\nCURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle,\n                                            int *running_handles);\n\n#ifndef CURL_ALLOW_OLD_MULTI_SOCKET\n/* This macro below was added in 7.16.3 to push users who recompile to use\n   the new curl_multi_socket_action() instead of the old curl_multi_socket()\n*/\n#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z)\n#endif\n\n/*\n * Name:    curl_multi_timeout()\n *\n * Desc:    Returns the maximum number of milliseconds the app is allowed to\n *          wait before curl_multi_socket() or curl_multi_perform() must be\n *          called (to allow libcurl's timed events to take place).\n *\n * Returns: CURLM error code.\n */\nCURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle,\n                                         long *milliseconds);\n\n#undef CINIT /* re-using the same name as in curl.h */\n\n#ifdef CURL_ISOCPP\n#define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num\n#else\n/* The macro \"##\" is ISO C, we assume pre-ISO C doesn't support it. */\n#define LONG          CURLOPTTYPE_LONG\n#define OBJECTPOINT   CURLOPTTYPE_OBJECTPOINT\n#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT\n#define OFF_T         CURLOPTTYPE_OFF_T\n#define CINIT(name,type,number) CURLMOPT_/**/name = type + number\n#endif\n\ntypedef enum {\n  /* This is the socket callback function pointer */\n  CINIT(SOCKETFUNCTION, FUNCTIONPOINT, 1),\n\n  /* This is the argument passed to the socket callback */\n  CINIT(SOCKETDATA, OBJECTPOINT, 2),\n\n    /* set to 1 to enable pipelining for this multi handle */\n  CINIT(PIPELINING, LONG, 3),\n\n   /* This is the timer callback function pointer */\n  CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4),\n\n  /* This is the argument passed to the timer callback */\n  CINIT(TIMERDATA, OBJECTPOINT, 5),\n\n  /* maximum number of entries in the connection cache */\n  CINIT(MAXCONNECTS, LONG, 6),\n\n  /* maximum number of (pipelining) connections to one host */\n  CINIT(MAX_HOST_CONNECTIONS, LONG, 7),\n\n  /* maximum number of requests in a pipeline */\n  CINIT(MAX_PIPELINE_LENGTH, LONG, 8),\n\n  /* a connection with a content-length longer than this\n     will not be considered for pipelining */\n  CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9),\n\n  /* a connection with a chunk length longer than this\n     will not be considered for pipelining */\n  CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10),\n\n  /* a list of site names(+port) that are blacklisted from\n     pipelining */\n  CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11),\n\n  /* a list of server types that are blacklisted from\n     pipelining */\n  CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12),\n\n  /* maximum number of open connections in total */\n  CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13),\n\n  CURLMOPT_LASTENTRY /* the last unused */\n} CURLMoption;\n\n\n/*\n * Name:    curl_multi_setopt()\n *\n * Desc:    Sets options for the multi handle.\n *\n * Returns: CURLM error code.\n */\nCURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle,\n                                        CURLMoption option, ...);\n\n\n/*\n * Name:    curl_multi_assign()\n *\n * Desc:    This function sets an association in the multi handle between the\n *          given socket and a private pointer of the application. This is\n *          (only) useful for curl_multi_socket uses.\n *\n * Returns: CURLM error code.\n */\nCURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,\n                                        curl_socket_t sockfd, void *sockp);\n\n#ifdef __cplusplus\n} /* end of extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "third_party/include/curl/stdcheaders.h",
    "content": "#ifndef __STDC_HEADERS_H\n#define __STDC_HEADERS_H\n/***************************************************************************\n *                                  _   _ ____  _\n *  Project                     ___| | | |  _ \\| |\n *                             / __| | | | |_) | |\n *                            | (__| |_| |  _ <| |___\n *                             \\___|\\___/|_| \\_\\_____|\n *\n * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.\n *\n * This software is licensed as described in the file COPYING, which\n * you should have received as part of this distribution. The terms\n * are also available at http://curl.haxx.se/docs/copyright.html.\n *\n * You may opt to use, copy, modify, merge, publish, distribute and/or sell\n * copies of the Software, and permit persons to whom the Software is\n * furnished to do so, under the terms of the COPYING file.\n *\n * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY\n * KIND, either express or implied.\n *\n ***************************************************************************/\n\n#include <sys/types.h>\n\nsize_t fread (void *, size_t, size_t, FILE *);\nsize_t fwrite (const void *, size_t, size_t, FILE *);\n\nint strcasecmp(const char *, const char *);\nint strncasecmp(const char *, const char *, size_t);\n\n#endif /* __STDC_HEADERS_H */\n"
  },
  {
    "path": "third_party/include/curl/typecheck-gcc.h",
    "content": "#ifndef __CURL_TYPECHECK_GCC_H\n#define __CURL_TYPECHECK_GCC_H\n/***************************************************************************\n *                                  _   _ ____  _\n *  Project                     ___| | | |  _ \\| |\n *                             / __| | | | |_) | |\n *                            | (__| |_| |  _ <| |___\n *                             \\___|\\___/|_| \\_\\_____|\n *\n * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.\n *\n * This software is licensed as described in the file COPYING, which\n * you should have received as part of this distribution. The terms\n * are also available at http://curl.haxx.se/docs/copyright.html.\n *\n * You may opt to use, copy, modify, merge, publish, distribute and/or sell\n * copies of the Software, and permit persons to whom the Software is\n * furnished to do so, under the terms of the COPYING file.\n *\n * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY\n * KIND, either express or implied.\n *\n ***************************************************************************/\n\n/* wraps curl_easy_setopt() with typechecking */\n\n/* To add a new kind of warning, add an\n *   if(_curl_is_sometype_option(_curl_opt))\n *     if(!_curl_is_sometype(value))\n *       _curl_easy_setopt_err_sometype();\n * block and define _curl_is_sometype_option, _curl_is_sometype and\n * _curl_easy_setopt_err_sometype below\n *\n * NOTE: We use two nested 'if' statements here instead of the && operator, in\n *       order to work around gcc bug #32061.  It affects only gcc 4.3.x/4.4.x\n *       when compiling with -Wlogical-op.\n *\n * To add an option that uses the same type as an existing option, you'll just\n * need to extend the appropriate _curl_*_option macro\n */\n#define curl_easy_setopt(handle, option, value)                               \\\n__extension__ ({                                                              \\\n  __typeof__ (option) _curl_opt = option;                                     \\\n  if(__builtin_constant_p(_curl_opt)) {                                       \\\n    if(_curl_is_long_option(_curl_opt))                                       \\\n      if(!_curl_is_long(value))                                               \\\n        _curl_easy_setopt_err_long();                                         \\\n    if(_curl_is_off_t_option(_curl_opt))                                      \\\n      if(!_curl_is_off_t(value))                                              \\\n        _curl_easy_setopt_err_curl_off_t();                                   \\\n    if(_curl_is_string_option(_curl_opt))                                     \\\n      if(!_curl_is_string(value))                                             \\\n        _curl_easy_setopt_err_string();                                       \\\n    if(_curl_is_write_cb_option(_curl_opt))                                   \\\n      if(!_curl_is_write_cb(value))                                           \\\n        _curl_easy_setopt_err_write_callback();                               \\\n    if((_curl_opt) == CURLOPT_READFUNCTION)                                   \\\n      if(!_curl_is_read_cb(value))                                            \\\n        _curl_easy_setopt_err_read_cb();                                      \\\n    if((_curl_opt) == CURLOPT_IOCTLFUNCTION)                                  \\\n      if(!_curl_is_ioctl_cb(value))                                           \\\n        _curl_easy_setopt_err_ioctl_cb();                                     \\\n    if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION)                                \\\n      if(!_curl_is_sockopt_cb(value))                                         \\\n        _curl_easy_setopt_err_sockopt_cb();                                   \\\n    if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION)                             \\\n      if(!_curl_is_opensocket_cb(value))                                      \\\n        _curl_easy_setopt_err_opensocket_cb();                                \\\n    if((_curl_opt) == CURLOPT_PROGRESSFUNCTION)                               \\\n      if(!_curl_is_progress_cb(value))                                        \\\n        _curl_easy_setopt_err_progress_cb();                                  \\\n    if((_curl_opt) == CURLOPT_DEBUGFUNCTION)                                  \\\n      if(!_curl_is_debug_cb(value))                                           \\\n        _curl_easy_setopt_err_debug_cb();                                     \\\n    if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION)                               \\\n      if(!_curl_is_ssl_ctx_cb(value))                                         \\\n        _curl_easy_setopt_err_ssl_ctx_cb();                                   \\\n    if(_curl_is_conv_cb_option(_curl_opt))                                    \\\n      if(!_curl_is_conv_cb(value))                                            \\\n        _curl_easy_setopt_err_conv_cb();                                      \\\n    if((_curl_opt) == CURLOPT_SEEKFUNCTION)                                   \\\n      if(!_curl_is_seek_cb(value))                                            \\\n        _curl_easy_setopt_err_seek_cb();                                      \\\n    if(_curl_is_cb_data_option(_curl_opt))                                    \\\n      if(!_curl_is_cb_data(value))                                            \\\n        _curl_easy_setopt_err_cb_data();                                      \\\n    if((_curl_opt) == CURLOPT_ERRORBUFFER)                                    \\\n      if(!_curl_is_error_buffer(value))                                       \\\n        _curl_easy_setopt_err_error_buffer();                                 \\\n    if((_curl_opt) == CURLOPT_STDERR)                                         \\\n      if(!_curl_is_FILE(value))                                               \\\n        _curl_easy_setopt_err_FILE();                                         \\\n    if(_curl_is_postfields_option(_curl_opt))                                 \\\n      if(!_curl_is_postfields(value))                                         \\\n        _curl_easy_setopt_err_postfields();                                   \\\n    if((_curl_opt) == CURLOPT_HTTPPOST)                                       \\\n      if(!_curl_is_arr((value), struct curl_httppost))                        \\\n        _curl_easy_setopt_err_curl_httpost();                                 \\\n    if(_curl_is_slist_option(_curl_opt))                                      \\\n      if(!_curl_is_arr((value), struct curl_slist))                           \\\n        _curl_easy_setopt_err_curl_slist();                                   \\\n    if((_curl_opt) == CURLOPT_SHARE)                                          \\\n      if(!_curl_is_ptr((value), CURLSH))                                      \\\n        _curl_easy_setopt_err_CURLSH();                                       \\\n  }                                                                           \\\n  curl_easy_setopt(handle, _curl_opt, value);                                 \\\n})\n\n/* wraps curl_easy_getinfo() with typechecking */\n/* FIXME: don't allow const pointers */\n#define curl_easy_getinfo(handle, info, arg)                                  \\\n__extension__ ({                                                              \\\n  __typeof__ (info) _curl_info = info;                                        \\\n  if(__builtin_constant_p(_curl_info)) {                                      \\\n    if(_curl_is_string_info(_curl_info))                                      \\\n      if(!_curl_is_arr((arg), char *))                                        \\\n        _curl_easy_getinfo_err_string();                                      \\\n    if(_curl_is_long_info(_curl_info))                                        \\\n      if(!_curl_is_arr((arg), long))                                          \\\n        _curl_easy_getinfo_err_long();                                        \\\n    if(_curl_is_double_info(_curl_info))                                      \\\n      if(!_curl_is_arr((arg), double))                                        \\\n        _curl_easy_getinfo_err_double();                                      \\\n    if(_curl_is_slist_info(_curl_info))                                       \\\n      if(!_curl_is_arr((arg), struct curl_slist *))                           \\\n        _curl_easy_getinfo_err_curl_slist();                                  \\\n  }                                                                           \\\n  curl_easy_getinfo(handle, _curl_info, arg);                                 \\\n})\n\n/* TODO: typechecking for curl_share_setopt() and curl_multi_setopt(),\n * for now just make sure that the functions are called with three\n * arguments\n */\n#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)\n#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)\n\n\n/* the actual warnings, triggered by calling the _curl_easy_setopt_err*\n * functions */\n\n/* To define a new warning, use _CURL_WARNING(identifier, \"message\") */\n#define _CURL_WARNING(id, message)                                            \\\n  static void __attribute__((__warning__(message)))                           \\\n  __attribute__((__unused__)) __attribute__((__noinline__))                   \\\n  id(void) { __asm__(\"\"); }\n\n_CURL_WARNING(_curl_easy_setopt_err_long,\n  \"curl_easy_setopt expects a long argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_curl_off_t,\n  \"curl_easy_setopt expects a curl_off_t argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_string,\n              \"curl_easy_setopt expects a \"\n              \"string (char* or char[]) argument for this option\"\n  )\n_CURL_WARNING(_curl_easy_setopt_err_write_callback,\n  \"curl_easy_setopt expects a curl_write_callback argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_read_cb,\n  \"curl_easy_setopt expects a curl_read_callback argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_ioctl_cb,\n  \"curl_easy_setopt expects a curl_ioctl_callback argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_sockopt_cb,\n  \"curl_easy_setopt expects a curl_sockopt_callback argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_opensocket_cb,\n              \"curl_easy_setopt expects a \"\n              \"curl_opensocket_callback argument for this option\"\n  )\n_CURL_WARNING(_curl_easy_setopt_err_progress_cb,\n  \"curl_easy_setopt expects a curl_progress_callback argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_debug_cb,\n  \"curl_easy_setopt expects a curl_debug_callback argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_ssl_ctx_cb,\n  \"curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_conv_cb,\n  \"curl_easy_setopt expects a curl_conv_callback argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_seek_cb,\n  \"curl_easy_setopt expects a curl_seek_callback argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_cb_data,\n              \"curl_easy_setopt expects a \"\n              \"private data pointer as argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_error_buffer,\n              \"curl_easy_setopt expects a \"\n              \"char buffer of CURL_ERROR_SIZE as argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_FILE,\n  \"curl_easy_setopt expects a FILE* argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_postfields,\n  \"curl_easy_setopt expects a void* or char* argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_curl_httpost,\n  \"curl_easy_setopt expects a struct curl_httppost* argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_curl_slist,\n  \"curl_easy_setopt expects a struct curl_slist* argument for this option\")\n_CURL_WARNING(_curl_easy_setopt_err_CURLSH,\n  \"curl_easy_setopt expects a CURLSH* argument for this option\")\n\n_CURL_WARNING(_curl_easy_getinfo_err_string,\n  \"curl_easy_getinfo expects a pointer to char * for this info\")\n_CURL_WARNING(_curl_easy_getinfo_err_long,\n  \"curl_easy_getinfo expects a pointer to long for this info\")\n_CURL_WARNING(_curl_easy_getinfo_err_double,\n  \"curl_easy_getinfo expects a pointer to double for this info\")\n_CURL_WARNING(_curl_easy_getinfo_err_curl_slist,\n  \"curl_easy_getinfo expects a pointer to struct curl_slist * for this info\")\n\n/* groups of curl_easy_setops options that take the same type of argument */\n\n/* To add a new option to one of the groups, just add\n *   (option) == CURLOPT_SOMETHING\n * to the or-expression. If the option takes a long or curl_off_t, you don't\n * have to do anything\n */\n\n/* evaluates to true if option takes a long argument */\n#define _curl_is_long_option(option)                                          \\\n  (0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT)\n\n#define _curl_is_off_t_option(option)                                         \\\n  ((option) > CURLOPTTYPE_OFF_T)\n\n/* evaluates to true if option takes a char* argument */\n#define _curl_is_string_option(option)                                        \\\n  ((option) == CURLOPT_URL ||                                                 \\\n   (option) == CURLOPT_PROXY ||                                               \\\n   (option) == CURLOPT_INTERFACE ||                                           \\\n   (option) == CURLOPT_NETRC_FILE ||                                          \\\n   (option) == CURLOPT_USERPWD ||                                             \\\n   (option) == CURLOPT_USERNAME ||                                            \\\n   (option) == CURLOPT_PASSWORD ||                                            \\\n   (option) == CURLOPT_PROXYUSERPWD ||                                        \\\n   (option) == CURLOPT_PROXYUSERNAME ||                                       \\\n   (option) == CURLOPT_PROXYPASSWORD ||                                       \\\n   (option) == CURLOPT_NOPROXY ||                                             \\\n   (option) == CURLOPT_ACCEPT_ENCODING ||                                     \\\n   (option) == CURLOPT_REFERER ||                                             \\\n   (option) == CURLOPT_USERAGENT ||                                           \\\n   (option) == CURLOPT_COOKIE ||                                              \\\n   (option) == CURLOPT_COOKIEFILE ||                                          \\\n   (option) == CURLOPT_COOKIEJAR ||                                           \\\n   (option) == CURLOPT_COOKIELIST ||                                          \\\n   (option) == CURLOPT_FTPPORT ||                                             \\\n   (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER ||                             \\\n   (option) == CURLOPT_FTP_ACCOUNT ||                                         \\\n   (option) == CURLOPT_RANGE ||                                               \\\n   (option) == CURLOPT_CUSTOMREQUEST ||                                       \\\n   (option) == CURLOPT_SSLCERT ||                                             \\\n   (option) == CURLOPT_SSLCERTTYPE ||                                         \\\n   (option) == CURLOPT_SSLKEY ||                                              \\\n   (option) == CURLOPT_SSLKEYTYPE ||                                          \\\n   (option) == CURLOPT_KEYPASSWD ||                                           \\\n   (option) == CURLOPT_SSLENGINE ||                                           \\\n   (option) == CURLOPT_CAINFO ||                                              \\\n   (option) == CURLOPT_CAPATH ||                                              \\\n   (option) == CURLOPT_RANDOM_FILE ||                                         \\\n   (option) == CURLOPT_EGDSOCKET ||                                           \\\n   (option) == CURLOPT_SSL_CIPHER_LIST ||                                     \\\n   (option) == CURLOPT_KRBLEVEL ||                                            \\\n   (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 ||                             \\\n   (option) == CURLOPT_SSH_PUBLIC_KEYFILE ||                                  \\\n   (option) == CURLOPT_SSH_PRIVATE_KEYFILE ||                                 \\\n   (option) == CURLOPT_CRLFILE ||                                             \\\n   (option) == CURLOPT_ISSUERCERT ||                                          \\\n   (option) == CURLOPT_SOCKS5_GSSAPI_SERVICE ||                               \\\n   (option) == CURLOPT_SSH_KNOWNHOSTS ||                                      \\\n   (option) == CURLOPT_MAIL_FROM ||                                           \\\n   (option) == CURLOPT_RTSP_SESSION_ID ||                                     \\\n   (option) == CURLOPT_RTSP_STREAM_URI ||                                     \\\n   (option) == CURLOPT_RTSP_TRANSPORT ||                                      \\\n   0)\n\n/* evaluates to true if option takes a curl_write_callback argument */\n#define _curl_is_write_cb_option(option)                                      \\\n  ((option) == CURLOPT_HEADERFUNCTION ||                                      \\\n   (option) == CURLOPT_WRITEFUNCTION)\n\n/* evaluates to true if option takes a curl_conv_callback argument */\n#define _curl_is_conv_cb_option(option)                                       \\\n  ((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION ||                            \\\n   (option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION ||                          \\\n   (option) == CURLOPT_CONV_FROM_UTF8_FUNCTION)\n\n/* evaluates to true if option takes a data argument to pass to a callback */\n#define _curl_is_cb_data_option(option)                                       \\\n  ((option) == CURLOPT_WRITEDATA ||                                           \\\n   (option) == CURLOPT_READDATA ||                                            \\\n   (option) == CURLOPT_IOCTLDATA ||                                           \\\n   (option) == CURLOPT_SOCKOPTDATA ||                                         \\\n   (option) == CURLOPT_OPENSOCKETDATA ||                                      \\\n   (option) == CURLOPT_PROGRESSDATA ||                                        \\\n   (option) == CURLOPT_WRITEHEADER ||                                         \\\n   (option) == CURLOPT_DEBUGDATA ||                                           \\\n   (option) == CURLOPT_SSL_CTX_DATA ||                                        \\\n   (option) == CURLOPT_SEEKDATA ||                                            \\\n   (option) == CURLOPT_PRIVATE ||                                             \\\n   (option) == CURLOPT_SSH_KEYDATA ||                                         \\\n   (option) == CURLOPT_INTERLEAVEDATA ||                                      \\\n   (option) == CURLOPT_CHUNK_DATA ||                                          \\\n   (option) == CURLOPT_FNMATCH_DATA ||                                        \\\n   0)\n\n/* evaluates to true if option takes a POST data argument (void* or char*) */\n#define _curl_is_postfields_option(option)                                    \\\n  ((option) == CURLOPT_POSTFIELDS ||                                          \\\n   (option) == CURLOPT_COPYPOSTFIELDS ||                                      \\\n   0)\n\n/* evaluates to true if option takes a struct curl_slist * argument */\n#define _curl_is_slist_option(option)                                         \\\n  ((option) == CURLOPT_HTTPHEADER ||                                          \\\n   (option) == CURLOPT_HTTP200ALIASES ||                                      \\\n   (option) == CURLOPT_QUOTE ||                                               \\\n   (option) == CURLOPT_POSTQUOTE ||                                           \\\n   (option) == CURLOPT_PREQUOTE ||                                            \\\n   (option) == CURLOPT_TELNETOPTIONS ||                                       \\\n   (option) == CURLOPT_MAIL_RCPT ||                                           \\\n   0)\n\n/* groups of curl_easy_getinfo infos that take the same type of argument */\n\n/* evaluates to true if info expects a pointer to char * argument */\n#define _curl_is_string_info(info)                                            \\\n  (CURLINFO_STRING < (info) && (info) < CURLINFO_LONG)\n\n/* evaluates to true if info expects a pointer to long argument */\n#define _curl_is_long_info(info)                                              \\\n  (CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE)\n\n/* evaluates to true if info expects a pointer to double argument */\n#define _curl_is_double_info(info)                                            \\\n  (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST)\n\n/* true if info expects a pointer to struct curl_slist * argument */\n#define _curl_is_slist_info(info)                                             \\\n  (CURLINFO_SLIST < (info))\n\n\n/* typecheck helpers -- check whether given expression has requested type*/\n\n/* For pointers, you can use the _curl_is_ptr/_curl_is_arr macros,\n * otherwise define a new macro. Search for __builtin_types_compatible_p\n * in the GCC manual.\n * NOTE: these macros MUST NOT EVALUATE their arguments! The argument is\n * the actual expression passed to the curl_easy_setopt macro. This\n * means that you can only apply the sizeof and __typeof__ operators, no\n * == or whatsoever.\n */\n\n/* XXX: should evaluate to true iff expr is a pointer */\n#define _curl_is_any_ptr(expr)                                                \\\n  (sizeof(expr) == sizeof(void*))\n\n/* evaluates to true if expr is NULL */\n/* XXX: must not evaluate expr, so this check is not accurate */\n#define _curl_is_NULL(expr)                                                   \\\n  (__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL)))\n\n/* evaluates to true if expr is type*, const type* or NULL */\n#define _curl_is_ptr(expr, type)                                              \\\n  (_curl_is_NULL(expr) ||                                                     \\\n   __builtin_types_compatible_p(__typeof__(expr), type *) ||                  \\\n   __builtin_types_compatible_p(__typeof__(expr), const type *))\n\n/* evaluates to true if expr is one of type[], type*, NULL or const type* */\n#define _curl_is_arr(expr, type)                                              \\\n  (_curl_is_ptr((expr), type) ||                                              \\\n   __builtin_types_compatible_p(__typeof__(expr), type []))\n\n/* evaluates to true if expr is a string */\n#define _curl_is_string(expr)                                                 \\\n  (_curl_is_arr((expr), char) ||                                              \\\n   _curl_is_arr((expr), signed char) ||                                       \\\n   _curl_is_arr((expr), unsigned char))\n\n/* evaluates to true if expr is a long (no matter the signedness)\n * XXX: for now, int is also accepted (and therefore short and char, which\n * are promoted to int when passed to a variadic function) */\n#define _curl_is_long(expr)                                                   \\\n  (__builtin_types_compatible_p(__typeof__(expr), long) ||                    \\\n   __builtin_types_compatible_p(__typeof__(expr), signed long) ||             \\\n   __builtin_types_compatible_p(__typeof__(expr), unsigned long) ||           \\\n   __builtin_types_compatible_p(__typeof__(expr), int) ||                     \\\n   __builtin_types_compatible_p(__typeof__(expr), signed int) ||              \\\n   __builtin_types_compatible_p(__typeof__(expr), unsigned int) ||            \\\n   __builtin_types_compatible_p(__typeof__(expr), short) ||                   \\\n   __builtin_types_compatible_p(__typeof__(expr), signed short) ||            \\\n   __builtin_types_compatible_p(__typeof__(expr), unsigned short) ||          \\\n   __builtin_types_compatible_p(__typeof__(expr), char) ||                    \\\n   __builtin_types_compatible_p(__typeof__(expr), signed char) ||             \\\n   __builtin_types_compatible_p(__typeof__(expr), unsigned char))\n\n/* evaluates to true if expr is of type curl_off_t */\n#define _curl_is_off_t(expr)                                                  \\\n  (__builtin_types_compatible_p(__typeof__(expr), curl_off_t))\n\n/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */\n/* XXX: also check size of an char[] array? */\n#define _curl_is_error_buffer(expr)                                           \\\n  (_curl_is_NULL(expr) ||                                                     \\\n   __builtin_types_compatible_p(__typeof__(expr), char *) ||                  \\\n   __builtin_types_compatible_p(__typeof__(expr), char[]))\n\n/* evaluates to true if expr is of type (const) void* or (const) FILE* */\n#if 0\n#define _curl_is_cb_data(expr)                                                \\\n  (_curl_is_ptr((expr), void) ||                                              \\\n   _curl_is_ptr((expr), FILE))\n#else /* be less strict */\n#define _curl_is_cb_data(expr)                                                \\\n  _curl_is_any_ptr(expr)\n#endif\n\n/* evaluates to true if expr is of type FILE* */\n#define _curl_is_FILE(expr)                                                   \\\n  (__builtin_types_compatible_p(__typeof__(expr), FILE *))\n\n/* evaluates to true if expr can be passed as POST data (void* or char*) */\n#define _curl_is_postfields(expr)                                             \\\n  (_curl_is_ptr((expr), void) ||                                              \\\n   _curl_is_arr((expr), char))\n\n/* FIXME: the whole callback checking is messy...\n * The idea is to tolerate char vs. void and const vs. not const\n * pointers in arguments at least\n */\n/* helper: __builtin_types_compatible_p distinguishes between functions and\n * function pointers, hide it */\n#define _curl_callback_compatible(func, type)                                 \\\n  (__builtin_types_compatible_p(__typeof__(func), type) ||                    \\\n   __builtin_types_compatible_p(__typeof__(func), type*))\n\n/* evaluates to true if expr is of type curl_read_callback or \"similar\" */\n#define _curl_is_read_cb(expr)                                          \\\n  (_curl_is_NULL(expr) ||                                                     \\\n   __builtin_types_compatible_p(__typeof__(expr), __typeof__(fread)) ||       \\\n   __builtin_types_compatible_p(__typeof__(expr), curl_read_callback) ||      \\\n   _curl_callback_compatible((expr), _curl_read_callback1) ||                 \\\n   _curl_callback_compatible((expr), _curl_read_callback2) ||                 \\\n   _curl_callback_compatible((expr), _curl_read_callback3) ||                 \\\n   _curl_callback_compatible((expr), _curl_read_callback4) ||                 \\\n   _curl_callback_compatible((expr), _curl_read_callback5) ||                 \\\n   _curl_callback_compatible((expr), _curl_read_callback6))\ntypedef size_t (_curl_read_callback1)(char *, size_t, size_t, void*);\ntypedef size_t (_curl_read_callback2)(char *, size_t, size_t, const void*);\ntypedef size_t (_curl_read_callback3)(char *, size_t, size_t, FILE*);\ntypedef size_t (_curl_read_callback4)(void *, size_t, size_t, void*);\ntypedef size_t (_curl_read_callback5)(void *, size_t, size_t, const void*);\ntypedef size_t (_curl_read_callback6)(void *, size_t, size_t, FILE*);\n\n/* evaluates to true if expr is of type curl_write_callback or \"similar\" */\n#define _curl_is_write_cb(expr)                                               \\\n  (_curl_is_read_cb(expr) ||                                            \\\n   __builtin_types_compatible_p(__typeof__(expr), __typeof__(fwrite)) ||      \\\n   __builtin_types_compatible_p(__typeof__(expr), curl_write_callback) ||     \\\n   _curl_callback_compatible((expr), _curl_write_callback1) ||                \\\n   _curl_callback_compatible((expr), _curl_write_callback2) ||                \\\n   _curl_callback_compatible((expr), _curl_write_callback3) ||                \\\n   _curl_callback_compatible((expr), _curl_write_callback4) ||                \\\n   _curl_callback_compatible((expr), _curl_write_callback5) ||                \\\n   _curl_callback_compatible((expr), _curl_write_callback6))\ntypedef size_t (_curl_write_callback1)(const char *, size_t, size_t, void*);\ntypedef size_t (_curl_write_callback2)(const char *, size_t, size_t,\n                                       const void*);\ntypedef size_t (_curl_write_callback3)(const char *, size_t, size_t, FILE*);\ntypedef size_t (_curl_write_callback4)(const void *, size_t, size_t, void*);\ntypedef size_t (_curl_write_callback5)(const void *, size_t, size_t,\n                                       const void*);\ntypedef size_t (_curl_write_callback6)(const void *, size_t, size_t, FILE*);\n\n/* evaluates to true if expr is of type curl_ioctl_callback or \"similar\" */\n#define _curl_is_ioctl_cb(expr)                                         \\\n  (_curl_is_NULL(expr) ||                                                     \\\n   __builtin_types_compatible_p(__typeof__(expr), curl_ioctl_callback) ||     \\\n   _curl_callback_compatible((expr), _curl_ioctl_callback1) ||                \\\n   _curl_callback_compatible((expr), _curl_ioctl_callback2) ||                \\\n   _curl_callback_compatible((expr), _curl_ioctl_callback3) ||                \\\n   _curl_callback_compatible((expr), _curl_ioctl_callback4))\ntypedef curlioerr (_curl_ioctl_callback1)(CURL *, int, void*);\ntypedef curlioerr (_curl_ioctl_callback2)(CURL *, int, const void*);\ntypedef curlioerr (_curl_ioctl_callback3)(CURL *, curliocmd, void*);\ntypedef curlioerr (_curl_ioctl_callback4)(CURL *, curliocmd, const void*);\n\n/* evaluates to true if expr is of type curl_sockopt_callback or \"similar\" */\n#define _curl_is_sockopt_cb(expr)                                       \\\n  (_curl_is_NULL(expr) ||                                                     \\\n   __builtin_types_compatible_p(__typeof__(expr), curl_sockopt_callback) ||   \\\n   _curl_callback_compatible((expr), _curl_sockopt_callback1) ||              \\\n   _curl_callback_compatible((expr), _curl_sockopt_callback2))\ntypedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype);\ntypedef int (_curl_sockopt_callback2)(const void *, curl_socket_t,\n                                      curlsocktype);\n\n/* evaluates to true if expr is of type curl_opensocket_callback or\n   \"similar\" */\n#define _curl_is_opensocket_cb(expr)                                    \\\n  (_curl_is_NULL(expr) ||                                                     \\\n   __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\\\n   _curl_callback_compatible((expr), _curl_opensocket_callback1) ||           \\\n   _curl_callback_compatible((expr), _curl_opensocket_callback2) ||           \\\n   _curl_callback_compatible((expr), _curl_opensocket_callback3) ||           \\\n   _curl_callback_compatible((expr), _curl_opensocket_callback4))\ntypedef curl_socket_t (_curl_opensocket_callback1)\n  (void *, curlsocktype, struct curl_sockaddr *);\ntypedef curl_socket_t (_curl_opensocket_callback2)\n  (void *, curlsocktype, const struct curl_sockaddr *);\ntypedef curl_socket_t (_curl_opensocket_callback3)\n  (const void *, curlsocktype, struct curl_sockaddr *);\ntypedef curl_socket_t (_curl_opensocket_callback4)\n  (const void *, curlsocktype, const struct curl_sockaddr *);\n\n/* evaluates to true if expr is of type curl_progress_callback or \"similar\" */\n#define _curl_is_progress_cb(expr)                                      \\\n  (_curl_is_NULL(expr) ||                                                     \\\n   __builtin_types_compatible_p(__typeof__(expr), curl_progress_callback) ||  \\\n   _curl_callback_compatible((expr), _curl_progress_callback1) ||             \\\n   _curl_callback_compatible((expr), _curl_progress_callback2))\ntypedef int (_curl_progress_callback1)(void *,\n    double, double, double, double);\ntypedef int (_curl_progress_callback2)(const void *,\n    double, double, double, double);\n\n/* evaluates to true if expr is of type curl_debug_callback or \"similar\" */\n#define _curl_is_debug_cb(expr)                                         \\\n  (_curl_is_NULL(expr) ||                                                     \\\n   __builtin_types_compatible_p(__typeof__(expr), curl_debug_callback) ||     \\\n   _curl_callback_compatible((expr), _curl_debug_callback1) ||                \\\n   _curl_callback_compatible((expr), _curl_debug_callback2) ||                \\\n   _curl_callback_compatible((expr), _curl_debug_callback3) ||                \\\n   _curl_callback_compatible((expr), _curl_debug_callback4) ||                \\\n   _curl_callback_compatible((expr), _curl_debug_callback5) ||                \\\n   _curl_callback_compatible((expr), _curl_debug_callback6) ||                \\\n   _curl_callback_compatible((expr), _curl_debug_callback7) ||                \\\n   _curl_callback_compatible((expr), _curl_debug_callback8))\ntypedef int (_curl_debug_callback1) (CURL *,\n    curl_infotype, char *, size_t, void *);\ntypedef int (_curl_debug_callback2) (CURL *,\n    curl_infotype, char *, size_t, const void *);\ntypedef int (_curl_debug_callback3) (CURL *,\n    curl_infotype, const char *, size_t, void *);\ntypedef int (_curl_debug_callback4) (CURL *,\n    curl_infotype, const char *, size_t, const void *);\ntypedef int (_curl_debug_callback5) (CURL *,\n    curl_infotype, unsigned char *, size_t, void *);\ntypedef int (_curl_debug_callback6) (CURL *,\n    curl_infotype, unsigned char *, size_t, const void *);\ntypedef int (_curl_debug_callback7) (CURL *,\n    curl_infotype, const unsigned char *, size_t, void *);\ntypedef int (_curl_debug_callback8) (CURL *,\n    curl_infotype, const unsigned char *, size_t, const void *);\n\n/* evaluates to true if expr is of type curl_ssl_ctx_callback or \"similar\" */\n/* this is getting even messier... */\n#define _curl_is_ssl_ctx_cb(expr)                                       \\\n  (_curl_is_NULL(expr) ||                                                     \\\n   __builtin_types_compatible_p(__typeof__(expr), curl_ssl_ctx_callback) ||   \\\n   _curl_callback_compatible((expr), _curl_ssl_ctx_callback1) ||              \\\n   _curl_callback_compatible((expr), _curl_ssl_ctx_callback2) ||              \\\n   _curl_callback_compatible((expr), _curl_ssl_ctx_callback3) ||              \\\n   _curl_callback_compatible((expr), _curl_ssl_ctx_callback4) ||              \\\n   _curl_callback_compatible((expr), _curl_ssl_ctx_callback5) ||              \\\n   _curl_callback_compatible((expr), _curl_ssl_ctx_callback6) ||              \\\n   _curl_callback_compatible((expr), _curl_ssl_ctx_callback7) ||              \\\n   _curl_callback_compatible((expr), _curl_ssl_ctx_callback8))\ntypedef CURLcode (_curl_ssl_ctx_callback1)(CURL *, void *, void *);\ntypedef CURLcode (_curl_ssl_ctx_callback2)(CURL *, void *, const void *);\ntypedef CURLcode (_curl_ssl_ctx_callback3)(CURL *, const void *, void *);\ntypedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *);\n#ifdef HEADER_SSL_H\n/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX\n * this will of course break if we're included before OpenSSL headers...\n */\ntypedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *);\ntypedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *);\ntypedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *);\ntypedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX,\n                                           const void *);\n#else\ntypedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5;\ntypedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6;\ntypedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7;\ntypedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8;\n#endif\n\n/* evaluates to true if expr is of type curl_conv_callback or \"similar\" */\n#define _curl_is_conv_cb(expr)                                          \\\n  (_curl_is_NULL(expr) ||                                                     \\\n   __builtin_types_compatible_p(__typeof__(expr), curl_conv_callback) ||      \\\n   _curl_callback_compatible((expr), _curl_conv_callback1) ||                 \\\n   _curl_callback_compatible((expr), _curl_conv_callback2) ||                 \\\n   _curl_callback_compatible((expr), _curl_conv_callback3) ||                 \\\n   _curl_callback_compatible((expr), _curl_conv_callback4))\ntypedef CURLcode (*_curl_conv_callback1)(char *, size_t length);\ntypedef CURLcode (*_curl_conv_callback2)(const char *, size_t length);\ntypedef CURLcode (*_curl_conv_callback3)(void *, size_t length);\ntypedef CURLcode (*_curl_conv_callback4)(const void *, size_t length);\n\n/* evaluates to true if expr is of type curl_seek_callback or \"similar\" */\n#define _curl_is_seek_cb(expr)                                          \\\n  (_curl_is_NULL(expr) ||                                                     \\\n   __builtin_types_compatible_p(__typeof__(expr), curl_seek_callback) ||      \\\n   _curl_callback_compatible((expr), _curl_seek_callback1) ||                 \\\n   _curl_callback_compatible((expr), _curl_seek_callback2))\ntypedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int);\ntypedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int);\n\n\n#endif /* __CURL_TYPECHECK_GCC_H */\n"
  },
  {
    "path": "third_party/include/mxml/config.h",
    "content": "/*\n * \"$Id: config.h 451 2014-01-04 21:50:06Z msweet $\"\n *\n * Configuration file for Mini-XML, a small XML-like file parsing library.\n *\n * Copyright 2003-2014 by Michael R Sweet.\n *\n * These coded instructions, statements, and computer programs are the\n * property of Michael R Sweet and are protected by Federal copyright\n * law.  Distribution and use rights are outlined in the file \"COPYING\"\n * which should have been included with this file.  If this file is\n * missing or damaged, see the license at:\n *\n *     http://www.msweet.org/projects.php/Mini-XML\n */\n\n/*\n * Beginning with VC2005, Microsoft breaks ISO C and POSIX conformance\n * by deprecating a number of functions in the name of security, even\n * when many of the affected functions are otherwise completely secure.\n * The _CRT_SECURE_NO_DEPRECATE definition ensures that we won't get\n * warnings from their use...\n *\n * Then Microsoft decided that they should ignore this in VC2008 and use\n * yet another define (_CRT_SECURE_NO_WARNINGS) instead.  Bastards.\n */\n\n#define _CRT_SECURE_NO_DEPRECATE\n#define _CRT_SECURE_NO_WARNINGS\n\n\n/*\n * Include necessary headers...\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <stdarg.h>\n#include <ctype.h>\n#include <io.h>\n\n\n/*\n * Microsoft also renames the POSIX functions to _name, and introduces\n * a broken compatibility layer using the original names.  As a result,\n * random crashes can occur when, for example, strdup() allocates memory\n * from a different heap than used by malloc() and free().\n *\n * To avoid moronic problems like this, we #define the POSIX function\n * names to the corresponding non-standard Microsoft names.\n */\n\n#define close\t\t_close\n#define open\t\t_open\n#define read\t        _read\n#define snprintf \t_snprintf\n#define strdup\t\t_strdup\n#define vsnprintf \t_vsnprintf\n#define write\t\t_write\n\n\n/*\n * Version number...\n */\n\n#define MXML_VERSION \"Mini-XML v2.8\"\n\n\n/*\n * Inline function support...\n */\n\n#define inline _inline\n\n\n/*\n * Long long support...\n */\n\n#define HAVE_LONG_LONG 1\n\n\n/*\n * Do we have the snprintf() and vsnprintf() functions?\n */\n\n#define HAVE_SNPRINTF 1\n#define HAVE_VSNPRINTF 1\n\n\n/*\n * Do we have the strXXX() functions?\n */\n\n#define HAVE_STRDUP 1\n\n\n/*\n * Define prototypes for string functions as needed...\n */\n\n#  ifndef HAVE_STRDUP\nextern char\t*_mxml_strdup(const char *);\n#    define strdup _mxml_strdup\n#  endif /* !HAVE_STRDUP */\n\nextern char\t*_mxml_strdupf(const char *, ...);\nextern char\t*_mxml_vstrdupf(const char *, va_list);\n\n#  ifndef HAVE_SNPRINTF\nextern int\t_mxml_snprintf(char *, size_t, const char *, ...);\n#    define snprintf _mxml_snprintf\n#  endif /* !HAVE_SNPRINTF */\n\n#  ifndef HAVE_VSNPRINTF\nextern int\t_mxml_vsnprintf(char *, size_t, const char *, va_list);\n#    define vsnprintf _mxml_vsnprintf\n#  endif /* !HAVE_VSNPRINTF */\n\n/*\n * End of \"$Id: config.h 451 2014-01-04 21:50:06Z msweet $\".\n */\n"
  },
  {
    "path": "third_party/include/mxml/mxml.h",
    "content": "/*\n * \"$Id: mxml.h 451 2014-01-04 21:50:06Z msweet $\"\n *\n * Header file for Mini-XML, a small XML-like file parsing library.\n *\n * Copyright 2003-2014 by Michael R Sweet.\n *\n * These coded instructions, statements, and computer programs are the\n * property of Michael R Sweet and are protected by Federal copyright\n * law.  Distribution and use rights are outlined in the file \"COPYING\"\n * which should have been included with this file.  If this file is\n * missing or damaged, see the license at:\n *\n *     http://www.msweet.org/projects.php/Mini-XML\n */\n\n/*\n * Prevent multiple inclusion...\n */\n\n#ifndef _mxml_h_\n#  define _mxml_h_\n\n/*\n * Include necessary headers...\n */\n\n#  include <stdio.h>\n#  include <stdlib.h>\n#  include <string.h>\n#  include <ctype.h>\n#  include <errno.h>\n\n\n/*\n * Constants...\n */\n\n#  define MXML_MAJOR_VERSION\t2\t/* Major version number */\n#  define MXML_MINOR_VERSION\t8\t/* Minor version number */\n\n#  define MXML_TAB\t\t8\t/* Tabs every N columns */\n\n#  define MXML_NO_CALLBACK\t0\t/* Don't use a type callback */\n#  define MXML_INTEGER_CALLBACK\tmxml_integer_cb\n\t\t\t\t\t/* Treat all data as integers */\n#  define MXML_OPAQUE_CALLBACK\tmxml_opaque_cb\n\t\t\t\t\t/* Treat all data as opaque */\n#  define MXML_REAL_CALLBACK\tmxml_real_cb\n\t\t\t\t\t/* Treat all data as real numbers */\n#  define MXML_TEXT_CALLBACK\t0\t/* Treat all data as text */\n#  define MXML_IGNORE_CALLBACK\tmxml_ignore_cb\n\t\t\t\t\t/* Ignore all non-element content */\n\n#  define MXML_NO_PARENT\t0\t/* No parent for the node */\n\n#  define MXML_DESCEND\t\t1\t/* Descend when finding/walking */\n#  define MXML_NO_DESCEND\t0\t/* Don't descend when finding/walking */\n#  define MXML_DESCEND_FIRST\t-1\t/* Descend for first find */\n\n#  define MXML_WS_BEFORE_OPEN\t0\t/* Callback for before open tag */\n#  define MXML_WS_AFTER_OPEN\t1\t/* Callback for after open tag */\n#  define MXML_WS_BEFORE_CLOSE\t2\t/* Callback for before close tag */\n#  define MXML_WS_AFTER_CLOSE\t3\t/* Callback for after close tag */\n\n#  define MXML_ADD_BEFORE\t0\t/* Add node before specified node */\n#  define MXML_ADD_AFTER\t1\t/* Add node after specified node */\n#  define MXML_ADD_TO_PARENT\tNULL\t/* Add node relative to parent */\n\n\n/*\n * Data types...\n */\n\ntypedef enum mxml_sax_event_e\t\t/**** SAX event type. ****/\n{\n  MXML_SAX_CDATA,\t\t\t/* CDATA node */\n  MXML_SAX_COMMENT,\t\t\t/* Comment node */\n  MXML_SAX_DATA,\t\t\t/* Data node */\n  MXML_SAX_DIRECTIVE,\t\t\t/* Processing directive node */\n  MXML_SAX_ELEMENT_CLOSE,\t\t/* Element closed */\n  MXML_SAX_ELEMENT_OPEN\t\t\t/* Element opened */\n} mxml_sax_event_t;\n\ntypedef enum mxml_type_e\t\t/**** The XML node type. ****/\n{\n  MXML_IGNORE = -1,\t\t\t/* Ignore/throw away node @since Mini-XML 2.3@ */\n  MXML_ELEMENT,\t\t\t\t/* XML element with attributes */\n  MXML_INTEGER,\t\t\t\t/* Integer value */\n  MXML_OPAQUE,\t\t\t\t/* Opaque string */\n  MXML_REAL,\t\t\t\t/* Real value */\n  MXML_TEXT,\t\t\t\t/* Text fragment */\n  MXML_CUSTOM\t\t\t\t/* Custom data @since Mini-XML 2.1@ */\n} mxml_type_t;\n\ntypedef void (*mxml_custom_destroy_cb_t)(void *);\n\t\t\t\t\t/**** Custom data destructor ****/\n\ntypedef void (*mxml_error_cb_t)(const char *);\n\t\t\t\t\t/**** Error callback function ****/\n\ntypedef struct mxml_attr_s\t\t/**** An XML element attribute value. @private@ ****/\n{\n  char\t\t\t*name;\t\t/* Attribute name */\n  char\t\t\t*value;\t\t/* Attribute value */\n} mxml_attr_t;\n\ntypedef struct mxml_element_s\t\t/**** An XML element value. @private@ ****/\n{\n  char\t\t\t*name;\t\t/* Name of element */\n  int\t\t\tnum_attrs;\t/* Number of attributes */\n  mxml_attr_t\t\t*attrs;\t\t/* Attributes */\n} mxml_element_t;\n\ntypedef struct mxml_text_s\t\t/**** An XML text value. @private@ ****/\n{\n  int\t\t\twhitespace;\t/* Leading whitespace? */\n  char\t\t\t*string;\t/* Fragment string */\n} mxml_text_t;\n\ntypedef struct mxml_custom_s\t\t/**** An XML custom value. @private@ ****/\n{\n  void\t\t\t*data;\t\t/* Pointer to (allocated) custom data */\n  mxml_custom_destroy_cb_t destroy;\t/* Pointer to destructor function */\n} mxml_custom_t;\n\ntypedef union mxml_value_u\t\t/**** An XML node value. @private@ ****/\n{\n  mxml_element_t\telement;\t/* Element */\n  int\t\t\tinteger;\t/* Integer number */\n  char\t\t\t*opaque;\t/* Opaque string */\n  double\t\treal;\t\t/* Real number */\n  mxml_text_t\t\ttext;\t\t/* Text fragment */\n  mxml_custom_t\t\tcustom;\t\t/* Custom data @since Mini-XML 2.1@ */\n} mxml_value_t;\n\nstruct mxml_node_s\t\t\t/**** An XML node. @private@ ****/\n{\n  mxml_type_t\t\ttype;\t\t/* Node type */\n  struct mxml_node_s\t*next;\t\t/* Next node under same parent */\n  struct mxml_node_s\t*prev;\t\t/* Previous node under same parent */\n  struct mxml_node_s\t*parent;\t/* Parent node */\n  struct mxml_node_s\t*child;\t\t/* First child node */\n  struct mxml_node_s\t*last_child;\t/* Last child node */\n  mxml_value_t\t\tvalue;\t\t/* Node value */\n  int\t\t\tref_count;\t/* Use count */\n  void\t\t\t*user_data;\t/* User data */\n};\n\ntypedef struct mxml_node_s mxml_node_t;\t/**** An XML node. ****/\n\nstruct mxml_index_s\t\t\t /**** An XML node index. @private@ ****/\n{\n  char\t\t\t*attr;\t\t/* Attribute used for indexing or NULL */\n  int\t\t\tnum_nodes;\t/* Number of nodes in index */\n  int\t\t\talloc_nodes;\t/* Allocated nodes in index */\n  int\t\t\tcur_node;\t/* Current node */\n  mxml_node_t\t\t**nodes;\t/* Node array */\n};\n\ntypedef struct mxml_index_s mxml_index_t;\n\t\t\t\t\t/**** An XML node index. ****/\n\ntypedef int (*mxml_custom_load_cb_t)(mxml_node_t *, const char *);\n\t\t\t\t\t/**** Custom data load callback function ****/\n\ntypedef char *(*mxml_custom_save_cb_t)(mxml_node_t *);\n\t\t\t\t\t/**** Custom data save callback function ****/\n\ntypedef int (*mxml_entity_cb_t)(const char *);\n\t\t\t\t\t/**** Entity callback function */\n\ntypedef mxml_type_t (*mxml_load_cb_t)(mxml_node_t *);\n\t\t\t\t\t/**** Load callback function ****/\n\ntypedef const char *(*mxml_save_cb_t)(mxml_node_t *, int);\n\t\t\t\t\t/**** Save callback function ****/\n\ntypedef void (*mxml_sax_cb_t)(mxml_node_t *, mxml_sax_event_t, void *);\n\t\t\t\t\t/**** SAX callback function ****/\n\n\n/*\n * C++ support...\n */\n\n#  ifdef __cplusplus\nextern \"C\" {\n#  endif /* __cplusplus */\n\n/*\n * Prototypes...\n */\n\nextern void\t\tmxmlAdd(mxml_node_t *parent, int where,\n\t\t\t        mxml_node_t *child, mxml_node_t *node);\nextern void\t\tmxmlDelete(mxml_node_t *node);\nextern void\t\tmxmlElementDeleteAttr(mxml_node_t *node,\n\t\t\t                      const char *name);\nextern const char\t*mxmlElementGetAttr(mxml_node_t *node, const char *name);\nextern void\t\tmxmlElementSetAttr(mxml_node_t *node, const char *name,\n\t\t\t                   const char *value);\nextern void\t\tmxmlElementSetAttrf(mxml_node_t *node, const char *name,\n\t\t\t                    const char *format, ...)\n#    ifdef __GNUC__\n__attribute__ ((__format__ (__printf__, 3, 4)))\n#    endif /* __GNUC__ */\n;\nextern int\t\tmxmlEntityAddCallback(mxml_entity_cb_t cb);\nextern const char\t*mxmlEntityGetName(int val);\nextern int\t\tmxmlEntityGetValue(const char *name);\nextern void\t\tmxmlEntityRemoveCallback(mxml_entity_cb_t cb);\nextern mxml_node_t\t*mxmlFindElement(mxml_node_t *node, mxml_node_t *top,\n\t\t\t                 const char *name, const char *attr,\n\t\t\t\t\t const char *value, int descend);\nextern mxml_node_t\t*mxmlFindPath(mxml_node_t *node, const char *path);\nextern const char\t*mxmlGetCDATA(mxml_node_t *node);\nextern const void\t*mxmlGetCustom(mxml_node_t *node);\nextern const char\t*mxmlGetElement(mxml_node_t *node);\nextern mxml_node_t\t*mxmlGetFirstChild(mxml_node_t *node);\nextern int\t\tmxmlGetInteger(mxml_node_t *node);\nextern mxml_node_t\t*mxmlGetLastChild(mxml_node_t *node);\nextern mxml_node_t\t*mxmlGetNextSibling(mxml_node_t *node);\nextern const char\t*mxmlGetOpaque(mxml_node_t *node);\nextern mxml_node_t\t*mxmlGetParent(mxml_node_t *node);\nextern mxml_node_t\t*mxmlGetPrevSibling(mxml_node_t *node);\nextern double\t\tmxmlGetReal(mxml_node_t *node);\nextern int\t\tmxmlGetRefCount(mxml_node_t *node);\nextern const char\t*mxmlGetText(mxml_node_t *node, int *whitespace);\nextern mxml_type_t\tmxmlGetType(mxml_node_t *node);\nextern void\t\t*mxmlGetUserData(mxml_node_t *node);\nextern void\t\tmxmlIndexDelete(mxml_index_t *ind);\nextern mxml_node_t\t*mxmlIndexEnum(mxml_index_t *ind);\nextern mxml_node_t\t*mxmlIndexFind(mxml_index_t *ind,\n\t\t\t               const char *element,\n\t\t\t               const char *value);\nextern int\t\tmxmlIndexGetCount(mxml_index_t *ind);\nextern mxml_index_t\t*mxmlIndexNew(mxml_node_t *node, const char *element,\n\t\t\t              const char *attr);\nextern mxml_node_t\t*mxmlIndexReset(mxml_index_t *ind);\nextern mxml_node_t\t*mxmlLoadFd(mxml_node_t *top, int fd,\n\t\t\t            mxml_type_t (*cb)(mxml_node_t *));\nextern mxml_node_t\t*mxmlLoadFile(mxml_node_t *top, FILE *fp,\n\t\t\t              mxml_type_t (*cb)(mxml_node_t *));\nextern mxml_node_t\t*mxmlLoadString(mxml_node_t *top, const char *s,\n\t\t\t                mxml_type_t (*cb)(mxml_node_t *));\nextern mxml_node_t\t*mxmlNewCDATA(mxml_node_t *parent, const char *string);\nextern mxml_node_t\t*mxmlNewCustom(mxml_node_t *parent, void *data,\n\t\t\t               mxml_custom_destroy_cb_t destroy);\nextern mxml_node_t\t*mxmlNewElement(mxml_node_t *parent, const char *name);\nextern mxml_node_t\t*mxmlNewInteger(mxml_node_t *parent, int integer);\nextern mxml_node_t\t*mxmlNewOpaque(mxml_node_t *parent, const char *opaque);\nextern mxml_node_t\t*mxmlNewReal(mxml_node_t *parent, double real);\nextern mxml_node_t\t*mxmlNewText(mxml_node_t *parent, int whitespace,\n\t\t\t             const char *string);\nextern mxml_node_t\t*mxmlNewTextf(mxml_node_t *parent, int whitespace,\n\t\t\t              const char *format, ...)\n#    ifdef __GNUC__\n__attribute__ ((__format__ (__printf__, 3, 4)))\n#    endif /* __GNUC__ */\n;\nextern mxml_node_t\t*mxmlNewXML(const char *version);\nextern int\t\tmxmlRelease(mxml_node_t *node);\nextern void\t\tmxmlRemove(mxml_node_t *node);\nextern int\t\tmxmlRetain(mxml_node_t *node);\nextern char\t\t*mxmlSaveAllocString(mxml_node_t *node,\n\t\t\t        \t     mxml_save_cb_t cb);\nextern int\t\tmxmlSaveFd(mxml_node_t *node, int fd,\n\t\t\t           mxml_save_cb_t cb);\nextern int\t\tmxmlSaveFile(mxml_node_t *node, FILE *fp,\n\t\t\t             mxml_save_cb_t cb);\nextern int\t\tmxmlSaveString(mxml_node_t *node, char *buffer,\n\t\t\t               int bufsize, mxml_save_cb_t cb);\nextern mxml_node_t\t*mxmlSAXLoadFd(mxml_node_t *top, int fd,\n\t\t\t               mxml_type_t (*cb)(mxml_node_t *),\n\t\t\t               mxml_sax_cb_t sax, void *sax_data);\nextern mxml_node_t\t*mxmlSAXLoadFile(mxml_node_t *top, FILE *fp,\n\t\t\t                 mxml_type_t (*cb)(mxml_node_t *),\n\t\t\t                 mxml_sax_cb_t sax, void *sax_data);\nextern mxml_node_t\t*mxmlSAXLoadString(mxml_node_t *top, const char *s,\n\t\t\t                   mxml_type_t (*cb)(mxml_node_t *),\n\t\t\t                   mxml_sax_cb_t sax, void *sax_data);\nextern int\t\tmxmlSetCDATA(mxml_node_t *node, const char *data);\nextern int\t\tmxmlSetCustom(mxml_node_t *node, void *data,\n\t\t\t              mxml_custom_destroy_cb_t destroy);\nextern void\t\tmxmlSetCustomHandlers(mxml_custom_load_cb_t load,\n\t\t\t                      mxml_custom_save_cb_t save);\nextern int\t\tmxmlSetElement(mxml_node_t *node, const char *name);\nextern void\t\tmxmlSetErrorCallback(mxml_error_cb_t cb);\nextern int\t\tmxmlSetInteger(mxml_node_t *node, int integer);\nextern int\t\tmxmlSetOpaque(mxml_node_t *node, const char *opaque);\nextern int\t\tmxmlSetReal(mxml_node_t *node, double real);\nextern int\t\tmxmlSetText(mxml_node_t *node, int whitespace,\n\t\t\t            const char *string);\nextern int\t\tmxmlSetTextf(mxml_node_t *node, int whitespace,\n\t\t\t             const char *format, ...)\n#    ifdef __GNUC__\n__attribute__ ((__format__ (__printf__, 3, 4)))\n#    endif /* __GNUC__ */\n;\nextern int\t\tmxmlSetUserData(mxml_node_t *node, void *data);\nextern void\t\tmxmlSetWrapMargin(int column);\nextern mxml_node_t\t*mxmlWalkNext(mxml_node_t *node, mxml_node_t *top,\n\t\t\t              int descend);\nextern mxml_node_t\t*mxmlWalkPrev(mxml_node_t *node, mxml_node_t *top,\n\t\t\t              int descend);\n\n\n/*\n * Semi-private functions...\n */\n\nextern void\t\tmxml_error(const char *format, ...);\nextern mxml_type_t\tmxml_ignore_cb(mxml_node_t *node);\nextern mxml_type_t\tmxml_integer_cb(mxml_node_t *node);\nextern mxml_type_t\tmxml_opaque_cb(mxml_node_t *node);\nextern mxml_type_t\tmxml_real_cb(mxml_node_t *node);\n\n\n/*\n * C++ support...\n */\n\n#  ifdef __cplusplus\n}\n#  endif /* __cplusplus */\n#endif /* !_mxml_h_ */\n\n\n/*\n * End of \"$Id: mxml.h 451 2014-01-04 21:50:06Z msweet $\".\n */\n"
  }
]