Showing preview only (3,064K chars total). Download the full file or copy to clipboard to get everything.
Repository: aliyun/aliyun-oss-c-sdk
Branch: master
Commit: 052594c48bb2
Files: 281
Total size: 2.9 MB
Directory structure:
gitextract_876k0tp9/
├── .github/
│ └── workflows/
│ ├── linux-clang.yml
│ ├── linux-gcc.yml
│ └── windows.yml
├── .travis.yml
├── CHANGELOG.md
├── CMakeLists.txt
├── LICENSE
├── README-CN.md
├── README.md
├── oss_c_sdk/
│ ├── aos_buf.c
│ ├── aos_buf.h
│ ├── aos_crc64.c
│ ├── aos_crc64.h
│ ├── aos_define.h
│ ├── aos_fstack.c
│ ├── aos_fstack.h
│ ├── aos_http_io.c
│ ├── aos_http_io.h
│ ├── aos_list.h
│ ├── aos_log.c
│ ├── aos_log.h
│ ├── aos_status.c
│ ├── aos_status.h
│ ├── aos_string.c
│ ├── aos_string.h
│ ├── aos_transport.c
│ ├── aos_transport.h
│ ├── aos_util.c
│ ├── aos_util.h
│ ├── oss_api.h
│ ├── oss_auth.c
│ ├── oss_auth.h
│ ├── oss_bucket.c
│ ├── oss_define.c
│ ├── oss_define.h
│ ├── oss_live.c
│ ├── oss_multipart.c
│ ├── oss_object.c
│ ├── oss_resumable.c
│ ├── oss_resumable.h
│ ├── oss_util.c
│ ├── oss_util.h
│ ├── oss_xml.c
│ └── oss_xml.h
├── oss_c_sdk.sln
├── oss_c_sdk_sample/
│ ├── CMakeLists.txt
│ ├── main.c
│ ├── oss_append_object_sample.c
│ ├── oss_callback_sample.c
│ ├── oss_config.c
│ ├── oss_config.h
│ ├── oss_crc_sample.c
│ ├── oss_delete_object_sample.c
│ ├── oss_get_object_acl_sample.c
│ ├── oss_get_object_meta_sample.c
│ ├── oss_get_object_sample.c
│ ├── oss_head_object_sample.c
│ ├── oss_image_sample.c
│ ├── oss_list_object_sample.c
│ ├── oss_multipart_upload_sample.c
│ ├── oss_progress_sample.c
│ ├── oss_put_object_acl_sample.c
│ ├── oss_put_object_sample.c
│ ├── oss_resumable_sample.c
│ ├── oss_sample_util.c
│ ├── oss_sample_util.h
│ └── oss_select_object_sample.c
├── oss_c_sdk_test/
│ ├── CMakeLists.txt
│ ├── CuTest-README.txt
│ ├── CuTest.c
│ ├── CuTest.h
│ ├── ca-certificates.crt
│ ├── cjson.c
│ ├── cjson.h
│ ├── cjson_utils.c
│ ├── cjson_utils.h
│ ├── oss_config.c
│ ├── oss_config.h
│ ├── oss_test_util.c
│ ├── oss_test_util.h
│ ├── sample_data.csv
│ ├── test.h.in
│ ├── test_all.c
│ ├── test_aos.c
│ ├── test_oss_bucket.c
│ ├── test_oss_callback.c
│ ├── test_oss_crc.c
│ ├── test_oss_https.c
│ ├── test_oss_image.c
│ ├── test_oss_live.c
│ ├── test_oss_multipart.c
│ ├── test_oss_object.c
│ ├── test_oss_object_tagging.c
│ ├── test_oss_progress.c
│ ├── test_oss_proxy.c
│ ├── test_oss_resumable.c
│ ├── test_oss_select_object.c
│ ├── test_oss_sign.c
│ └── test_oss_xml.c
└── third_party/
├── include/
│ ├── apr/
│ │ ├── apr.h
│ │ ├── apr.h.in
│ │ ├── apr.hnw
│ │ ├── apr.hw
│ │ ├── apr.hwc
│ │ ├── apr_allocator.h
│ │ ├── apr_atomic.h
│ │ ├── apr_dso.h
│ │ ├── apr_env.h
│ │ ├── apr_errno.h
│ │ ├── apr_escape.h
│ │ ├── apr_escape_test_char.h
│ │ ├── apr_file_info.h
│ │ ├── apr_file_io.h
│ │ ├── apr_fnmatch.h
│ │ ├── apr_general.h
│ │ ├── apr_getopt.h
│ │ ├── apr_global_mutex.h
│ │ ├── apr_hash.h
│ │ ├── apr_inherit.h
│ │ ├── apr_lib.h
│ │ ├── apr_mmap.h
│ │ ├── apr_network_io.h
│ │ ├── apr_poll.h
│ │ ├── apr_pools.h
│ │ ├── apr_portable.h
│ │ ├── apr_proc_mutex.h
│ │ ├── apr_random.h
│ │ ├── apr_ring.h
│ │ ├── apr_shm.h
│ │ ├── apr_signal.h
│ │ ├── apr_skiplist.h
│ │ ├── apr_strings.h
│ │ ├── apr_support.h
│ │ ├── apr_tables.h
│ │ ├── apr_thread_cond.h
│ │ ├── apr_thread_mutex.h
│ │ ├── apr_thread_proc.h
│ │ ├── apr_thread_rwlock.h
│ │ ├── apr_time.h
│ │ ├── apr_user.h
│ │ ├── apr_version.h
│ │ ├── apr_want.h
│ │ └── arch/
│ │ ├── aix/
│ │ │ └── apr_arch_dso.h
│ │ ├── apr_private_common.h
│ │ ├── beos/
│ │ │ ├── apr_arch_dso.h
│ │ │ ├── apr_arch_proc_mutex.h
│ │ │ ├── apr_arch_thread_cond.h
│ │ │ ├── apr_arch_thread_mutex.h
│ │ │ ├── apr_arch_thread_rwlock.h
│ │ │ └── apr_arch_threadproc.h
│ │ ├── netware/
│ │ │ ├── apr_arch_dso.h
│ │ │ ├── apr_arch_file_io.h
│ │ │ ├── apr_arch_global_mutex.h
│ │ │ ├── apr_arch_internal_time.h
│ │ │ ├── apr_arch_networkio.h
│ │ │ ├── apr_arch_pre_nw.h
│ │ │ ├── apr_arch_proc_mutex.h
│ │ │ ├── apr_arch_thread_cond.h
│ │ │ ├── apr_arch_thread_mutex.h
│ │ │ ├── apr_arch_thread_rwlock.h
│ │ │ ├── apr_arch_threadproc.h
│ │ │ └── apr_private.h
│ │ ├── os2/
│ │ │ ├── apr_arch_dso.h
│ │ │ ├── apr_arch_file_io.h
│ │ │ ├── apr_arch_inherit.h
│ │ │ ├── apr_arch_networkio.h
│ │ │ ├── apr_arch_os2calls.h
│ │ │ ├── apr_arch_proc_mutex.h
│ │ │ ├── apr_arch_thread_cond.h
│ │ │ ├── apr_arch_thread_mutex.h
│ │ │ ├── apr_arch_thread_rwlock.h
│ │ │ └── apr_arch_threadproc.h
│ │ ├── os390/
│ │ │ └── apr_arch_dso.h
│ │ ├── unix/
│ │ │ ├── apr_arch_atomic.h
│ │ │ ├── apr_arch_dso.h
│ │ │ ├── apr_arch_file_io.h
│ │ │ ├── apr_arch_global_mutex.h
│ │ │ ├── apr_arch_inherit.h
│ │ │ ├── apr_arch_internal_time.h
│ │ │ ├── apr_arch_misc.h
│ │ │ ├── apr_arch_networkio.h
│ │ │ ├── apr_arch_poll_private.h
│ │ │ ├── apr_arch_proc_mutex.h
│ │ │ ├── apr_arch_shm.h
│ │ │ ├── apr_arch_thread_cond.h
│ │ │ ├── apr_arch_thread_mutex.h
│ │ │ ├── apr_arch_thread_rwlock.h
│ │ │ └── apr_arch_threadproc.h
│ │ └── win32/
│ │ ├── apr_arch_atime.h
│ │ ├── apr_arch_dso.h
│ │ ├── apr_arch_file_io.h
│ │ ├── apr_arch_inherit.h
│ │ ├── apr_arch_misc.h
│ │ ├── apr_arch_networkio.h
│ │ ├── apr_arch_proc_mutex.h
│ │ ├── apr_arch_thread_cond.h
│ │ ├── apr_arch_thread_mutex.h
│ │ ├── apr_arch_thread_rwlock.h
│ │ ├── apr_arch_threadproc.h
│ │ ├── apr_arch_utf8.h
│ │ ├── apr_dbg_win32_handles.h
│ │ └── apr_private.h
│ ├── aprutil/
│ │ ├── apr_anylock.h
│ │ ├── apr_base64.h
│ │ ├── apr_buckets.h
│ │ ├── apr_crypto.h
│ │ ├── apr_date.h
│ │ ├── apr_dbd.h
│ │ ├── apr_dbm.h
│ │ ├── apr_hooks.h
│ │ ├── apr_ldap.h
│ │ ├── apr_ldap.h.in
│ │ ├── apr_ldap.hnw
│ │ ├── apr_ldap.hw
│ │ ├── apr_ldap.hwc
│ │ ├── apr_ldap_init.h
│ │ ├── apr_ldap_option.h
│ │ ├── apr_ldap_rebind.h
│ │ ├── apr_ldap_url.h
│ │ ├── apr_md4.h
│ │ ├── apr_md5.h
│ │ ├── apr_memcache.h
│ │ ├── apr_optional.h
│ │ ├── apr_optional_hooks.h
│ │ ├── apr_queue.h
│ │ ├── apr_reslist.h
│ │ ├── apr_rmm.h
│ │ ├── apr_sdbm.h
│ │ ├── apr_sha1.h
│ │ ├── apr_strmatch.h
│ │ ├── apr_thread_pool.h
│ │ ├── apr_uri.h
│ │ ├── apr_uuid.h
│ │ ├── apr_xlate.h
│ │ ├── apr_xml.h
│ │ ├── apu.h
│ │ ├── apu.h.in
│ │ ├── apu.hnw
│ │ ├── apu.hw
│ │ ├── apu.hwc
│ │ ├── apu_errno.h
│ │ ├── apu_version.h
│ │ ├── apu_want.h
│ │ ├── apu_want.h.in
│ │ ├── apu_want.hnw
│ │ ├── apu_want.hw
│ │ └── private/
│ │ ├── apr_crypto_internal.h
│ │ ├── apr_dbd_internal.h
│ │ ├── apr_dbd_odbc_v2.h
│ │ ├── apr_dbm_private.h
│ │ ├── apu_config.h
│ │ ├── apu_config.hnw
│ │ ├── apu_config.hw
│ │ ├── apu_internal.h
│ │ ├── apu_select_dbm.h
│ │ ├── apu_select_dbm.h.in
│ │ └── apu_select_dbm.hw
│ ├── curl/
│ │ ├── config-win32.h
│ │ ├── curl.h
│ │ ├── curlbuild.h
│ │ ├── curlrules.h
│ │ ├── curlver.h
│ │ ├── easy.h
│ │ ├── mprintf.h
│ │ ├── multi.h
│ │ ├── stdcheaders.h
│ │ └── typecheck-gcc.h
│ └── mxml/
│ ├── config.h
│ └── mxml.h
└── lib/
├── Win32/
│ ├── libapr-1.lib
│ ├── libapriconv-1.lib
│ ├── libaprutil-1.lib
│ ├── libcurl.lib
│ ├── libexpat.lib
│ └── mxml1.lib
└── x64/
├── libapr-1.lib
├── libapriconv-1.lib
├── libaprutil-1.lib
├── libcurl.lib
├── libexpat.lib
└── mxml1.lib
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/linux-clang.yml
================================================
name: Ubuntu (clang)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
mode: [ Debug, Release ]
runs-on: ubuntu-22.04
steps:
- name: check out
uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install curl libssl-dev libcurl4-openssl-dev libmxml-dev libapr1-dev libaprutil1-dev
- name: configure cmake
run: CXX=clang++ CC=clang cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.mode }}
- name: build project
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.mode }}
================================================
FILE: .github/workflows/linux-gcc.yml
================================================
name: Ubuntu (gcc)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
ubuntu_gcc:
strategy:
matrix:
mode: [ Debug, Release ]
runs-on: ubuntu-20.04
steps:
- name: check out
uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install curl libssl-dev libcurl4-openssl-dev libmxml-dev libapr1-dev libaprutil1-dev
- name: checkout gcc version
run: gcc --version
- name: configure cmake
run: CXX=g++ CC=gcc cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.mode }}
- name: build project
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.mode }}
================================================
FILE: .github/workflows/windows.yml
================================================
name: Windows Server 2022
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
mode: [Debug, Release]
arch: [x64, Win32]
env:
CXX: cl.exe
CC: cl.exe
steps:
- name: check out
uses: actions/checkout@v3
- name: generate project
run: cmake -B ${{ github.workspace }}\build -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -A${{ matrix.arch }}
- name: build project
run: cmake --build ${{ github.workspace }}\build --config ${{ matrix.mode }}
================================================
FILE: .travis.yml
================================================
language: c
compiler:
- gcc
install:
- sudo apt-get update
- sudo apt-get install libapr1-dev libaprutil1-dev curl
- wget --quiet https://github.com/michaelrsweet/mxml/releases/download/release-2.9/mxml-2.9.tar.gz
- tar zxf mxml-2.9.tar.gz
- cd mxml-2.9
- ./configure && make && sudo make install
- cd -
- pip install --user cpp-coveralls
script:
- cmake -DCMAKE_BUILD_TYPE=Coverage .
- make
- ./build/Coverage/bin/oss_c_sdk_test
after_success:
env:
global:
- secure: kvjsFXirn2+Nys0TO0eViDHTlhz0ow5AuWuQeEzJAJnLbJfqupWng0o3i4vGF7bPpxWgbrIFJro/Pwk15F1gvUGaKjXbPWn5hae3G3ZqDwdNkDYy8Hs8VnjvqlaZ4dbpqDQOFA7+49jUuzVPdHFWJgLEleE53RADfuESN/rd0Uo6C1mZEEmyEhmj2pyHSKr08UWLbbuoLuVeaF1rfLxLRAU/Ki0S1AnnFirJcsbMSICexwQ96G+bdQTdqHass6JfQfOYklnKVSrMbk/0MuV5LmeQ3A1j1AF3iRzZ4KT4FmNXwk0hoocz+la8M3B7zaUu2wuea8LV5mZ6G5bN5p2fYHXlpZaoxstMl3HUwiQH5ETX0W6bzB1rjWl2CteKR3xt2wW1qj5XDvjqBUrPNV0yibpfMdkVfLnvic16+0qZua2cjsn93d0AyNnS6cFCGAH3PGI7+3Mmg4T1S43z9XjXjHmOCT0EQ/kfGI0m+3p8TYqqQMandWbphpXZYPdHBeSv4tMMFn1p7bjwn5fxvUKCou/tvef7qD3OYjectiEzTou7Ttxz6gThiDekIf8Pbeuzq5mgnSDXr+8DTpHzKltsQBLyhezlBL9P5PW6GH3xp+/4yFHPOnsOhK7qLkiJ6CQ9JPq2noeAAh+cgKiSoZibaWj3ht2p1LynR/Kr8XQfZfQ=
- secure: pLU+jHSLKimMSX0I3sL9To7sg+hO7vEplZhCL9OPUj8vTVmdLCRnbNiTAUaUrSA0/O55lxeleBfyi6joPY5IOgCRASExhFxfsidKjskb77bKl1/izt4EH41sahlcrbmpgPRdXORyOzCN9HkuWvrR8FZsTwnBpHJ3+IxsxKURGlY8NYN50sscqM+KvctUvXf+j/y0gZK42F78bLD3WRr1Fiph9UOYOUPvnQe69tOUwrKil5u8Ho+JeQCpuXsiDJkYz232WSgKOw326AIjo99VLvw1Q3HTdU8ztsarcswjLTSMpHpPT6vxNKVd0WUi6zmZpO/CLZvqtPxtPizT54OurDB7ClUJ0KJyFRgOaaRofbKDi8xWXATIYfI92x0IHIq/4aeufc3N4zQDgjdRrp4silS56IxTi+OM/T6opIg258j7lrEUP3nz+DBOqCSYBL1pIfhJDeoWSFYE2Ehc7paVCFkoEp41lv1sgBX1At0dM7lobIlsMX2zmQPszLQTgaj8mu/5u7/tFMFSw4TWydI+el3xJVlq4ad2DpYP/yRPEcUkq64/qPZP1dSfxlwBzEOCk4zoAQHev3php32O5vDyLcV3R1Zvyr0Y1/suPMXeUEU6kvS26I9jSpwB/E3i+6HhfcqcnmaGxqr1pRw/dhedGAAayKZEqDcEpTdXf9D6BcE=
- secure: wFXioHVdO0bP4N8o/q+y76K65vyls3CIzM3I71ZN1+Ayl01Z0c1WxL+84LlhHjUetMzFG2X10zdnMmuthUz9mkIRMxBxrbp6O2VzrniMkkFjzkK0P2obuLn3N0DfCT072XxvSt5l6aymB0+8Jv77d/nLxslGMIEkJWW9qgZQuTABRjQxCNwJ6Yo2I85kH6nXvdBsYvGCAkM+N1bZP7HvncvQgncZq+ImgOG7Hj21mdVCRF+qSw4o4YOBd6JELUtntpqRpp9gx52H2CgvTUYIb3gppmm392cAlNrUZirINCVXfJdfnq1pbHFJW5L9jdkJxq1L4SIOpZZX3yf5+pDqVHXXVh4hyW1oUBQejTzX76GD8Xwh51NzGXATkhEuGgchvQeb6ul7Q/+S6JzdWlrkQwc4cIZS3fjdpAsXtPlaiEsoQja1zNWHlQvylF//5+r69TiYFTJ737YyckKv6iEhY92zWg0qBDaDQGQ7lM/kudb1WrDOAV7xaNMuY1ys7mXZmaiyq6sD03EkBrndJMtcu3Z2ofId4IOMOvLT0sWACtKP8R3ajo8oyGJAftcvi4w/2bz1OwJ010vVvPwrbmT16WFrSuzUrMXZwkjDHBT//PxjrY7OLl0js6xxrujjm1sc+ekSUOfnZFshT+4yRCAxcLrrmuclvLVSPAYHMQ6E4lA=
- secure: WSTMesLCs2QMOzSkfNrMnYPUaWBRG+RFWGFWC1GvXaxz0rJxRdtFkWJ05mcmsOMBCPbBwzh9LWm1a7ssDcljnDHc/3nOuiyKc3AgZ8pxlVxJj0ujj/HIxB5GbcbEePzMvJcSPMq/QFYpfyWM/8qRo3I0PYpLQatq75tILSuHkmay9Ic96ixqNsjVCey/uOB3RZB68fzmxok+wVnpPe6y0wcL9uK7xKmrRc7pEMr8/9BjbtyBKOPbBgtV6ArJf4j3Wy9Di9ZOdkR8PLGtWaf8vEFat3NtvzXG/Ag9cCkbU/t4ZZuwmF5MiaWNpQeZt8pdvPh0WFnmhs9kZyq0vm0W3lDoJ5tBBSHmu+LdZSCnkHuGWvaaofpPKOSLE5MBVucKHLGurQj0wGY3Xw4Vc9m76YKGRcbJ6iWjcf+WOSLdcepagpN+aeGgG+yY60mCnNiEUPKCK7A8bZmF2GyMR3JgJSEQ1gjfI4iDi8PBZ9dMAWFDUqhixwCZQuVbsEcspXFVNFjjks/2aRG5RnAAIEhatz4ja2Koxv/ZhJn752sw4l3N6GNSjYlqZl5xA41Ycr6nDGqbB87xp+DiYeEzNmwFmpAnrA5Ur8ZFE9HEObGgCdouRLjyPjhLUS+QEeDangEth7bXlACBQxPMlJsjBrXuQxykT+TtqVexOWQtVe9nuJQ=
================================================
FILE: CHANGELOG.md
================================================
# ChangeLog - Aliyun OSS SDK for C
## 版本号:3.11.2 日期:2024-09-14
### 变更内容
- 修复:潜在的空指针访问问题
## 版本号:3.11.1 日期:2024-07-26
### 变更内容
- 修复:delete objects 接口解析响应体时可能出现异常的问题
## 版本号:3.11.0 日期:2024-05-29
### 变更内容
- 添加:支持版本签名4
## 版本号:3.10.1 日期:2023-12-05
### 变更内容
- 添加:支持windows x64 构建
- 添加:增加对象名的合法性检查
- 添加:优化curl实例的重用
## 版本号:3.10.0 日期:2020-08-12
### 变更内容
- 添加:支持ip:port 形式的 endpoint参数
- 添加:支持冷归档接口
- 添加:增加endpoint的参数检查
- 修复:网络参数在断点续传场景下不生效
## 版本号:3.9.2 日期:2020-06-19
### 变更内容
- 添加:增加endpoint的合法性检查
- 添加:增加ssl证书校验开关 和 CA证书设置路径,默认开启ssl证书校验
- 添加:支持 生成签名URL时,不对/ 转义成%2F
## 版本号:3.9.1 日期:2019-11-22
### 变更内容
- 添加:bucket名字的合法性检查
## 版本号:3.9.0 日期:2019-09-09
### 变更内容
- 添加:支持x-oss-sign-origin-only 签名子资源
## 版本号:3.8.0 日期:2019-08-09
### 变更内容
- 添加:支持object tagging功能
- 修复:oss_upload_part_copy源文件名没有url编码的问题
## 版本号:3.7.1 日期:2019-04-05
### 变更内容
- 修复:断点续传下载进度条更新不正确的问题
## 版本号:3.7.0 日期:2019-02-23
### 变更内容
- 添加:支持oss_get_object_meta
- 添加:支持oss_put_object_acl,oss_get_object_acl
- 添加:支持windows x64 平台
- 优化: 完善测试代码
- 添加:支持windows 下 使用cmake 方式构建
- 添加:添加curl debug 日志信息
- 添加:支持select object
## 版本号:3.6.0 日期:2018-04-19
### 变更内容
- 添加:create_bucket支持指定存储类型,支持oss_restore_object
- 添加:支持symlink,oss_put_symlink和oss_get_symlink
- 添加:存储空间设置logging,lifecycle,website,referer,cors
- 添加:支持oss_list_bucket,oss_get_bucket_location
- 添加:支持oss_get_bucket_location,oss_get_bucket_info
## 版本号:3.5.2 日期:2017-11-14
### 变更内容
- 修复:oss_resumable_upload_file、oss_resumable_download_file不支持STS鉴权方式的问题
## 版本号:3.5.1 日期:2017-08-11
### 变更内容
- 修复:`apr_file_info_get`在特定文件系统下报`70008 APR_INCOMPLETE`错误的问题
- 修复:`oss_delete_objects_by_prefix`在中的`params->next_marker`使用释放后的内存的问题
- 修复:Windows的`minixml`库升级到2.9
## 版本号:3.5.0 日期:2017-08-01
### 变更内容
- 添加:支持并发断点续传下载`oss_resumable_download_file`
- 修复:`aos_should_retry`重试判读错误的问题
## 版本号:3.4.3 日期:2017-04-26
### 变更内容
- 修复:添加宏`ULLONG_MAX`的定义
- 修复:示例工程的CMakeLists中加入`oss_resumable_sample.c`
- 修复:`oss_open_checkpoint_file`错误打印日志的问题
## 版本号:3.4.2 日期:2017-04-23
### 变更内容
- 修复:解决分片上传ContentType被覆盖的问题
## 版本号:3.4.1 日期:2017-04-07
### 变更内容
- 添加:list_object使用示例`oss_list_object_sample.c`
- 修复:CMakeLists中加入`oss_resumable.h`
## 版本号:3.4.0 日期:2017-02-22
### 变更内容
- 添加:支持并发断点续传上传`oss_resumable_upload_file`
- 修复:`oss_gen_signed_url`支持临时用户签名
- 修复:初始化默认不打开`fd 2`,退出时不关闭`fd 2`
- 修复:修复key为`xxx/./yyy/`,`./async_test/test`报`SignatureDoesNotMatch`的问题
## 版本号:3.3.0 日期:2016-12-28
### 变更内容
- 添加:支持代理Proxy
- 修复:oss_get_object_to_file先下载到本地临时文件,成功后修改文件名称
- 修复:去除Visual Studio编译警告aos_util.c(512) C4146
- 修复:URL上传下载添加CRC校验
## 版本号:3.2.1 日期:2016-11-21
### 变更内容
- 解决oss_copy_object源文件名没有url编码的问题
## 版本号:3.2.0 日期:2016-11-14
### 变更内容
- 支持上传、下载[CRC](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/oss_c_sdk_test/test_oss_crc.c)检验
- 支持[上传回调](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/oss_c_sdk_test/test_oss_callback.c)功能
- 支持[进度条](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/oss_c_sdk_test/test_oss_progress.c)功能
## 版本号:3.1.0 日期:2016-08-10
### 变更内容
- 支持[RTMP](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/oss_c_sdk_test/test_oss_live.c)功能
- 支持[图片服务](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/oss_c_sdk_test/test_oss_image.c)功能
## 版本号:3.0.0 日期:2016-05-24
### 变更内容
- Windows和Linux版本合并
## 版本号:2.1.0 日期:2016-03-28
### 变更内容
- 完善示例程序
- header长度由限制为1K升级为最长8K
- 解决部分单词拼写错误
## 版本号:2.0.0 日期:2016-03-08
### 变更内容
- complete multipart接口支持覆盖原有head
- 重构示例程序和组织方式
- 开放params参数,允许用户自定义设置
- 允许params和headers参数为空,简化使用
- 支持https
- 支持ip
- 新增部分测试
- 新增oss_put_bucket_acl接口
- 新增目录相关示例
- 新增signed url相关示例
- 完善接口注释
- 删除无用的port配置参数
- 调整oss_init_multipart_upload接口参数顺序
- 优化配置参数名称,使其与官方网站保持一致
- 解决endpoint不能含有http等前缀的问题
- 解决用户无法设置content-type的问题
- 解决无法自动根据file name和key设置content-type的问题
- 解决list upload parts为空时coredump的问题
- 解决oss_upload_file接口在断点续传时可能会coredump的问题
- 解决部分单词拼写错误
- 解决所有警告
- 解决部分头文件宏保护无效的问题
- 解决oss_head_object_by_url接口不生效的问题
## 版本号:1.0.0 日期:2015-12-16
### 变更内容
- 调整OSS C SDK依赖的XML第三方库,使用minixml替换libxml减小OSS C SDK的大小
- 修改编译方式为CMAKE,同时提供嵌入式环境的Makefile.embeded,减少automake重复编译的问题
- 新增oss_upload_file接口,封装multipart upload相关的接口,使用multipart方式上传文件
- 新增oss_delete_objects_by_prefix接口,删除指定prefix的object
- 新增OSS C SDK根据object name或者filename自动添加content_type
- 完善OSS C SDK demo的调用示例,方便用户快速入门
## 版本号:0.0.7 日期:2015-11-11
### 变更内容
- OSS C SDK修复sts_token超过http header最大限制的问题
## 版本号:0.0.6 日期:2015-10-29
### 变更内容
- OSS C SDK签名时请求头支持x-oss-date,允许用户指定签名时间,解决系统时间偏差导致签名出错的问题
- OSS C SDK支持CNAME方式访问OSS,CNAME方式请求时指定is_oss_domain值为0
- 新增OSS C SDK demo,提供简单的接口调用示例,方便用户快速入门
- OSS C SDK sample示例中去除对utf8第三方库的依赖
## 版本号:0.0.5 日期:2015-09-10
### 变更内容
- 调整OSS C SDK获取GMT时间的方式,解决LOCALE变化可能导致签名出错的问题
- aos_status_t结构体增加req_id字段,方便定位请求出错问题
## 版本号:0.0.4 日期:2015-07-27
### 变更内容
- 增加生命周期相关的接口oss_put_bucket_lifecycle、oss_get_bucket_lifecycle以及oss_delete_bucket_lifecycle
- OSS C SDK支持长连接,默认使用连接池支持keep alive功能
- oss_list_object增加子目录的输出
## 版本号:0.0.3 日期:2015-07-08
### 变更内容
- 增加oss_append_object_from_buffer接口,支持追加上传buffer中的内容到object
- 增加oss_append_object_from_file接口,支持追加上传文件中的内容到object
## 版本号:0.0.2 日期:2015-06-10
### 变更内容
- 增加oss_upload_part_copy,支持Upload Part Copy方式拷贝
- 增加sts服务临时授权方式访问OSS
## 版本号:0.0.1 日期:2015-05-28
### 变更内容
- 基于OSS API文档,提供OSS bucket、object以及multipart相关的常见操作API
- 提供基于CuTest的sample
================================================
FILE: CMakeLists.txt
================================================
PROJECT(oss_c_sdk)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
set(CMAKE_VERSION 3.0.0)
# default C / CXX flags
if(CMAKE_HOST_WIN32)
else()
set(CMAKE_C_FLAGS " -g -ggdb -O0 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_CXX_FLAGS " -g -ggdb -O0 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_C_FLAGS_DEBUG " -g -ggdb -O0 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_CXX_FLAGS_DEBUG " -g -ggdb -O0 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_C_FLAGS_RELEASE " -O3 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_CXX_FLAGS_RELEASE " -O3 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_C_FLAGS_MINSIZEREF " -Os -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_CXX_FLAGS_MINSIZEREF " -Os -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_C_FLAGS_RELWITHDEBINFO " -O2 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO " -O2 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_C_FLAGS_COVERAGE " ${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
set(CMAKE_CXX_FLAGS_COVERAGE " ${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
endif()
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/build/${CMAKE_BUILD_TYPE}/lib)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/build/${CMAKE_BUILD_TYPE}/bin)
set(CMAKE_C_OUTPUT_EXTENSION_REPLACE 1)
set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1)
# find dependency librarys
if(CMAKE_HOST_WIN32)
set(EXTRA_INCLUDE_PATH ${CMAKE_SOURCE_DIR}/third_party/include)
if (CMAKE_CL_64)
set(EXTRA_LIB_PATH ${CMAKE_SOURCE_DIR}/third_party/lib/x64/)
else()
set(EXTRA_LIB_PATH ${CMAKE_SOURCE_DIR}/third_party/lib/Win32/)
endif()
find_path(APR_INCLUDE_DIR NAMES apr.h PATH_SUFFIXES apr PATHS ${EXTRA_INCLUDE_PATH})
find_library(APR_LIBRARY NAMES libapr-1 PATHS ${EXTRA_LIB_PATH})
find_path(APR_UTIL_INCLUDE_DIR NAMES apu.h PATH_SUFFIXES aprutil PATHS ${EXTRA_INCLUDE_PATH})
find_library(APR_UTIL_LIBRARY NAMES libaprutil-1 PATHS ${EXTRA_LIB_PATH})
find_path(MINIXML_INCLUDE_DIR NAMES mxml.h PATH_SUFFIXES mxml PATHS ${EXTRA_INCLUDE_PATH})
find_library(MINIXML_LIBRARY NAMES mxml1 PATHS ${EXTRA_LIB_PATH})
find_path(CURL_INCLUDE_DIR NAMES curl/curl.h PATHS ${EXTRA_INCLUDE_PATH})
find_library(CURL_LIBRARY NAMES libcurl PATHS ${EXTRA_LIB_PATH})
else()
FIND_PROGRAM(APR_CONFIG_BIN NAMES apr-config apr-1-config PATHS /usr/bin /usr/local/bin /usr/local/apr/bin/)
FIND_PROGRAM(APU_CONFIG_BIN NAMES apu-config apu-1-config PATHS /usr/bin /usr/local/bin /usr/local/apr/bin/)
IF (APR_CONFIG_BIN)
EXECUTE_PROCESS(
COMMAND ${APR_CONFIG_BIN} --includedir
OUTPUT_VARIABLE APR_INCLUDE_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
EXECUTE_PROCESS(
COMMAND ${APR_CONFIG_BIN} --cflags
OUTPUT_VARIABLE APR_C_FLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE
)
EXECUTE_PROCESS(
COMMAND ${APR_CONFIG_BIN} --link-ld
OUTPUT_VARIABLE APR_LIBRARIES
OUTPUT_STRIP_TRAILING_WHITESPACE
)
ELSE()
MESSAGE(FATAL_ERROR "Could not find apr-config/apr-1-config")
ENDIF()
IF (APU_CONFIG_BIN)
EXECUTE_PROCESS(
COMMAND ${APU_CONFIG_BIN} --includedir
OUTPUT_VARIABLE APR_UTIL_INCLUDE_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
EXECUTE_PROCESS(
COMMAND ${APU_CONFIG_BIN} --cflags
OUTPUT_VARIABLE APU_C_FLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE
)
EXECUTE_PROCESS(
COMMAND ${APU_CONFIG_BIN} --link-ld
OUTPUT_VARIABLE APU_LIBRARIES
OUTPUT_STRIP_TRAILING_WHITESPACE
)
ELSE()
MESSAGE(FATAL_ERROR "Could not find apu-config/apu-1-config")
ENDIF()
#curl-config
FIND_PROGRAM(CURL_CONFIG_BIN NAMES curl-config)
IF (CURL_CONFIG_BIN)
EXECUTE_PROCESS(
COMMAND ${CURL_CONFIG_BIN} --libs
OUTPUT_VARIABLE CURL_LIBRARIES
OUTPUT_STRIP_TRAILING_WHITESPACE
)
ELSE()
MESSAGE(FATAL_ERROR "Could not find curl-config")
ENDIF()
endif()
# Compile and link lib_oss_c_sdk
include_directories(${APR_INCLUDE_DIR})
include_directories(${APR_UTIL_INCLUDE_DIR})
include_directories(${MINIXML_INCLUDE_DIR})
include_directories(${CURL_INCLUDE_DIR})
aux_source_directory(oss_c_sdk SRC_LIST)
# build & install
if(CMAKE_HOST_WIN32)
add_library(${CMAKE_PROJECT_NAME} STATIC ${SRC_LIST})
INSTALL(TARGETS ${CMAKE_PROJECT_NAME} ARCHIVE DESTINATION lib)
else()
add_library(${CMAKE_PROJECT_NAME} SHARED ${SRC_LIST})
add_library(${CMAKE_PROJECT_NAME}_static STATIC ${SRC_LIST})
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES VERSION ${CMAKE_VERSION} SOVERSION ${CMAKE_VERSION})
INSTALL(TARGETS ${CMAKE_PROJECT_NAME} LIBRARY DESTINATION lib)
INSTALL(TARGETS ${CMAKE_PROJECT_NAME}_static ARCHIVE DESTINATION lib)
endif()
INSTALL(FILES
oss_c_sdk/aos_buf.h
oss_c_sdk/aos_define.h
oss_c_sdk/aos_fstack.h
oss_c_sdk/aos_http_io.h
oss_c_sdk/aos_list.h
oss_c_sdk/aos_log.h
oss_c_sdk/aos_status.h
oss_c_sdk/aos_string.h
oss_c_sdk/aos_transport.h
oss_c_sdk/aos_util.h
oss_c_sdk/aos_crc64.h
oss_c_sdk/oss_api.h
oss_c_sdk/oss_auth.h
oss_c_sdk/oss_define.h
oss_c_sdk/oss_resumable.h
oss_c_sdk/oss_util.h
oss_c_sdk/oss_xml.h
DESTINATION include/oss_c_sdk)
add_subdirectory(oss_c_sdk_sample)
add_subdirectory(oss_c_sdk_test)
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2016 Aliyun
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README-CN.md
================================================
# Aliyun OSS SDK for C
[](https://badge.fury.io/gh/aliyun%2Faliyun-oss-c-sdk)
[](https://travis-ci.org/aliyun/aliyun-oss-c-sdk)
[](https://coveralls.io/github/aliyun/aliyun-oss-c-sdk?branch=master)
[](LICENSE)
## [README of English](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/README.md)
## 关于
阿里云对象存储(Object Storage Service,简称OSS),是阿里云对外提供的海量、安全、低成本、高可靠的云存储服务。用户可以通过调用API,在任何应用、任何时间、任何地点上传和下载数据,也可以通过用户Web控制台对数据进行简单的管理。OSS适合存放任意文件类型,适合各种网站、开发企业及开发者使用。OSS C SDK提供了一系列接口方便用户使用OSS。
## 版本
- 当前版本:3.11.2
## 安装方法
### 环境依赖
OSS C SDK使用curl进行网络操作,无论是作为客户端还是服务器端,都需要依赖curl。
OSS C SDK使用apr/apr-util库解决内存管理以及跨平台问题,使用minixml库解析请求返回的xml,
OSS C SDK并没有带上这几个外部库,您需要确认这些库已经安装,并且将它们的头文件目录和库文件目录都加入到了项目中。
#### 第三方库下载以及安装
##### libcurl (建议 7.32.0 及以上版本)
请从[这里](http://curl.haxx.se/download.html)下载,并参考[libcurl 安装指南](http://curl.haxx.se/docs/install.html)安装。典型的安装方式如下:
```shell
./configure
make
make install
```
注意:
- 执行./configure时默认是配置安装目录为/usr/local/,如果需要指定安装目录,请使用 ./configure --prefix=/your/install/path/
##### apr (建议 1.5.2 及以上版本)
请从[这里](https://apr.apache.org/download.cgi)下载,典型的安装方式如下:
```shell
./configure
make
make install
```
注意:
- 执行./configure时默认是配置安装目录为/usr/local/,如果需要指定安装目录,请使用 ./configure --prefix=/your/install/path/
##### apr-util (建议 1.5.4 及以上版本)
请从[这里](https://apr.apache.org/download.cgi)下载,安装时需要注意指定--with-apr选项,典型的安装方式如下:
```shell
./configure --with-apr=/your/apr/install/path
make
make install
```
注意:
- 执行./configure时默认是配置安装目录为/usr/local/,如果需要指定安装目录,请使用 ./configure --prefix=/your/install/path/
- 需要通过--with-apr指定apr安装目录,如果apr安装到系统目录下需要指定--with-apr=/usr/local/apr/
##### minixml (建议 2.8 及以上版本)
请从[这里](http://michaelrsweet.github.io/mxml/)下载,典型的安装方式如下:
```shell
./configure
make
make install
```
注意:
- 执行./configure时默认是配置安装目录为/usr/local/,如果需要指定安装目录,请使用 ./configure --prefix=/your/install/path/
##### CMake (建议2.6.0及以上版本)
请从[这里](https://cmake.org/download)下载,典型的安装方式如下:
```shell
./configure
make
make install
```
注意:
- 执行./configure时默认是配置安装目录为/usr/local/,如果需要指定安装目录,请使用 ./configure --prefix=/your/install/path/
#### OSS C SDK的安装
安装时请在cmake命令中指定第三方库头文件以及库文件的路径,典型的编译命令如下:
```shell
cmake .
make
make install
```
注意:
- 执行cmake . 时默认会到/usr/local/下面去寻找curl,apr,apr-util,mxml的头文件和库文件。
- 默认编译是Debug类型,可以指定以下几种编译类型: Debug, Release, RelWithDebInfo和MinSizeRel,如果要使用release类型编译,则执行cmake . -DCMAKE_BUILD_TYPE=Release
- 如果您在安装curl,apr,apr-util,mxml时指定了安装目录,则需要在执行cmake时指定这些库的路径,比如:
```shell
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
```
- 如果要指定安装目录,则需要在cmake时增加: -DCMAKE_INSTALL_PREFIX=/your/install/path/usr/local/
## License
- MIT
## 联系我们
- [阿里云OSS官方网站](http://oss.aliyun.com)
- [阿里云OSS官方论坛](http://bbs.aliyun.com)
- [阿里云OSS官方文档中心](http://www.aliyun.com/product/oss#Docs)
- 阿里云官方技术支持:[提交工单](https://workorder.console.aliyun.com/#/ticket/createIndex)
================================================
FILE: README.md
================================================
# Alibaba Cloud OSS SDK for C
[](https://badge.fury.io/gh/aliyun%2Faliyun-oss-c-sdk)
[](https://travis-ci.org/aliyun/aliyun-oss-c-sdk)
[](https://coveralls.io/github/aliyun/aliyun-oss-c-sdk?branch=master)
[](LICENSE)
## [README of Chinese](https://github.com/aliyun/aliyun-oss-c-sdk/blob/master/README-CN.md)
## About
Alibaba 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.
## Version
- Current version: 3.11.2
## Install OSS C SDK
### Environment dependency
The OSS C SDK adopts cURL for network operations on both clients and servers.
OSS 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.
These 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.
#### Download and install third-party libraries
##### libcurl (Version 7.32.0 or above is recommended)
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:
```shell
./configure
make
make install
```
Notes:
- When you run the ./configure command, the default installation directory is /usr/local/. To specify another installation directory, use ./configure --prefix=/your/install/path/.
##### APR (Version 1.5.2 or above is recommended)
Download from [here](https://apr.apache.org/download.cgi). A typical installation method is as follows:
```shell
./configure
make
make install
```
Notes:
- When you run the ./configure command, the default installation directory is /usr/local/. To specify another installation directory, use ./configure --prefix=/your/install/path/.
##### APR-Util (Version 1.5.4 or above is recommended)
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:
```shell
./configure --with-apr=/your/apr/install/path
make
make install
```
Notes:
- When you run the ./configure command, the default installation directory is /usr/local/. To specify another installation directory, use ./configure --prefix=/your/install/path/.
- You need to specify the APR installation directory through --with-apr. To install APR under a system directory, specify --with-apr=/usr/local/apr/.
##### Mini-XML (Version 2.8 or above is recommended)
Download from [here](http://michaelrsweet.github.io/mxml/). A typical installation method is as follows:
```shell
./configure
make
make install
```
Notes:
- When you run the ./configure command, the default installation directory is /usr/local/. To specify another installation directory, use ./configure --prefix=/your/install/path/.
##### CMake (Version 2.6.0 or above is recommended)
Download from [here](https://cmake.org/download). A typical installation method is as follows:
```shell
./configure
make
make install
```
Notes:
- When you run the ./configure command, the default installation directory is /usr/local/. To specify another installation directory, use ./configure --prefix=/your/install/path/.
#### Install OSS C SDK
Specify the third-party library header file and library file paths in the cmake command during installation. A typical compilation command is as follows:
```shell
cmake .
make
make install
```
Notes:
- 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.
- 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.
- 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,
```shell
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
```
- To specify an installation directory, add the following when running CMake: -DCMAKE_INSTALL_PREFIX=/your/install/path/usr/local/。
## License
- MIT
## Contact us
- [Alibaba Cloud OSS official website](http://oss.aliyun.com).
- [Alibaba Cloud OSS official forum](http://bbs.aliyun.com).
- [Alibaba Cloud OSS official documentation center](http://www.aliyun.com/product/oss#Docs).
- Alibaba Cloud official technical support: [Submit a ticket](https://workorder.console.aliyun.com/#/ticket/createIndex).
================================================
FILE: oss_c_sdk/aos_buf.c
================================================
#include "aos_buf.h"
#include "aos_log.h"
#include <apr_file_io.h>
aos_buf_t *aos_create_buf(aos_pool_t *p, int size)
{
aos_buf_t* b;
b = aos_palloc(p, sizeof(aos_buf_t) + size);
if (b == NULL) {
return NULL;
}
b->pos = (uint8_t *)b + sizeof(aos_buf_t);
b->start = b->pos;
b->last = b->start;
b->end = b->last + size;
aos_list_init(&b->node);
return b;
}
aos_buf_t *aos_buf_pack(aos_pool_t *p, const void *data, int size)
{
aos_buf_t* b;
b = aos_palloc(p, sizeof(aos_buf_t));
if (b == NULL) {
return NULL;
}
b->pos = (uint8_t *)data;
b->start = b->pos;
b->last = b->start + size;
b->end = b->last;
aos_list_init(&b->node);
return b;
}
int64_t aos_buf_list_len(aos_list_t *list)
{
aos_buf_t *b;
int64_t len = 0;
aos_list_for_each_entry(aos_buf_t, b, list, node) {
len += aos_buf_size(b);
}
return len;
}
char *aos_buf_list_content(aos_pool_t *p, aos_list_t *list)
{
int64_t body_len;
char *buf;
int64_t pos = 0;
int64_t size = 0;
aos_buf_t *content;
body_len = aos_buf_list_len(list);
buf = aos_pcalloc(p, (size_t)(body_len + 1));
buf[body_len] = '\0';
aos_list_for_each_entry(aos_buf_t, content, list, node) {
size = aos_buf_size(content);
memcpy(buf + pos, content->pos, (size_t)(size));
pos += size;
}
return buf;
}
aos_file_buf_t *aos_create_file_buf(aos_pool_t *p)
{
return (aos_file_buf_t*)aos_pcalloc(p, sizeof(aos_file_buf_t));
}
int aos_open_file_for_read(aos_pool_t *p, const char *path, aos_file_buf_t *fb)
{
int s;
char buf[256];
apr_finfo_t finfo;
if ((s = apr_file_open(&fb->file, path, APR_READ, APR_UREAD | APR_GREAD, p)) != APR_SUCCESS) {
aos_error_log("apr_file_open failure, path:%s, code:%d %s.", (path ? path : ""), s, apr_strerror(s, buf, sizeof(buf)));
//assert(fb->file == NULL);
return AOSE_OPEN_FILE_ERROR;
}
if ((s = apr_file_info_get(&finfo, APR_FINFO_SIZE, fb->file)) != APR_SUCCESS) {
apr_file_close(fb->file);
aos_error_log("apr_file_info_get failure, path:%s, code:%d %s.", (path ? path : ""), s, apr_strerror(s, buf, sizeof(buf)));
return AOSE_FILE_INFO_ERROR;
}
fb->file_pos = 0;
fb->file_last = finfo.size;
fb->owner = 1;
return AOSE_OK;
}
int aos_open_file_for_all_read(aos_pool_t *p, const char *path, aos_file_buf_t *fb)
{
return aos_open_file_for_read(p, path, fb);
}
int aos_open_file_for_range_read(aos_pool_t *p, const char *path,
int64_t file_pos, int64_t file_last, aos_file_buf_t *fb)
{
int s;
s = aos_open_file_for_read(p, path, fb);
if (s == AOSE_OK) {
if (file_pos > fb->file_pos) {
if (file_pos > fb->file_last) {
aos_warn_log("read range beyond file size, read start:%" APR_INT64_T_FMT ", file size:%" APR_INT64_T_FMT "\n",
file_pos, fb->file_last);
file_pos = fb->file_last;
}
fb->file_pos = file_pos;
}
if (file_last < fb->file_last) {
fb->file_last = file_last;
}
apr_file_seek(fb->file, APR_SET, (apr_off_t *)&fb->file_pos);
}
return s;
}
int aos_open_file_for_write(aos_pool_t *p, const char *path, aos_file_buf_t *fb)
{
int s;
char buf[256];
if ((s = apr_file_open(&fb->file, path, APR_CREATE | APR_WRITE | APR_TRUNCATE,
APR_UREAD | APR_UWRITE | APR_GREAD, p)) != APR_SUCCESS) {
aos_error_log("apr_file_open failure, path:%s, code:%d %s.", (path ? path : ""), s, apr_strerror(s, buf, sizeof(buf)));
//assert(fb->file == NULL);
return AOSE_OPEN_FILE_ERROR;
}
fb->owner = 1;
return AOSE_OK;
}
int aos_open_file_for_write_notrunc(aos_pool_t *p, const char *path, aos_file_buf_t *fb)
{
int s;
char buf[256];
if ((s = apr_file_open(&fb->file, path, APR_CREATE | APR_WRITE,
APR_UREAD | APR_UWRITE | APR_GREAD, p)) != APR_SUCCESS) {
aos_error_log("apr_file_open failure, path:%s, code:%d %s.", (path ? path : ""), s, apr_strerror(s, buf, sizeof(buf)));
//assert(fb->file == NULL);
return AOSE_OPEN_FILE_ERROR;
}
fb->owner = 1;
return AOSE_OK;
}
void aos_buf_append_string(aos_pool_t *p, aos_buf_t *b, const char *str, int len)
{
int size;
int nsize;
int remain;
char *buf;
if (len <= 0) return;
remain = b->end - b->last;
if (remain > len + 128) {
memcpy(b->last, str, len);
b->last += len;
} else {
size = aos_buf_size(b);
nsize = (size + len) * 2;
buf = aos_palloc(p, nsize);
memcpy(buf, b->pos, size);
memcpy(buf+size, str, len);
b->start = (uint8_t *)buf;
b->end = (uint8_t *)buf + nsize;
b->pos = (uint8_t *)buf;
b->last = (uint8_t *)buf + size + len;
}
}
================================================
FILE: oss_c_sdk/aos_buf.h
================================================
#ifndef LIBAOS_BUF_H
#define LIBAOS_BUF_H
#include "aos_define.h"
#include "aos_list.h"
AOS_CPP_START
typedef struct {
aos_list_t node;
uint8_t *pos;
uint8_t *last;
uint8_t *start;
uint8_t *end;
} aos_buf_t;
typedef struct {
aos_list_t node;
int64_t file_pos;
int64_t file_last;
apr_file_t *file;
uint32_t owner:1;
} aos_file_buf_t;
aos_buf_t *aos_create_buf(aos_pool_t *p, int size);
#define aos_buf_size(b) (b->last - b->pos)
aos_file_buf_t *aos_create_file_buf(aos_pool_t *p);
aos_buf_t *aos_buf_pack(aos_pool_t *p, const void *data, int size);
int64_t aos_buf_list_len(aos_list_t *list);
char *aos_buf_list_content(aos_pool_t *p, aos_list_t *list);
void aos_buf_append_string(aos_pool_t *p, aos_buf_t *b, const char *str, int len);
/**
* @param fb file_pos, file_last equal file_size.
* @return AOSE_OK success, other failure.
*/
int aos_open_file_for_read(aos_pool_t *p, const char *path, aos_file_buf_t *fb);
int aos_open_file_for_all_read(aos_pool_t *p, const char *path, aos_file_buf_t *fb);
int aos_open_file_for_range_read(aos_pool_t *p, const char *path,
int64_t file_pos, int64_t file_last,
aos_file_buf_t *fb);
/**
* create the file if not there, truncate if file exists.
* @param fb not check file_pos, file_last.
* @return AOSE_OK success, other failure.
*/
int aos_open_file_for_write(aos_pool_t *p, const char *path, aos_file_buf_t *fb);
/**
* create the file if not there.
* @param fb not check file_pos, file_last.
* @return AOSE_OK success, other failure.
*/
int aos_open_file_for_write_notrunc(aos_pool_t *p, const char *path, aos_file_buf_t *fb);
AOS_CPP_END
#endif
================================================
FILE: oss_c_sdk/aos_crc64.c
================================================
/* aos_crc64.c -- compute CRC-64
* Copyright (C) 2013 Mark Adler
* Version 1.4 16 Dec 2013 Mark Adler
*/
/*
This software is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Mark Adler
madler@alumni.caltech.edu
*/
/* Compute CRC-64 in the manner of xz, using the ECMA-182 polynomial,
bit-reversed, with one's complement pre and post processing. Provide a
means to combine separately computed CRC-64's. */
/* Version history:
1.0 13 Dec 2013 First version
1.1 13 Dec 2013 Fix comments in test code
1.2 14 Dec 2013 Determine endianess at run time
1.3 15 Dec 2013 Add eight-byte processing for big endian as well
Make use of the pthread library optional
1.4 16 Dec 2013 Make once variable volatile for limited thread protection
*/
#include "aos_crc64.h"
/* 64-bit CRC polynomial with these coefficients, but reversed:
64, 62, 57, 55, 54, 53, 52, 47, 46, 45, 40, 39, 38, 37, 35, 33, 32,
31, 29, 27, 24, 23, 22, 21, 19, 17, 13, 12, 10, 9, 7, 4, 1, 0 */
#define POLY UINT64_C(0xc96c5795d7870f42)
/* Tables for CRC calculation -- filled in by initialization functions that are
called once. These could be replaced by constant tables generated in the
same way. There are two tables, one for each endianess. Since these are
static, i.e. local, one should be compiled out of existence if the compiler
can evaluate the endianess check in crc64() at compile time. */
static uint64_t crc64_little_table[8][256];
static uint64_t crc64_big_table[8][256];
/* Fill in the CRC-64 constants table. */
static void crc64_init(uint64_t table[][256])
{
unsigned n, k;
uint64_t crc;
/* generate CRC-64's for all single byte sequences */
for (n = 0; n < 256; n++) {
crc = n;
for (k = 0; k < 8; k++)
crc = crc & 1 ? POLY ^ (crc >> 1) : crc >> 1;
table[0][n] = crc;
}
/* generate CRC-64's for those followed by 1 to 7 zeros */
for (n = 0; n < 256; n++) {
crc = table[0][n];
for (k = 1; k < 8; k++) {
crc = table[0][crc & 0xff] ^ (crc >> 8);
table[k][n] = crc;
}
}
}
/* This function is called once to initialize the CRC-64 table for use on a
little-endian architecture. */
static void crc64_little_init(void)
{
crc64_init(crc64_little_table);
}
/* Reverse the bytes in a 64-bit word. */
static APR_INLINE uint64_t rev8(uint64_t a)
{
uint64_t m;
m = UINT64_C(0xff00ff00ff00ff);
a = ((a >> 8) & m) | (a & m) << 8;
m = UINT64_C(0xffff0000ffff);
a = ((a >> 16) & m) | (a & m) << 16;
return a >> 32 | a << 32;
}
/* This function is called once to initialize the CRC-64 table for use on a
big-endian architecture. */
static void crc64_big_init(void)
{
unsigned k, n;
crc64_init(crc64_big_table);
for (k = 0; k < 8; k++)
for (n = 0; n < 256; n++)
crc64_big_table[k][n] = rev8(crc64_big_table[k][n]);
}
/* Run the init() function exactly once. If pthread.h is not included, then
this macro will use a simple static state variable for the purpose, which is
not thread-safe. The init function must be of the type void init(void). */
#ifdef PTHREAD_ONCE_INIT
# define ONCE(init) \
do { \
static pthread_once_t once = PTHREAD_ONCE_INIT; \
pthread_once(&once, init); \
} while (0)
#else
# define ONCE(init) \
do { \
static volatile int once = 1; \
if (once) { \
if (once++ == 1) { \
init(); \
once = 0; \
} \
else \
while (once) \
; \
} \
} while (0)
#endif
/* Calculate a CRC-64 eight bytes at a time on a little-endian architecture. */
static APR_INLINE uint64_t crc64_little(uint64_t crc, void *buf, size_t len)
{
unsigned char *next = buf;
ONCE(crc64_little_init);
crc = ~crc;
while (len && ((uintptr_t)next & 7) != 0) {
crc = crc64_little_table[0][(crc ^ *next++) & 0xff] ^ (crc >> 8);
len--;
}
while (len >= 8) {
crc ^= *(uint64_t *)next;
crc = crc64_little_table[7][crc & 0xff] ^
crc64_little_table[6][(crc >> 8) & 0xff] ^
crc64_little_table[5][(crc >> 16) & 0xff] ^
crc64_little_table[4][(crc >> 24) & 0xff] ^
crc64_little_table[3][(crc >> 32) & 0xff] ^
crc64_little_table[2][(crc >> 40) & 0xff] ^
crc64_little_table[1][(crc >> 48) & 0xff] ^
crc64_little_table[0][crc >> 56];
next += 8;
len -= 8;
}
while (len) {
crc = crc64_little_table[0][(crc ^ *next++) & 0xff] ^ (crc >> 8);
len--;
}
return ~crc;
}
/* Calculate a CRC-64 eight bytes at a time on a big-endian architecture. */
static APR_INLINE uint64_t crc64_big(uint64_t crc, void *buf, size_t len)
{
unsigned char *next = buf;
ONCE(crc64_big_init);
crc = ~rev8(crc);
while (len && ((uintptr_t)next & 7) != 0) {
crc = crc64_big_table[0][(crc >> 56) ^ *next++] ^ (crc << 8);
len--;
}
while (len >= 8) {
crc ^= *(uint64_t *)next;
crc = crc64_big_table[0][crc & 0xff] ^
crc64_big_table[1][(crc >> 8) & 0xff] ^
crc64_big_table[2][(crc >> 16) & 0xff] ^
crc64_big_table[3][(crc >> 24) & 0xff] ^
crc64_big_table[4][(crc >> 32) & 0xff] ^
crc64_big_table[5][(crc >> 40) & 0xff] ^
crc64_big_table[6][(crc >> 48) & 0xff] ^
crc64_big_table[7][crc >> 56];
next += 8;
len -= 8;
}
while (len) {
crc = crc64_big_table[0][(crc >> 56) ^ *next++] ^ (crc << 8);
len--;
}
return ~rev8(crc);
}
/* Return the CRC-64 of buf[0..len-1] with initial crc, processing eight bytes
at a time. This selects one of two routines depending on the endianess of
the architecture. A good optimizing compiler will determine the endianess
at compile time if it can, and get rid of the unused code and table. If the
endianess can be changed at run time, then this code will handle that as
well, initializing and using two tables, if called upon to do so. */
uint64_t aos_crc64(uint64_t crc, void *buf, size_t len)
{
uint64_t n = 1;
return *(char *)&n ? crc64_little(crc, buf, len) :
crc64_big(crc, buf, len);
}
uint64_t aos_crc64_test(uint64_t crc, void *buf, size_t len, int little)
{
return little ? crc64_little(crc, buf, len): crc64_big(crc, buf, len);
}
#define GF2_DIM 64 /* dimension of GF(2) vectors (length of CRC) */
static uint64_t gf2_matrix_times(uint64_t *mat, uint64_t vec)
{
uint64_t sum;
sum = 0;
while (vec) {
if (vec & 1)
sum ^= *mat;
vec >>= 1;
mat++;
}
return sum;
}
static void gf2_matrix_square(uint64_t *square, uint64_t *mat)
{
unsigned n;
for (n = 0; n < GF2_DIM; n++)
square[n] = gf2_matrix_times(mat, mat[n]);
}
/* Return the CRC-64 of two sequential blocks, where crc1 is the CRC-64 of the
first block, crc2 is the CRC-64 of the second block, and len2 is the length
of the second block. */
uint64_t aos_crc64_combine(uint64_t crc1, uint64_t crc2, uintmax_t len2)
{
unsigned n;
uint64_t row;
uint64_t even[GF2_DIM]; /* even-power-of-two zeros operator */
uint64_t odd[GF2_DIM]; /* odd-power-of-two zeros operator */
/* degenerate case */
if (len2 == 0)
return crc1;
/* put operator for one zero bit in odd */
odd[0] = POLY; /* CRC-64 polynomial */
row = 1;
for (n = 1; n < GF2_DIM; n++) {
odd[n] = row;
row <<= 1;
}
/* put operator for two zero bits in even */
gf2_matrix_square(even, odd);
/* put operator for four zero bits in odd */
gf2_matrix_square(odd, even);
/* apply len2 zeros to crc1 (first square will put the operator for one
zero byte, eight zero bits, in even) */
do {
/* apply zeros operator for this bit of len2 */
gf2_matrix_square(even, odd);
if (len2 & 1)
crc1 = gf2_matrix_times(even, crc1);
len2 >>= 1;
/* if no more bits set, then done */
if (len2 == 0)
break;
/* another iteration of the loop with odd and even swapped */
gf2_matrix_square(odd, even);
if (len2 & 1)
crc1 = gf2_matrix_times(odd, crc1);
len2 >>= 1;
/* if no more bits set, then done */
} while (len2 != 0);
/* return combined crc */
crc1 ^= crc2;
return crc1;
}
/*CRC32*/
static const uint32_t crc32Table[256] = {
0x00000000,0x77073096,0xEE0E612C,0x990951BA,0x076DC419,0x706AF48F,0xE963A535,
0x9E6495A3,0x0EDB8832,0x79DCB8A4,0xE0D5E91E,0x97D2D988,0x09B64C2B,0x7EB17CBD,
0xE7B82D07,0x90BF1D91,0x1DB71064,0x6AB020F2,0xF3B97148,0x84BE41DE,0x1ADAD47D,
0x6DDDE4EB,0xF4D4B551,0x83D385C7,0x136C9856,0x646BA8C0,0xFD62F97A,0x8A65C9EC,
0x14015C4F,0x63066CD9,0xFA0F3D63,0x8D080DF5,0x3B6E20C8,0x4C69105E,0xD56041E4,
0xA2677172,0x3C03E4D1,0x4B04D447,0xD20D85FD,0xA50AB56B,0x35B5A8FA,0x42B2986C,
0xDBBBC9D6,0xACBCF940,0x32D86CE3,0x45DF5C75,0xDCD60DCF,0xABD13D59,0x26D930AC,
0x51DE003A,0xC8D75180,0xBFD06116,0x21B4F4B5,0x56B3C423,0xCFBA9599,0xB8BDA50F,
0x2802B89E,0x5F058808,0xC60CD9B2,0xB10BE924,0x2F6F7C87,0x58684C11,0xC1611DAB,
0xB6662D3D,0x76DC4190,0x01DB7106,0x98D220BC,0xEFD5102A,0x71B18589,0x06B6B51F,
0x9FBFE4A5,0xE8B8D433,0x7807C9A2,0x0F00F934,0x9609A88E,0xE10E9818,0x7F6A0DBB,
0x086D3D2D,0x91646C97,0xE6635C01,0x6B6B51F4,0x1C6C6162,0x856530D8,0xF262004E,
0x6C0695ED,0x1B01A57B,0x8208F4C1,0xF50FC457,0x65B0D9C6,0x12B7E950,0x8BBEB8EA,
0xFCB9887C,0x62DD1DDF,0x15DA2D49,0x8CD37CF3,0xFBD44C65,0x4DB26158,0x3AB551CE,
0xA3BC0074,0xD4BB30E2,0x4ADFA541,0x3DD895D7,0xA4D1C46D,0xD3D6F4FB,0x4369E96A,
0x346ED9FC,0xAD678846,0xDA60B8D0,0x44042D73,0x33031DE5,0xAA0A4C5F,0xDD0D7CC9,
0x5005713C,0x270241AA,0xBE0B1010,0xC90C2086,0x5768B525,0x206F85B3,0xB966D409,
0xCE61E49F,0x5EDEF90E,0x29D9C998,0xB0D09822,0xC7D7A8B4,0x59B33D17,0x2EB40D81,
0xB7BD5C3B,0xC0BA6CAD,0xEDB88320,0x9ABFB3B6,0x03B6E20C,0x74B1D29A,0xEAD54739,
0x9DD277AF,0x04DB2615,0x73DC1683,0xE3630B12,0x94643B84,0x0D6D6A3E,0x7A6A5AA8,
0xE40ECF0B,0x9309FF9D,0x0A00AE27,0x7D079EB1,0xF00F9344,0x8708A3D2,0x1E01F268,
0x6906C2FE,0xF762575D,0x806567CB,0x196C3671,0x6E6B06E7,0xFED41B76,0x89D32BE0,
0x10DA7A5A,0x67DD4ACC,0xF9B9DF6F,0x8EBEEFF9,0x17B7BE43,0x60B08ED5,0xD6D6A3E8,
0xA1D1937E,0x38D8C2C4,0x4FDFF252,0xD1BB67F1,0xA6BC5767,0x3FB506DD,0x48B2364B,
0xD80D2BDA,0xAF0A1B4C,0x36034AF6,0x41047A60,0xDF60EFC3,0xA867DF55,0x316E8EEF,
0x4669BE79,0xCB61B38C,0xBC66831A,0x256FD2A0,0x5268E236,0xCC0C7795,0xBB0B4703,
0x220216B9,0x5505262F,0xC5BA3BBE,0xB2BD0B28,0x2BB45A92,0x5CB36A04,0xC2D7FFA7,
0xB5D0CF31,0x2CD99E8B,0x5BDEAE1D,0x9B64C2B0,0xEC63F226,0x756AA39C,0x026D930A,
0x9C0906A9,0xEB0E363F,0x72076785,0x05005713,0x95BF4A82,0xE2B87A14,0x7BB12BAE,
0x0CB61B38,0x92D28E9B,0xE5D5BE0D,0x7CDCEFB7,0x0BDBDF21,0x86D3D2D4,0xF1D4E242,
0x68DDB3F8,0x1FDA836E,0x81BE16CD,0xF6B9265B,0x6FB077E1,0x18B74777,0x88085AE6,
0xFF0F6A70,0x66063BCA,0x11010B5C,0x8F659EFF,0xF862AE69,0x616BFFD3,0x166CCF45,
0xA00AE278,0xD70DD2EE,0x4E048354,0x3903B3C2,0xA7672661,0xD06016F7,0x4969474D,
0x3E6E77DB,0xAED16A4A,0xD9D65ADC,0x40DF0B66,0x37D83BF0,0xA9BCAE53,0xDEBB9EC5,
0x47B2CF7F,0x30B5FFE9,0xBDBDF21C,0xCABAC28A,0x53B39330,0x24B4A3A6,0xBAD03605,
0xCDD70693,0x54DE5729,0x23D967BF,0xB3667A2E,0xC4614AB8,0x5D681B02,0x2A6F2B94,
0xB40BBE37,0xC30C8EA1,0x5A05DF1B,0x2D02EF8D
};
uint32_t aos_crc32(uint32_t crc, const void *buf, size_t bufLen)
{
uint32_t crc32;
unsigned char *byteBuf;
size_t i;
/** accumulate crc32 for buffer **/
crc32 = crc ^ 0xFFFFFFFF;
byteBuf = (unsigned char*)buf;
for (i = 0; i < bufLen; i++) {
crc32 = (crc32 >> 8) ^ crc32Table[(crc32 ^ byteBuf[i]) & 0xFF];
}
return crc32 ^ 0xFFFFFFFF;
}
================================================
FILE: oss_c_sdk/aos_crc64.h
================================================
#ifndef LIBAOS_CRC_H
#define LIBAOS_CRC_H
#include "aos_define.h"
AOS_CPP_START
uint64_t aos_crc64(uint64_t crc, void *buf, size_t len);
uint64_t aos_crc64_combine(uint64_t crc1, uint64_t crc2, uintmax_t len2);
uint32_t aos_crc32(uint32_t crc, const void *buf, size_t bufLen);
uint64_t aos_crc64_test(uint64_t crc, void *buf, size_t len, int little);
AOS_CPP_END
#endif
================================================
FILE: oss_c_sdk/aos_define.h
================================================
#ifndef LIBAOS_DEFINE_H
#define LIBAOS_DEFINE_H
#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <apr_portable.h>
#include <apr_time.h>
#include <apr_strings.h>
#include <apr_pools.h>
#include <apr_tables.h>
#include <apr_file_io.h>
#include <curl/curl.h>
#ifdef __cplusplus
# define AOS_CPP_START extern "C" {
# define AOS_CPP_END }
#else
# define AOS_CPP_START
# define AOS_CPP_END
#endif
typedef enum {
HTTP_GET,
HTTP_HEAD,
HTTP_PUT,
HTTP_POST,
HTTP_DELETE
} http_method_e;
typedef enum {
AOSE_OK = 0,
AOSE_OUT_MEMORY = -1000,
AOSE_OVER_MEMORY = -999,
AOSE_FAILED_CONNECT = -998,
AOSE_ABORT_CALLBACK = -997,
AOSE_INTERNAL_ERROR = -996,
AOSE_REQUEST_TIMEOUT = -995,
AOSE_INVALID_ARGUMENT = -994,
AOSE_INVALID_OPERATION = -993,
AOSE_CONNECTION_FAILED = -992,
AOSE_FAILED_INITIALIZE = -991,
AOSE_NAME_LOOKUP_ERROR = -990,
AOSE_FAILED_VERIFICATION = -989,
AOSE_WRITE_BODY_ERROR = -988,
AOSE_READ_BODY_ERROR = -987,
AOSE_SERVICE_ERROR = -986,
AOSE_OPEN_FILE_ERROR = -985,
AOSE_FILE_SEEK_ERROR = -984,
AOSE_FILE_INFO_ERROR = -983,
AOSE_FILE_READ_ERROR = -982,
AOSE_FILE_WRITE_ERROR = -981,
AOSE_XML_PARSE_ERROR = -980,
AOSE_UTF8_ENCODE_ERROR = -979,
AOSE_CRC_INCONSISTENT_ERROR = -978,
AOSE_FILE_FLUSH_ERROR = -977,
AOSE_FILE_TRUNC_ERROR = -976,
AOSE_SELECT_OBJECT_CRC_ERROR = -975,
AOSE_UNKNOWN_ERROR = -100
} aos_error_code_e;
typedef apr_pool_t aos_pool_t;
typedef apr_table_t aos_table_t;
typedef apr_table_entry_t aos_table_entry_t;
typedef apr_array_header_t aos_array_header_t;
#define aos_table_elts(t) apr_table_elts(t)
#define aos_is_empty_table(t) apr_is_empty_table(t)
#define aos_table_make(p, n) apr_table_make(p, n)
#define aos_table_add_int(t, key, value) do { \
char value_str[64]; \
apr_snprintf(value_str, sizeof(value_str), "%d", value);\
apr_table_add(t, key, value_str); \
} while(0)
#define aos_table_add_int64(t, key, value) do { \
char value_str[64]; \
apr_snprintf(value_str, sizeof(value_str), "%" APR_INT64_T_FMT, value);\
apr_table_add(t, key, value_str); \
} while(0)
#define aos_table_set_int64(t, key, value) do { \
char value_str[64]; \
apr_snprintf(value_str, sizeof(value_str), "%" APR_INT64_T_FMT, value);\
apr_table_set(t, key, value_str); \
} while(0)
#define aos_pool_create(n, p) apr_pool_create(n, p)
#define aos_pool_destroy(p) apr_pool_destroy(p)
#define aos_palloc(p, s) apr_palloc(p, s)
#define aos_pcalloc(p, s) apr_pcalloc(p, s)
#define AOS_INIT_WINSOCK 1
#define AOS_MD5_STRING_LEN 32
#define AOS_MAX_URI_LEN 2048
#define AOS_MAX_HEADER_LEN 8192
#define AOS_MAX_QUERY_ARG_LEN 1024
#define AOS_MAX_GMT_TIME_LEN 128
#define AOS_MAX_SHORT_TIME_LEN 10
#define AOS_MAX_XML_NODE_VALUE_LEN 1024
#define AOS_MAX_INT64_STRING_LEN 64
#define AOS_MAX_UINT64_STRING_LEN 64
#define AOS_CONNECT_TIMEOUT 10
#define AOS_DNS_CACHE_TIMOUT 60
#define AOS_MIN_SPEED_LIMIT 1024
#define AOS_MIN_SPEED_TIME 15
#define AOS_MAX_MEMORY_SIZE 1024*1024*1024L
#define AOS_MAX_PART_SIZE 512*1024*1024L
#define AOS_DEFAULT_PART_SIZE 1024*1024L
#define AOS_REQUEST_STACK_SIZE 32
#define aos_abs(value) (((value) >= 0) ? (value) : - (value))
#define aos_max(val1, val2) (((val1) < (val2)) ? (val2) : (val1))
#define aos_min(val1, val2) (((val1) > (val2)) ? (val2) : (val1))
#define LF (char) 10
#define CR (char) 13
#define CRLF "\x0d\x0a"
#define AOS_VERSION "3.11.2"
#define AOS_VER "aliyun-sdk-c/" AOS_VERSION
#define AOS_HTTP_PREFIX "http://"
#define AOS_HTTPS_PREFIX "https://"
#define AOS_RTMP_PREFIX "rtmp://"
#define AOS_TEMP_FILE_SUFFIX ".tmp"
#define AOS_FALSE 0
#define AOS_TRUE 1
# ifndef WIN32
# ifndef __LONG_LONG_MAX__
# define __LONG_LONG_MAX__ 9223372036854775807LL
# endif
# ifndef LLONG_MIN
# define LLONG_MIN (-LLONG_MAX-1)
# endif
# ifndef LLONG_MAX
# define LLONG_MAX __LONG_LONG_MAX__
# endif
# ifndef ULLONG_MAX
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
# endif
# endif
#endif
================================================
FILE: oss_c_sdk/aos_fstack.c
================================================
#include "aos_fstack.h"
aos_array_header_t *aos_fstack_create(aos_pool_t *p, int size)
{
return apr_array_make(p, size, sizeof(aos_fstack_item_t));
}
void aos_fstack_push(aos_array_header_t *fstack, void *data, aos_func_u func, int order)
{
aos_fstack_item_t *item;
item = (aos_fstack_item_t*)apr_array_push(fstack);
item->data = data;
item->func = func;
item->order = order;
}
aos_fstack_item_t *aos_fstack_pop(aos_array_header_t *fstack)
{
aos_fstack_item_t *item;
item = (aos_fstack_item_t*)apr_array_pop(fstack);
if (item == NULL) {
return NULL;
}
switch (item->order) {
case 1:
item->func.func1(item->data);
break;
case 2:
item->func.func2();
break;
case 3:
item->func.func3(item->data);
break;
case 4:
item->func.func4();
break;
default:
break;
}
return item;
}
void aos_fstack_destory(aos_array_header_t *fstack)
{
while (aos_fstack_pop(fstack) != NULL);
}
================================================
FILE: oss_c_sdk/aos_fstack.h
================================================
#ifndef LIBAOS_FSTACK_H
#define LIBAOS_FSTACK_H
#include "aos_define.h"
AOS_CPP_START
typedef void (*aos_func1_pt)(void*);
typedef void (*aos_func2_pt)();
typedef int (*aos_func3_pt)(void*);
typedef int (*aos_func4_pt)();
typedef union aos_func_u {
aos_func1_pt func1;
aos_func2_pt func2;
aos_func3_pt func3;
aos_func4_pt func4;
} aos_func_u;
typedef struct aos_fstack_item_t {
void *data;
aos_func_u func;
int order;
} aos_fstack_item_t;
aos_array_header_t *aos_fstack_create(aos_pool_t *p, int size);
aos_fstack_item_t *aos_fstack_pop(aos_array_header_t *fstack);
void aos_fstack_destory(aos_array_header_t *fstack);
void aos_fstack_push(aos_array_header_t *fstack, void *data, aos_func_u func, int order);
AOS_CPP_END
#endif
================================================
FILE: oss_c_sdk/aos_http_io.c
================================================
#include "aos_log.h"
#include "aos_http_io.h"
#include "aos_define.h"
#include <apr_thread_mutex.h>
#include <apr_file_io.h>
aos_pool_t *aos_global_pool = NULL;
apr_file_t *aos_stderr_file = NULL;
aos_http_request_options_t *aos_default_http_request_options = NULL;
aos_http_transport_options_t *aos_default_http_transport_options = NULL;
aos_http_transport_create_pt aos_http_transport_create = aos_curl_http_transport_create;
aos_http_transport_perform_pt aos_http_transport_perform = aos_curl_http_transport_perform;
static apr_thread_mutex_t* requestStackMutexG = NULL;
static CURL *requestStackG[AOS_REQUEST_STACK_SIZE];
static int requestStackCountG;
static char aos_user_agent[256];
static aos_http_transport_options_t *aos_http_transport_options_create(aos_pool_t *p);
CURL *aos_request_get()
{
CURL *request = NULL;
apr_thread_mutex_lock(requestStackMutexG);
if (requestStackCountG > 0) {
request = requestStackG[--requestStackCountG];
}
apr_thread_mutex_unlock(requestStackMutexG);
// If we got one, deinitialize it for re-use
if (request) {
curl_easy_reset(request);
}
else {
request = curl_easy_init();
}
return request;
}
void request_release(CURL *request)
{
apr_thread_mutex_lock(requestStackMutexG);
// If the request stack is full, destroy this one
// else put this one at the front of the request stack; we do this because
// we want the most-recently-used curl handle to be re-used on the next
// request, to maximize our chances of re-using a TCP connection before it
// times out
if (requestStackCountG == AOS_REQUEST_STACK_SIZE) {
apr_thread_mutex_unlock(requestStackMutexG);
curl_easy_cleanup(request);
}
else {
requestStackG[requestStackCountG++] = request;
apr_thread_mutex_unlock(requestStackMutexG);
}
}
void request_release2(aos_curl_http_transport_t* t)
{
CURL* request = t->curl;
CURLcode code = t->curl_code;
apr_thread_mutex_lock(requestStackMutexG);
// If the request stack is full, destroy this one
// else put this one at the front of the request stack; we do this because
// we want the most-recently-used curl handle to be re-used on the next
// request, to maximize our chances of re-using a TCP connection before it
// times out
if (requestStackCountG == AOS_REQUEST_STACK_SIZE || code != CURLE_OK) {
apr_thread_mutex_unlock(requestStackMutexG);
curl_easy_cleanup(request);
}
else {
requestStackG[requestStackCountG++] = request;
apr_thread_mutex_unlock(requestStackMutexG);
}
}
void aos_set_default_request_options(aos_http_request_options_t *op)
{
aos_default_http_request_options = op;
}
void aos_set_default_transport_options(aos_http_transport_options_t *op)
{
aos_default_http_transport_options = op;
}
aos_http_request_options_t *aos_http_request_options_create(aos_pool_t *p)
{
aos_http_request_options_t *options;
options = (aos_http_request_options_t *)aos_pcalloc(p, sizeof(aos_http_request_options_t));
options->speed_limit = AOS_MIN_SPEED_LIMIT;
options->speed_time = AOS_MIN_SPEED_TIME;
options->connect_timeout = AOS_CONNECT_TIMEOUT;
options->dns_cache_timeout = AOS_DNS_CACHE_TIMOUT;
options->max_memory_size = AOS_MAX_MEMORY_SIZE;
options->enable_crc = AOS_TRUE;
options->proxy_auth = NULL;
options->proxy_host = NULL;
options->verify_ssl = AOS_TRUE;
options->ca_file = NULL;
options->ca_path = NULL;
options->verify_object_strict = AOS_TRUE;
return options;
}
aos_http_transport_options_t *aos_http_transport_options_create(aos_pool_t *p)
{
return (aos_http_transport_options_t *)aos_pcalloc(p, sizeof(aos_http_transport_options_t));
}
aos_http_controller_t *aos_http_controller_create(aos_pool_t *p, int owner)
{
int s;
aos_http_controller_t *ctl;
if(p == NULL) {
if ((s = aos_pool_create(&p, NULL)) != APR_SUCCESS) {
aos_fatal_log("aos_pool_create failure.");
return NULL;
}
}
ctl = (aos_http_controller_t *)aos_pcalloc(p, sizeof(aos_http_controller_ex_t));
ctl->pool = p;
ctl->owner = owner;
ctl->options = aos_default_http_request_options;
return ctl;
}
aos_http_request_t *aos_http_request_create(aos_pool_t *p)
{
aos_http_request_t *req;
req = (aos_http_request_t *)aos_pcalloc(p, sizeof(aos_http_request_t));
req->method = HTTP_GET;
req->headers = aos_table_make(p, 5);
req->query_params = aos_table_make(p, 3);
aos_list_init(&req->body);
req->type = BODY_IN_MEMORY;
req->body_len = 0;
req->pool = p;
req->read_body = aos_read_http_body_memory;
req->normalize_url = 0;
return req;
}
aos_http_response_t *aos_http_response_create(aos_pool_t *p)
{
aos_http_response_t *resp;
resp = (aos_http_response_t *)aos_pcalloc(p, sizeof(aos_http_response_t));
resp->status = -1;
resp->headers = aos_table_make(p, 10);
aos_list_init(&resp->body);
resp->type = BODY_IN_MEMORY;
resp->body_len = 0;
resp->pool = p;
resp->write_body = aos_write_http_body_memory;
return resp;
}
int aos_read_http_body_memory(aos_http_request_t *req, char *buffer, int len)
{
int wsize;
int bytes = 0;
aos_buf_t *b;
aos_buf_t *n;
aos_list_for_each_entry_safe(aos_buf_t, b, n, &req->body, node) {
wsize = aos_buf_size(b);
if (wsize == 0) {
aos_list_del(&b->node);
continue;
}
wsize = aos_min(len - bytes, wsize);
if (wsize == 0) {
break;
}
memcpy(buffer + bytes, b->pos, wsize);
b->pos += wsize;
bytes += wsize;
if (b->pos == b->last) {
aos_list_del(&b->node);
}
}
return bytes;
}
int aos_read_http_body_file(aos_http_request_t *req, char *buffer, int len)
{
int s;
char buf[256];
apr_size_t nbytes = len;
apr_size_t bytes_left;
if (req->file_buf == NULL || req->file_buf->file == NULL) {
aos_error_log("request body arg invalid file_buf NULL.");
return AOSE_INVALID_ARGUMENT;
}
if (req->file_buf->file_pos >= req->file_buf->file_last) {
aos_debug_log("file read finish.");
return 0;
}
bytes_left = (apr_size_t)(req->file_buf->file_last - req->file_buf->file_pos);
if (nbytes > bytes_left) {
nbytes = bytes_left;
}
s = apr_file_read(req->file_buf->file, buffer, &nbytes);
if (s != APR_SUCCESS && s != APR_EOF) {
aos_error_log("apr_file_read filure, file:%s, code:%d %s.", req->file_path, s, apr_strerror(s, buf, sizeof(buf)));
return AOSE_FILE_READ_ERROR;
}
req->file_buf->file_pos += nbytes;
return nbytes;
}
int aos_write_http_body_memory(aos_http_response_t *resp, const char *buffer, int len)
{
aos_buf_t *b;
b = aos_create_buf(resp->pool, len);
memcpy(b->pos, buffer, len);
b->last += len;
aos_list_add_tail(&b->node, &resp->body);
resp->body_len += len;
return len;
}
int aos_write_http_body_file(aos_http_response_t *resp, const char *buffer, int len)
{
int elen;
int s;
char buf[256];
apr_size_t nbytes = len;
if (resp->file_buf == NULL) {
resp->file_buf = aos_create_file_buf(resp->pool);
}
if (resp->file_buf->file == NULL) {
if (resp->file_path == NULL) {
aos_error_log("resp body file arg NULL.");
return AOSE_INVALID_ARGUMENT;
}
aos_trace_log("open file %s.", resp->file_path);
if ((elen = aos_open_file_for_write(resp->pool, resp->file_path, resp->file_buf)) != AOSE_OK) {
return elen;
}
}
assert(resp->file_buf->file != NULL);
if ((s = apr_file_write(resp->file_buf->file, buffer, &nbytes)) != APR_SUCCESS) {
aos_error_log("apr_file_write fialure, file:%s, code:%d %s.", resp->file_path, s, apr_strerror(s, buf, sizeof(buf)));
return AOSE_FILE_WRITE_ERROR;
}
resp->file_buf->file_last += nbytes;
resp->body_len += nbytes;
return nbytes;
}
int aos_http_io_initialize(const char *user_agent_info, int flags)
{
CURLcode ecode;
int s;
char buf[256];
aos_http_request_options_t *req_options;
aos_http_transport_options_t *trans_options;
if ((ecode = curl_global_init(CURL_GLOBAL_ALL &
~((flags & AOS_INIT_WINSOCK) ? 0: CURL_GLOBAL_WIN32))) != CURLE_OK)
{
aos_error_log("curl_global_init failure, code:%d %s.\n", ecode, curl_easy_strerror(ecode));
return AOSE_INTERNAL_ERROR;
}
if ((s = apr_initialize()) != APR_SUCCESS) {
aos_error_log("apr_initialize failue.\n");
return AOSE_INTERNAL_ERROR;
}
if (!user_agent_info || !*user_agent_info) {
user_agent_info = "Unknown";
}
if ((s = aos_pool_create(&aos_global_pool, NULL)) != APR_SUCCESS) {
aos_error_log("aos_pool_create failure, code:%d %s.\n", s, apr_strerror(s, buf, sizeof(buf)));
return AOSE_INTERNAL_ERROR;
}
if ((s = apr_thread_mutex_create(&requestStackMutexG, APR_THREAD_MUTEX_DEFAULT, aos_global_pool)) != APR_SUCCESS) {
aos_error_log("apr_thread_mutex_create failure, code:%d %s.\n", s, apr_strerror(s, buf, sizeof(buf)));
return AOSE_INTERNAL_ERROR;
}
requestStackCountG = 0;
apr_snprintf(aos_user_agent, sizeof(aos_user_agent)-1, "%s(Compatible %s)",
AOS_VER, user_agent_info);
req_options = aos_http_request_options_create(aos_global_pool);
trans_options = aos_http_transport_options_create(aos_global_pool);
trans_options->user_agent = aos_user_agent;
aos_set_default_request_options(req_options);
aos_set_default_transport_options(trans_options);
return AOSE_OK;
}
void aos_http_io_deinitialize()
{
apr_thread_mutex_destroy(requestStackMutexG);
while (requestStackCountG--) {
curl_easy_cleanup(requestStackG[requestStackCountG]);
}
if (aos_stderr_file != NULL) {
apr_file_close(aos_stderr_file);
aos_stderr_file = NULL;
}
if (aos_global_pool != NULL) {
aos_pool_destroy(aos_global_pool);
aos_global_pool = NULL;
}
apr_terminate();
}
int aos_http_send_request(aos_http_controller_t *ctl, aos_http_request_t *req, aos_http_response_t *resp)
{
aos_http_transport_t *t;
t = aos_http_transport_create(ctl->pool);
t->req = req;
t->resp = resp;
t->controller = (aos_http_controller_ex_t *)ctl;
return aos_http_transport_perform(t);
}
================================================
FILE: oss_c_sdk/aos_http_io.h
================================================
#ifndef LIBAOS_HTTP_IO_H
#define LIBAOS_HTTP_IO_H
#include "aos_transport.h"
#include "oss_define.h"
AOS_CPP_START
aos_http_controller_t *aos_http_controller_create(aos_pool_t *p, int owner);
/* http io error message*/
static APR_INLINE const char *aos_http_controller_get_reason(aos_http_controller_t *ctl)
{
aos_http_controller_ex_t *ctle = (aos_http_controller_ex_t *)ctl;
return ctle->reason;
}
CURL *aos_request_get();
void request_release(CURL *request);
void request_release2(aos_curl_http_transport_t* t);
int aos_http_io_initialize(const char *user_agent_info, int flag);
void aos_http_io_deinitialize();
int aos_http_send_request(aos_http_controller_t *ctl, aos_http_request_t *req, aos_http_response_t *resp);
void aos_set_default_request_options(aos_http_request_options_t *op);
void aos_set_default_transport_options(aos_http_transport_options_t *op);
aos_http_request_options_t *aos_http_request_options_create(aos_pool_t *p);
aos_http_request_t *aos_http_request_create(aos_pool_t *p);
aos_http_response_t *aos_http_response_create(aos_pool_t *p);
int aos_read_http_body_memory(aos_http_request_t *req, char *buffer, int len);
int aos_write_http_body_memory(aos_http_response_t *resp, const char *buffer, int len);
int aos_read_http_body_file(aos_http_request_t *req, char *buffer, int len);
int aos_write_http_body_file(aos_http_response_t *resp, const char *buffer, int len);
typedef aos_http_transport_t *(*aos_http_transport_create_pt)(aos_pool_t *p);
typedef int (*aos_http_transport_perform_pt)(aos_http_transport_t *t);
extern aos_pool_t *aos_global_pool;
extern apr_file_t *aos_stderr_file;
extern aos_http_request_options_t *aos_default_http_request_options;
extern aos_http_transport_options_t *aos_default_http_transport_options;
extern aos_http_transport_create_pt aos_http_transport_create;
extern aos_http_transport_perform_pt aos_http_transport_perform;
AOS_CPP_END
#endif
================================================
FILE: oss_c_sdk/aos_list.h
================================================
#ifndef LIBAOS_LIST_H
#define LIBAOS_LIST_H
#include <apr_general.h>
// from kernel list
typedef struct aos_list_s aos_list_t;
struct aos_list_s {
aos_list_t *next, *prev;
};
#define aos_list_head_init(name) {&(name), &(name)}
#define aos_list_init(ptr) do { \
(ptr)->next = (ptr); \
(ptr)->prev = (ptr); \
} while (0)
static APR_INLINE void __aos_list_add(aos_list_t *list, aos_list_t *prev, aos_list_t *next)
{
next->prev = list;
list->next = next;
list->prev = prev;
prev->next = list;
}
// list head to add it before
static APR_INLINE void aos_list_add_tail(aos_list_t *list, aos_list_t *head)
{
__aos_list_add(list, head->prev, head);
}
static APR_INLINE void __aos_list_del(aos_list_t *prev, aos_list_t *next)
{
next->prev = prev;
prev->next = next;
}
// deletes entry from list
static APR_INLINE void aos_list_del(aos_list_t *entry)
{
__aos_list_del(entry->prev, entry->next);
aos_list_init(entry);
}
// tests whether a list is empty
static APR_INLINE int aos_list_empty(const aos_list_t *head)
{
return (head->next == head);
}
// move list to new_list
static APR_INLINE void aos_list_movelist(aos_list_t *list, aos_list_t *new_list)
{
if (!aos_list_empty(list)) {
new_list->prev = list->prev;
new_list->next = list->next;
new_list->prev->next = new_list;
new_list->next->prev = new_list;
aos_list_init(list);
} else {
aos_list_init(new_list);
}
}
// get last
#define aos_list_get_last(list, type, member) \
aos_list_empty(list) ? NULL : aos_list_entry((list)->prev, type, member)
// get first
#define aos_list_get_first(list, type, member) \
aos_list_empty(list) ? NULL : aos_list_entry((list)->next, type, member)
#define aos_list_entry(ptr, type, member) \
(type *)( (char *)ptr - APR_OFFSETOF(type, member) )
// traversing
#define aos_list_for_each_entry(postp, pos, head, member) \
for (pos = aos_list_entry((head)->next, postp, member); \
&pos->member != (head); \
pos = aos_list_entry(pos->member.next, postp, member))
#define aos_list_for_each_entry_reverse(postp, pos, head, member) \
for (pos = aos_list_entry((head)->prev, postp, member); \
&pos->member != (head); \
pos = aos_list_entry(pos->member.prev, postp, member))
#define aos_list_for_each_entry_safe(postp, pos, n, head, member) \
for (pos = aos_list_entry((head)->next, postp, member), \
n = aos_list_entry(pos->member.next, postp, member); \
&pos->member != (head); \
pos = n, n = aos_list_entry(n->member.next, postp, member))
#define aos_list_for_each_entry_safe_reverse(postp, pos, n, head, member) \
for (pos = aos_list_entry((head)->prev, postp, member), \
n = aos_list_entry(pos->member.prev, postp, member); \
&pos->member != (head); \
pos = n, n = aos_list_entry(n->member.prev, postp, member))
#endif
================================================
FILE: oss_c_sdk/aos_log.c
================================================
#include "aos_log.h"
#include "apr_portable.h"
aos_log_print_pt aos_log_print = aos_log_print_default;
aos_log_format_pt aos_log_format = aos_log_format_default;
aos_log_level_e aos_log_level = AOS_LOG_WARN;
extern apr_file_t *aos_stderr_file;
void aos_log_set_print(aos_log_print_pt p)
{
aos_log_print = p;
}
void aos_log_set_format(aos_log_format_pt p)
{
aos_log_format = p;
}
void aos_log_set_level(aos_log_level_e level)
{
aos_log_level = level;
}
void aos_log_set_output(apr_file_t *output)
{
aos_stderr_file = output;
}
void aos_log_print_default(const char *message, int len)
{
if (aos_stderr_file == NULL) {
fprintf(stderr, "%s", message);
} else {
apr_size_t bnytes = len;
apr_file_write(aos_stderr_file, message, &bnytes);
}
}
void aos_log_format_default(int level,
const char *file,
int line,
const char *function,
const char *fmt, ...)
{
int len;
apr_time_t t;
int s;
apr_time_exp_t tm;
va_list args;
char buffer[4096];
t = apr_time_now();
if ((s = apr_time_exp_lt(&tm, t)) != APR_SUCCESS) {
return;
}
len = apr_snprintf(buffer, 4090, "[%04d-%02d-%02d %02d:%02d:%02d.%03d] %" APR_INT64_T_FMT " %s:%d ",
tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_usec/1000,
(int64_t)apr_os_thread_current(), file, line);
va_start(args, fmt);
len += vsnprintf(buffer + len, 4090 - len, fmt, args);
va_end(args);
while (buffer[len -1] == '\n') len--;
buffer[len++] = '\n';
buffer[len] = '\0';
aos_log_print(buffer, len);
}
================================================
FILE: oss_c_sdk/aos_log.h
================================================
#ifndef LIBAOS_LOG_H
#define LIBAOS_LOG_H
#include "aos_define.h"
AOS_CPP_START
typedef void (*aos_log_print_pt)(const char *message, int len);
typedef void (*aos_log_format_pt)(int level,
const char *file,
int line,
const char *function,
const char *fmt, ...)
__attribute__ ((__format__ (__printf__, 5, 6)));
void aos_log_set_print(aos_log_print_pt p);
void aos_log_set_format(aos_log_format_pt p);
typedef enum {
AOS_LOG_OFF = 1,
AOS_LOG_FATAL,
AOS_LOG_ERROR,
AOS_LOG_WARN,
AOS_LOG_INFO,
AOS_LOG_DEBUG,
AOS_LOG_TRACE,
AOS_LOG_ALL
} aos_log_level_e;
#ifdef WIN32
#define aos_fatal_log(format, ...) if(aos_log_level>=AOS_LOG_FATAL) \
aos_log_format(AOS_LOG_FATAL, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)
#define aos_error_log(format, ...) if(aos_log_level>=AOS_LOG_ERROR) \
aos_log_format(AOS_LOG_ERROR, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)
#define aos_warn_log(format, ...) if(aos_log_level>=AOS_LOG_WARN) \
aos_log_format(AOS_LOG_WARN, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)
#define aos_info_log(format, ...) if(aos_log_level>=AOS_LOG_INFO) \
aos_log_format(AOS_LOG_INFO, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)
#define aos_debug_log(format, ...) if(aos_log_level>=AOS_LOG_DEBUG) \
aos_log_format(AOS_LOG_DEBUG, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)
#define aos_trace_log(format, ...) if(aos_log_level>=AOS_LOG_TRACE) \
aos_log_format(AOS_LOG_TRACE, __FILE__, __LINE__, __FUNCTION__, format, ##__VA_ARGS__)
#else
#define aos_fatal_log(format, args...) if(aos_log_level>=AOS_LOG_FATAL) \
aos_log_format(AOS_LOG_FATAL, __FILE__, __LINE__, __FUNCTION__, format, ## args)
#define aos_error_log(format, args...) if(aos_log_level>=AOS_LOG_ERROR) \
aos_log_format(AOS_LOG_ERROR, __FILE__, __LINE__, __FUNCTION__, format, ## args)
#define aos_warn_log(format, args...) if(aos_log_level>=AOS_LOG_WARN) \
aos_log_format(AOS_LOG_WARN, __FILE__, __LINE__, __FUNCTION__, format, ## args)
#define aos_info_log(format, args...) if(aos_log_level>=AOS_LOG_INFO) \
aos_log_format(AOS_LOG_INFO, __FILE__, __LINE__, __FUNCTION__, format, ## args)
#define aos_debug_log(format, args...) if(aos_log_level>=AOS_LOG_DEBUG) \
aos_log_format(AOS_LOG_DEBUG, __FILE__, __LINE__, __FUNCTION__, format, ## args)
#define aos_trace_log(format, args...) if(aos_log_level>=AOS_LOG_TRACE) \
aos_log_format(AOS_LOG_TRACE, __FILE__, __LINE__, __FUNCTION__, format, ## args)
#endif
void aos_log_set_level(aos_log_level_e level);
void aos_log_set_output(apr_file_t *output);
void aos_log_print_default(const char *message, int len);
void aos_log_format_default(int level,
const char *file,
int line,
const char *function,
const char *fmt, ...)
__attribute__ ((__format__ (__printf__, 5, 6)));
extern aos_log_level_e aos_log_level;
extern aos_log_format_pt aos_log_format;
extern aos_log_format_pt aos_log_format;
AOS_CPP_END
#endif
================================================
FILE: oss_c_sdk/aos_status.c
================================================
#include "aos_log.h"
#include "aos_util.h"
#include "aos_status.h"
const char AOS_XML_PARSE_ERROR_CODE[] = "ParseXmlError";
const char AOS_OPEN_FILE_ERROR_CODE[] = "OpenFileFail";
const char AOS_WRITE_FILE_ERROR_CODE[] = "WriteFileFail";
const char AOS_RENAME_FILE_ERROR_CODE[] = "RenameFileFail";
const char AOS_HTTP_IO_ERROR_CODE[] = "HttpIoError";
const char AOS_UNKNOWN_ERROR_CODE[] = "UnknownError";
const char AOS_CLIENT_ERROR_CODE[] = "ClientError";
const char AOS_SERVER_ERROR_CODE[] = "ServerError";
const char AOS_UTF8_ENCODE_ERROR_CODE[] = "Utf8EncodeFail";
const char AOS_URL_ENCODE_ERROR_CODE[] = "UrlEncodeFail";
const char AOS_INCONSISTENT_ERROR_CODE[] = "InconsistentError";
const char AOS_CREATE_QUEUE_ERROR_CODE[] = "CreateQueueFail";
const char AOS_CREATE_THREAD_POOL_ERROR_CODE[] = "CreateThreadPoolFail";
const char AOS_EMPTY_STRING_ERROR[] = "EmptyStringError";
const char AOS_SELECT_OBJECT_ERROR[] = "SelectObjectError";
const char AOS_SELECT_OBJECT_CRC_ERROR[] = "SelectObjectCRCError";
const char AOS_CREATE_SELECT_OBJECT_META_ERROR[] = "CreateSelectObjectMetaError";
const char AOS_BUCKET_NAME_INVALID_ERROR[] = "BucketNameInvalidError";
const char AOS_OBJECT_NAME_INVALID_ERROR[] = "ObjectNameInvalidError";
aos_status_t *aos_status_create(aos_pool_t *p)
{
return (aos_status_t *)aos_pcalloc(p, sizeof(aos_status_t));
}
aos_status_t *aos_status_dup(aos_pool_t *p, aos_status_t *src)
{
aos_status_t *dst = aos_status_create(p);
dst->code = src->code;
dst->error_code = apr_pstrdup(p, src->error_code);
dst->error_msg = apr_pstrdup(p, src->error_msg);
return dst;
}
int aos_should_retry(aos_status_t *s)
{
// HTTP Error
if (s == NULL || s->code / 100 == 2) {
return AOS_FALSE;
}
// OSS Error
if (s->code / 100 == 5) {
return AOS_TRUE;
}
// Curl Error
if (s->code != AOSE_OK) {
if (s->code == AOSE_CONNECTION_FAILED || s->code == AOSE_REQUEST_TIMEOUT ||
s->code == AOSE_FAILED_CONNECT || s->code == AOSE_SERVICE_ERROR) {
return AOS_TRUE;
}
}
return AOS_FALSE;
}
aos_status_t *aos_status_parse_from_body(aos_pool_t *p, aos_list_t *bc, int code, aos_status_t *s)
{
int res;
mxml_node_t *root, *node;
mxml_node_t *code_node, *message_node;
const char *node_content;
if (s == NULL) {
s = aos_status_create(p);
}
s->code = code;
if (aos_http_is_ok(code)) {
return s;
}
if (aos_list_empty(bc)) {
s->error_code = (char *)AOS_UNKNOWN_ERROR_CODE;
return s;
}
if ((res = aos_parse_xml_body(bc, &root)) != AOSE_OK) {
s->error_code = (char *)AOS_UNKNOWN_ERROR_CODE;
return s;
}
node = mxmlFindElement(root, root, "Error",NULL, NULL,MXML_DESCEND);
if (NULL == node) {
char *xml_content = aos_buf_list_content(p, bc);
aos_error_log("Xml format invalid, root node name is not Error.\n");
aos_error_log("Xml Content:%s\n", xml_content);
s->error_code = (char *)AOS_UNKNOWN_ERROR_CODE;
mxmlDelete(root);
return s;
}
code_node = mxmlFindElement(node, root, "Code",NULL, NULL,MXML_DESCEND);
if (NULL != code_node) {
node_content = mxmlGetOpaque(code_node);
if (node_content != NULL) {
s->error_code = apr_pstrdup(p, (char *)node_content);
}
}
message_node = mxmlFindElement(node, root, "Message",NULL, NULL,MXML_DESCEND);
if (NULL != message_node) {
node_content = mxmlGetOpaque(message_node);
if (node_content != NULL) {
s->error_msg = apr_pstrdup(p, node_content);
}
}
mxmlDelete(root);
return s;
}
================================================
FILE: oss_c_sdk/aos_status.h
================================================
#ifndef LIBAOS_STATUS_H
#define LIBAOS_STATUS_H
#include "aos_define.h"
#include "aos_list.h"
AOS_CPP_START
typedef struct aos_status_s aos_status_t;
struct aos_status_s {
int code; // > 0 http code
char *error_code; // can't modify
char *error_msg; // can't modify
char *req_id; // can't modify
};
static APR_INLINE int aos_status_is_ok(aos_status_t *s)
{
return s->code > 0 && s->code / 100 == 2;
}
static APR_INLINE int aos_http_is_ok(int st)
{
return st / 100 == 2;
}
#define aos_status_set(s, c, ec, es) \
(s)->code = c; (s)->error_code = (char *)ec; (s)->error_msg = (char *)es
/**
* @brief determine whether the request should be retried
* @param[in] s the return status of api, such as oss_put_object_from_buffer
* @return int AOS_FALSE indicates no retries, AOS_TRUE retry
*/
int aos_should_retry(aos_status_t *s);
aos_status_t *aos_status_create(aos_pool_t *p);
aos_status_t *aos_status_dup(aos_pool_t *p, aos_status_t *src);
aos_status_t *aos_status_parse_from_body(aos_pool_t *p, aos_list_t *bc, int code, aos_status_t *s);
extern const char AOS_XML_PARSE_ERROR_CODE[];
extern const char AOS_OPEN_FILE_ERROR_CODE[];
extern const char AOS_WRITE_FILE_ERROR_CODE[];
extern const char AOS_RENAME_FILE_ERROR_CODE[];
extern const char AOS_HTTP_IO_ERROR_CODE[];
extern const char AOS_UNKNOWN_ERROR_CODE[];
extern const char AOS_CLIENT_ERROR_CODE[];
extern const char AOS_SERVER_ERROR_CODE[];
extern const char AOS_UTF8_ENCODE_ERROR_CODE[];
extern const char AOS_URL_ENCODE_ERROR_CODE[];
extern const char AOS_INCONSISTENT_ERROR_CODE[];
extern const char AOS_CREATE_QUEUE_ERROR_CODE[];
extern const char AOS_CREATE_THREAD_POOL_ERROR_CODE[];
extern const char AOS_EMPTY_STRING_ERROR[];
extern const char AOS_SELECT_OBJECT_ERROR[];
extern const char AOS_SELECT_OBJECT_CRC_ERROR[];
extern const char AOS_CREATE_SELECT_OBJECT_META_ERROR[];
extern const char AOS_BUCKET_NAME_INVALID_ERROR[];
extern const char AOS_OBJECT_NAME_INVALID_ERROR[];
AOS_CPP_END
#endif
================================================
FILE: oss_c_sdk/aos_string.c
================================================
#include "aos_string.h"
typedef int (*aos_is_char_pt)(char c);
static void aos_strip_str_func(aos_string_t *str, aos_is_char_pt func);
char *aos_pstrdup(aos_pool_t *p, const aos_string_t *s)
{
return apr_pstrndup(p, s->data, s->len);
}
static void aos_strip_str_func(aos_string_t *str, aos_is_char_pt func)
{
char *data = str->data;
int len = str->len;
int offset = 0;
if (len == 0) return;
while (len > 0 && func(data[len - 1])) {
--len;
}
for (; offset < len && func(data[offset]); ++offset) {
// empty;
}
str->data = data + offset;
str->len = len - offset;
}
void aos_unquote_str(aos_string_t *str)
{
aos_strip_str_func(str, aos_is_quote);
}
void aos_strip_space(aos_string_t *str)
{
aos_strip_str_func(str, aos_is_space);
}
void aos_trip_space_and_cntrl(aos_string_t *str)
{
aos_strip_str_func(str, aos_is_space_or_cntrl);
}
int aos_ends_with(const aos_string_t *str, const aos_string_t *suffix)
{
if (!str || !suffix) {
return 0;
}
return (str->len >= suffix->len) && strncmp(str->data + str->len - suffix->len, suffix->data, suffix->len) == 0;
}
================================================
FILE: oss_c_sdk/aos_string.h
================================================
#ifndef LIBAOS_STRING_H
#define LIBAOS_STRING_H
#include "aos_define.h"
AOS_CPP_START
typedef struct {
int len;
char *data;
} aos_string_t;
#define aos_string(str) { sizeof(str) - 1, (char *) str }
#define aos_null_string { 0, NULL }
#define aos_str_set(str, text) \
(str)->len = strlen(text); (str)->data = (char *) text
#define aos_str_null(str) (str)->len = 0; (str)->data = NULL
#define aos_tolower(c) (char) ((c >= 'A' && c <= 'Z') ? (c | 0x20) : c)
#define aos_toupper(c) (char) ((c >= 'a' && c <= 'z') ? (c & ~0x20) : c)
static APR_INLINE int aos_string_is_empty(const aos_string_t *str)
{
if (NULL == str || str->len == 0 || NULL == str->data || 0 == strcmp(str->data, "")) {
return AOS_TRUE;
} else {
return AOS_FALSE;
}
}
static APR_INLINE void aos_string_tolower(aos_string_t *str)
{
int i = 0;
while (i < str->len) {
str->data[i] = aos_tolower(str->data[i]);
++i;
}
}
static APR_INLINE char *aos_strlchr(char *p, char *last, char c)
{
while (p < last) {
if (*p == c) {
return p;
}
p++;
}
return NULL;
}
static APR_INLINE int aos_is_quote(char c)
{
return c == '\"';
}
static APR_INLINE int aos_is_space(char c)
{
return ((c == ' ') || (c == '\t'));
}
static APR_INLINE int aos_is_space_or_cntrl(char c)
{
return c <= ' ';
}
static APR_INLINE int aos_is_null_string(aos_string_t *str)
{
if (str == NULL || str->data == NULL || str->len == 0) {
return AOS_TRUE;
}
return AOS_FALSE;
}
void aos_strip_space(aos_string_t *str);
void aos_trip_space_and_cntrl(aos_string_t *str);
void aos_unquote_str(aos_string_t *str);
char *aos_pstrdup(aos_pool_t *p, const aos_string_t *s);
int aos_ends_with(const aos_string_t *str, const aos_string_t *suffix);
AOS_CPP_END
#endif
================================================
FILE: oss_c_sdk/aos_transport.c
================================================
#include "aos_log.h"
#include "aos_util.h"
#include "aos_string.h"
#include "aos_http_io.h"
#include "aos_transport.h"
#include "aos_crc64.h"
#include "aos_status.h"
static int aos_curl_code_to_status(CURLcode code);
static void aos_init_curl_headers(aos_curl_http_transport_t *t);
static void aos_transport_cleanup(aos_http_transport_t *t);
static int aos_init_curl_url(aos_curl_http_transport_t *t);
static void aos_curl_transport_headers_done(aos_curl_http_transport_t *t);
static int aos_curl_transport_setup(aos_curl_http_transport_t *t);
static void aos_curl_transport_finish(aos_curl_http_transport_t *t);
static void aos_move_transport_state(aos_curl_http_transport_t *t, aos_transport_state_e s);
static size_t aos_curl_default_header_callback(char *buffer, size_t size, size_t nitems, void *userdata);
static size_t aos_curl_default_write_callback(char *ptr, size_t size, size_t nmemb, void *userdata);
static size_t aos_curl_default_read_callback(char *buffer, size_t size, size_t nitems, void *instream);
static int aos_curl_debug_callback(void *handle, curl_infotype type, char *data, size_t size, void *userp)
{
switch (type) {
default:
break;
case CURLINFO_TEXT:
aos_debug_log("curl:%pp=> Info: %.*s", handle, (int)size, data);
break;
case CURLINFO_HEADER_OUT:
aos_debug_log("curl:%pp=> Send header: %.*s", handle, (int)size, data);
break;
case CURLINFO_HEADER_IN:
aos_debug_log("curl:%pp=> Recv header: %.*s", handle, (int)size, data);
break;
}
return 0;
}
static void aos_init_curl_headers(aos_curl_http_transport_t *t)
{
int pos;
char *header;
const aos_array_header_t *tarr;
const aos_table_entry_t *telts;
union aos_func_u func;
if (t->req->method == HTTP_PUT || t->req->method == HTTP_POST) {
header = apr_psprintf(t->pool, "Content-Length: %" APR_INT64_T_FMT, t->req->body_len);
t->headers = curl_slist_append(t->headers, header);
}
tarr = aos_table_elts(t->req->headers);
telts = (aos_table_entry_t*)tarr->elts;
for (pos = 0; pos < tarr->nelts; ++pos) {
header = apr_psprintf(t->pool, "%s: %s", telts[pos].key, telts[pos].val);
t->headers = curl_slist_append(t->headers, header);
}
func.func1 = (aos_func1_pt)curl_slist_free_all;
aos_fstack_push(t->cleanup, t->headers, func, 1);
}
static int aos_init_curl_url(aos_curl_http_transport_t *t)
{
int rs;
const char *proto;
aos_string_t querystr;
char uristr[3*AOS_MAX_URI_LEN+1];
uristr[0] = '\0';
aos_str_null(&querystr);
if ((rs = aos_url_encode(uristr, t->req->uri, AOS_MAX_URI_LEN)) != AOSE_OK) {
t->controller->error_code = rs;
t->controller->reason = "uri invalid argument.";
return rs;
}
if ((rs = aos_query_params_to_string(t->pool, t->req->query_params, &querystr)) != AOSE_OK) {
t->controller->error_code = rs;
t->controller->reason = "query params invalid argument.";
return rs;
}
proto = strlen(t->req->proto) != 0 ? t->req->proto : AOS_HTTP_PREFIX;
if (querystr.len == 0) {
t->url = apr_psprintf(t->pool, "%s%s/%s",
proto,
t->req->host,
uristr);
} else {
t->url = apr_psprintf(t->pool, "%s%s/%s%.*s",
proto,
t->req->host,
uristr,
querystr.len,
querystr.data);
}
aos_debug_log("url:%s.", t->url);
return AOSE_OK;
}
static void aos_transport_cleanup(aos_http_transport_t *t)
{
int s;
char buf[256];
if (t->req->file_buf != NULL && t->req->file_buf->owner) {
aos_trace_log("close request body file.");
if ((s = apr_file_close(t->req->file_buf->file)) != APR_SUCCESS) {
aos_warn_log("apr_file_close failure, %s.", apr_strerror(s, buf, sizeof(buf)));
}
t->req->file_buf = NULL;
}
if (t->resp->file_buf != NULL && t->resp->file_buf->owner) {
aos_trace_log("close response body file.");
if ((s = apr_file_close(t->resp->file_buf->file)) != APR_SUCCESS) {
aos_warn_log("apr_file_close failure, %s.", apr_strerror(s, buf, sizeof(buf)));
}
t->resp->file_buf = NULL;
}
}
aos_http_transport_t *aos_curl_http_transport_create(aos_pool_t *p)
{
aos_func_u func;
aos_curl_http_transport_t *t;
t = (aos_curl_http_transport_t *)aos_pcalloc(p, sizeof(aos_curl_http_transport_t));
t->pool = p;
t->options = aos_default_http_transport_options;
t->cleanup = aos_fstack_create(p, 5);
func.func1 = (aos_func1_pt)aos_transport_cleanup;
aos_fstack_push(t->cleanup, t, func, 1);
t->curl = aos_request_get();
func.func1 = (aos_func1_pt)request_release2;
aos_fstack_push(t->cleanup, t, func, 1);
t->header_callback = aos_curl_default_header_callback;
t->read_callback = aos_curl_default_read_callback;
t->write_callback = aos_curl_default_write_callback;
return (aos_http_transport_t *)t;
}
static void aos_move_transport_state(aos_curl_http_transport_t *t, aos_transport_state_e s)
{
if (t->state < s) {
t->state = s;
}
}
void aos_curl_response_headers_parse(aos_pool_t *p, aos_table_t *headers, char *buffer, int len)
{
char *pos;
aos_string_t str;
aos_string_t key;
aos_string_t value;
str.data = buffer;
str.len = len;
aos_trip_space_and_cntrl(&str);
pos = aos_strlchr(str.data, str.data + str.len, ':');
if (pos == NULL) {
return;
}
key.data = str.data;
key.len = pos - str.data;
pos += 1;
value.len = str.data + str.len - pos;
value.data = pos;
aos_strip_space(&value);
apr_table_addn(headers, aos_pstrdup(p, &key), aos_pstrdup(p, &value));
}
size_t aos_curl_default_header_callback(char *buffer, size_t size, size_t nitems, void *userdata)
{
int len;
aos_curl_http_transport_t *t;
t = (aos_curl_http_transport_t *)(userdata);
len = size * nitems;
if (t->controller->first_byte_time == 0) {
t->controller->first_byte_time = apr_time_now();
}
aos_curl_response_headers_parse(t->pool, t->resp->headers, buffer, len);
aos_move_transport_state(t, TRANS_STATE_HEADER);
return len;
}
static void aos_curl_transport_headers_done(aos_curl_http_transport_t *t)
{
long http_code;
CURLcode code;
const char *value;
if (t->controller->error_code != AOSE_OK) {
aos_debug_log("has error %d.", t->controller->error_code);
return;
}
if (t->resp->status > 0) {
aos_trace_log("http response status %d.", t->resp->status);
return;
}
t->resp->status = 0;
if ((code = curl_easy_getinfo(t->curl, CURLINFO_RESPONSE_CODE, &http_code)) != CURLE_OK) {
t->controller->reason = apr_pstrdup(t->pool, curl_easy_strerror(code));
t->controller->error_code = AOSE_INTERNAL_ERROR;
aos_error_log("get response status fail, curl code:%d, reason:%s", code, t->controller->reason);
return;
} else {
t->resp->status = http_code;
}
value = apr_table_get(t->resp->headers, "Content-Length");
if (value != NULL) {
t->resp->content_length = aos_atoi64(value);
}
}
size_t aos_curl_default_write_callback(char *ptr, size_t size, size_t nmemb, void *userdata)
{
int len;
int bytes;
aos_curl_http_transport_t *t;
t = (aos_curl_http_transport_t *)(userdata);
len = size * nmemb;
if (t->controller->first_byte_time == 0) {
t->controller->first_byte_time = apr_time_now();
}
aos_curl_transport_headers_done(t);
if (t->controller->error_code != AOSE_OK) {
aos_debug_log("write callback abort");
return 0;
}
// On HTTP error, we expect to parse an HTTP error response
if (t->resp->status < 200 || t->resp->status > 299) {
bytes = aos_write_http_body_memory(t->resp, ptr, len);
assert(bytes == len);
aos_move_transport_state(t, TRANS_STATE_BODY_IN);
return bytes;
}
if (t->resp->type == BODY_IN_MEMORY && t->resp->body_len >= (int64_t)t->controller->options->max_memory_size) {
t->controller->reason = apr_psprintf(t->pool,
"receive body too big, current body size: %" APR_INT64_T_FMT ", max memory size: %" APR_INT64_T_FMT,
t->resp->body_len, t->controller->options->max_memory_size);
t->controller->error_code = AOSE_OVER_MEMORY;
aos_error_log("error reason:%s, ", t->controller->reason);
return 0;
}
if ((bytes = t->resp->write_body(t->resp, ptr, len)) < 0) {
aos_debug_log("write body failure, %d.", bytes);
if (bytes == AOSE_SELECT_OBJECT_CRC_ERROR) {
t->controller->error_code = AOSE_SELECT_OBJECT_CRC_ERROR;
t->controller->reason = (char *)AOS_SELECT_OBJECT_CRC_ERROR;
} else {
t->controller->error_code = AOSE_WRITE_BODY_ERROR;
t->controller->reason = "write body failure.";
}
return 0;
}
if (bytes >= 0) {
// progress callback
if (NULL != t->resp->progress_callback) {
t->resp->progress_callback(t->resp->body_len, t->resp->content_length);
}
// crc
if (t->controller->options->enable_crc) {
t->resp->crc64 = aos_crc64(t->resp->crc64, ptr, bytes);
}
}
aos_move_transport_state(t, TRANS_STATE_BODY_IN);
return bytes;
}
size_t aos_curl_default_read_callback(char *buffer, size_t size, size_t nitems, void *instream)
{
int len;
int bytes;
aos_curl_http_transport_t *t;
t = (aos_curl_http_transport_t *)(instream);
len = size * nitems;
if (t->controller->error_code != AOSE_OK) {
aos_debug_log("abort read callback.");
return CURL_READFUNC_ABORT;
}
if ((bytes = t->req->read_body(t->req, buffer, len)) < 0) {
aos_debug_log("read body failure, %d.", bytes);
t->controller->error_code = AOSE_READ_BODY_ERROR;
t->controller->reason = "read body failure.";
return CURL_READFUNC_ABORT;
}
if (bytes >= 0) {
// progress callback
t->req->consumed_bytes += bytes;
if (NULL != t->req->progress_callback) {
t->req->progress_callback(t->req->consumed_bytes, t->req->body_len);
}
// crc
if (t->controller->options->enable_crc) {
t->req->crc64 = aos_crc64(t->req->crc64, buffer, bytes);
}
}
aos_move_transport_state(t, TRANS_STATE_BODY_OUT);
return bytes;
}
static int aos_curl_code_to_status(CURLcode code)
{
switch (code) {
case CURLE_OUT_OF_MEMORY:
return AOSE_OUT_MEMORY;
case CURLE_COULDNT_RESOLVE_PROXY:
case CURLE_COULDNT_RESOLVE_HOST:
return AOSE_NAME_LOOKUP_ERROR;
case CURLE_COULDNT_CONNECT:
return AOSE_FAILED_CONNECT;
case CURLE_WRITE_ERROR:
case CURLE_OPERATION_TIMEDOUT:
return AOSE_CONNECTION_FAILED;
case CURLE_PARTIAL_FILE:
return AOSE_OK;
case CURLE_SSL_CACERT:
return AOSE_FAILED_VERIFICATION;
default:
return AOSE_INTERNAL_ERROR;
}
}
static void aos_curl_transport_finish(aos_curl_http_transport_t *t)
{
aos_curl_transport_headers_done(t);
if (t->cleanup != NULL) {
aos_fstack_destory(t->cleanup);
t->cleanup = NULL;
}
}
int aos_curl_transport_setup(aos_curl_http_transport_t *t)
{
#define curl_easy_setopt_safe(opt, val) curl_easy_setopt(t->curl, opt, val)
curl_easy_setopt_safe(CURLOPT_PRIVATE, t);
curl_easy_setopt_safe(CURLOPT_HEADERDATA, t);
curl_easy_setopt_safe(CURLOPT_HEADERFUNCTION, t->header_callback);
curl_easy_setopt_safe(CURLOPT_READDATA, t);
curl_easy_setopt_safe(CURLOPT_READFUNCTION, t->read_callback);
curl_easy_setopt_safe(CURLOPT_WRITEDATA, t);
curl_easy_setopt_safe(CURLOPT_WRITEFUNCTION, t->write_callback);
curl_easy_setopt_safe(CURLOPT_FILETIME, 1);
curl_easy_setopt_safe(CURLOPT_NOSIGNAL, 1);
curl_easy_setopt_safe(CURLOPT_NOPROGRESS, 1);
curl_easy_setopt_safe(CURLOPT_TCP_NODELAY, 1);
curl_easy_setopt_safe(CURLOPT_NETRC, CURL_NETRC_IGNORED);
// transport options
curl_easy_setopt_safe(CURLOPT_USERAGENT, t->options->user_agent);
// ssl
if (t->controller->options->verify_ssl) {
curl_easy_setopt_safe(CURLOPT_SSL_VERIFYPEER, 1);
curl_easy_setopt_safe(CURLOPT_SSL_VERIFYHOST, 2);
}
else {
curl_easy_setopt_safe(CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt_safe(CURLOPT_SSL_VERIFYHOST, 0);
}
if (t->controller->options->ca_path != NULL)
{
curl_easy_setopt_safe(CURLOPT_CAPATH, t->controller->options->ca_path);
}
if (t->controller->options->ca_file != NULL)
{
curl_easy_setopt_safe(CURLOPT_CAINFO, t->controller->options->ca_file);
}
// request options
curl_easy_setopt_safe(CURLOPT_DNS_CACHE_TIMEOUT, t->controller->options->dns_cache_timeout);
curl_easy_setopt_safe(CURLOPT_CONNECTTIMEOUT, t->controller->options->connect_timeout);
curl_easy_setopt_safe(CURLOPT_LOW_SPEED_LIMIT, t->controller->options->speed_limit);
curl_easy_setopt_safe(CURLOPT_LOW_SPEED_TIME, t->controller->options->speed_time);
aos_init_curl_headers(t);
curl_easy_setopt_safe(CURLOPT_HTTPHEADER, t->headers);
if (t->controller->options->proxy_host != NULL) {
// proxy
curl_easy_setopt_safe(CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_easy_setopt_safe(CURLOPT_PROXY, t->controller->options->proxy_host);
// authorize
if (t->controller->options->proxy_auth != NULL) {
curl_easy_setopt_safe(CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
curl_easy_setopt_safe(CURLOPT_PROXYUSERPWD, t->controller->options->proxy_auth);
}
}
if (NULL == t->req->signed_url) {
if (aos_init_curl_url(t) != AOSE_OK) {
return t->controller->error_code;
}
}
else {
t->url = t->req->signed_url;
}
curl_easy_setopt_safe(CURLOPT_URL, t->url);
switch (t->req->method) {
case HTTP_HEAD:
curl_easy_setopt_safe(CURLOPT_NOBODY, 1);
break;
case HTTP_PUT:
curl_easy_setopt_safe(CURLOPT_UPLOAD, 1);
break;
case HTTP_POST:
curl_easy_setopt_safe(CURLOPT_POST, 1);
break;
case HTTP_DELETE:
curl_easy_setopt_safe(CURLOPT_CUSTOMREQUEST, "DELETE");
break;
default: // HTTP_GET
break;
}
if (aos_log_level >= AOS_LOG_DEBUG) {
curl_easy_setopt_safe(CURLOPT_VERBOSE, 1L);
curl_easy_setopt_safe(CURLOPT_DEBUGFUNCTION, aos_curl_debug_callback);
}
#undef curl_easy_setopt_safe
t->state = TRANS_STATE_INIT;
return AOSE_OK;
}
int aos_curl_http_transport_perform(aos_http_transport_t *t_)
{
int ecode;
CURLcode code;
aos_curl_http_transport_t *t = (aos_curl_http_transport_t *)(t_);
ecode = aos_curl_transport_setup(t);
if (ecode != AOSE_OK) {
return ecode;
}
t->controller->start_time = apr_time_now();
code = curl_easy_perform(t->curl);
t->controller->finish_time = apr_time_now();
aos_move_transport_state(t, TRANS_STATE_DONE);
t->curl_code = code;
if ((code != CURLE_OK) && (t->controller->error_code == AOSE_OK)) {
ecode = aos_curl_code_to_status(code);
if (ecode != AOSE_OK) {
t->controller->error_code = ecode;
t->controller->reason = apr_pstrdup(t->pool, curl_easy_strerror(code));
aos_error_log("transport failure curl code:%d error:%s", code, t->controller->reason);
}
}
aos_curl_transport_finish(t);
return t->controller->error_code;
}
================================================
FILE: oss_c_sdk/aos_transport.h
================================================
#ifndef LIBAOS_TRANSPORT_H
#define LIBAOS_TRANSPORT_H
#include "aos_define.h"
#include "aos_buf.h"
AOS_CPP_START
typedef struct aos_http_request_s aos_http_request_t;
typedef struct aos_http_response_s aos_http_response_t;
typedef struct aos_http_transport_s aos_http_transport_t;
typedef struct aos_http_controller_s aos_http_controller_t;
typedef struct aos_http_request_options_s aos_http_request_options_t;
typedef struct aos_http_transport_options_s aos_http_transport_options_t;
typedef struct aos_curl_http_transport_s aos_curl_http_transport_t;
typedef int (*aos_read_http_body_pt)(aos_http_request_t *req, char *buffer, int len);
typedef int (*aos_write_http_body_pt)(aos_http_response_t *resp, const char *buffer, int len);
typedef void (*oss_progress_callback)(int64_t consumed_bytes, int64_t total_bytes);
void aos_curl_response_headers_parse(aos_pool_t *p, aos_table_t *headers, char *buffer, int len);
aos_http_transport_t *aos_curl_http_transport_create(aos_pool_t *p);
int aos_curl_http_transport_perform(aos_http_transport_t *t);
struct aos_http_request_options_s {
int speed_limit;
int speed_time;
int dns_cache_timeout;
int connect_timeout;
int64_t max_memory_size;
int enable_crc;
char *proxy_host;
char *proxy_auth;
int verify_ssl;
char *ca_path;
char *ca_file;
int verify_object_strict;
};
struct aos_http_transport_options_s {
char *user_agent;
char *cacerts_path;
uint32_t ssl_verification_disabled:1;
};
#define AOS_HTTP_BASE_CONTROLLER_DEFINE \
aos_http_request_options_t *options; \
aos_pool_t *pool; \
int64_t start_time; \
int64_t first_byte_time; \
int64_t finish_time; \
uint32_t owner:1; \
void *user_data;
struct aos_http_controller_s {
AOS_HTTP_BASE_CONTROLLER_DEFINE
};
typedef struct aos_http_controller_ex_s {
AOS_HTTP_BASE_CONTROLLER_DEFINE
// private
int error_code;
char *reason; // can't modify
} aos_http_controller_ex_t;
typedef enum {
BODY_IN_MEMORY = 0,
BODY_IN_FILE,
BODY_IN_CALLBACK
} aos_http_body_type_e;
struct aos_http_request_s {
char *host;
char *proto;
char *signed_url;
http_method_e method;
char *uri;
char *resource;
aos_table_t *headers;
aos_table_t *query_params;
aos_list_t body;
int64_t body_len;
char *file_path;
aos_file_buf_t *file_buf;
aos_pool_t *pool;
void *user_data;
aos_read_http_body_pt read_body;
aos_http_body_type_e type;
oss_progress_callback progress_callback;
uint64_t crc64;
int64_t consumed_bytes;
int normalize_url;
};
struct aos_http_response_s {
int status;
aos_table_t *headers;
aos_list_t body;
int64_t body_len;
char *file_path;
aos_file_buf_t* file_buf;
int64_t content_length;
aos_pool_t *pool;
void *user_data;
aos_write_http_body_pt write_body;
aos_http_body_type_e type;
oss_progress_callback progress_callback;
uint64_t crc64;
};
typedef enum {
TRANS_STATE_INIT,
TRANS_STATE_HEADER,
TRANS_STATE_BODY_IN,
TRANS_STATE_BODY_OUT,
TRANS_STATE_ABORT,
TRANS_STATE_DONE
} aos_transport_state_e;
#define AOS_HTTP_BASE_TRANSPORT_DEFINE \
aos_http_request_t *req; \
aos_http_response_t *resp; \
aos_pool_t *pool; \
aos_transport_state_e state; \
aos_array_header_t *cleanup; \
aos_http_transport_options_t *options; \
aos_http_controller_ex_t *controller;
struct aos_http_transport_s {
AOS_HTTP_BASE_TRANSPORT_DEFINE
};
struct aos_curl_http_transport_s {
AOS_HTTP_BASE_TRANSPORT_DEFINE
CURL *curl;
CURLcode curl_code;
char *url;
struct curl_slist *headers;
curl_read_callback header_callback;
curl_read_callback read_callback;
curl_write_callback write_callback;
};
AOS_CPP_END
#endif
================================================
FILE: oss_c_sdk/aos_util.c
================================================
#include "aos_util.h"
#include "aos_log.h"
static const char *g_s_wday[] = {
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
static const char *g_s_mon[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
static const char g_s_gmt_format[] = "%s, %.2d %s %.4d %.2d:%.2d:%.2d GMT";
static const char g_s_ios8601_format[] = "%.4d%.2d%.2dT%.2d%.2d%.2dZ";
int aos_parse_xml_body(aos_list_t *bc, mxml_node_t **root)
{
aos_buf_t *b;
size_t len;
*root = NULL;
len = (size_t)aos_buf_list_len(bc);
{
int nsize = 0;
char *buffer = (char*)malloc(sizeof(char)*(len+1));
memset(buffer, 0, len + 1);
aos_list_for_each_entry(aos_buf_t, b, bc, node) {
memcpy(buffer + nsize, (char *)b->pos, aos_buf_size(b));
nsize += aos_buf_size(b);
}
*root = mxmlLoadString(NULL, buffer, MXML_OPAQUE_CALLBACK);
free(buffer);
if (NULL == *root) {
return AOSE_INTERNAL_ERROR;
}
}
return AOSE_OK;
}
int aos_convert_to_gmt_time(char* date, const char* format, apr_time_exp_t *tm)
{
int size = apr_snprintf(date, AOS_MAX_GMT_TIME_LEN, format,
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);
if (size >= 0 && size < AOS_MAX_GMT_TIME_LEN) {
return AOSE_OK;
} else {
return AOSE_INTERNAL_ERROR;
}
}
int aos_get_gmt_str_time(char datestr[AOS_MAX_GMT_TIME_LEN])
{
int s;
apr_time_t now;
char buf[128];
apr_time_exp_t result;
now = apr_time_now();
if ((s = apr_time_exp_gmt(&result, now)) != APR_SUCCESS) {
aos_error_log("apr_time_exp_gmt fialure, code:%d %s.", s, apr_strerror(s, buf, sizeof(buf)));
return AOSE_INTERNAL_ERROR;
}
if ((s = aos_convert_to_gmt_time(datestr, g_s_gmt_format, &result))
!= AOSE_OK) {
aos_error_log("aos_convert_to_GMT failure, code:%d.", s);
}
return s;
}
int aos_convert_to_iso8601_time(char* date, const char* format, apr_time_exp_t* tm)
{
int size = apr_snprintf(date, AOS_MAX_GMT_TIME_LEN, format,
1900 + tm->tm_year, 1 + tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
if (size >= 0 && size < AOS_MAX_GMT_TIME_LEN) {
return AOSE_OK;
}
else {
return AOSE_INTERNAL_ERROR;
}
}
int aos_get_iso8601_str_time(char datestr[AOS_MAX_GMT_TIME_LEN])
{
int s;
apr_time_t now;
char buf[128];
apr_time_exp_t result;
now = apr_time_now();
if ((s = apr_time_exp_gmt(&result, now)) != APR_SUCCESS) {
aos_error_log("apr_time_exp_gmt fialure, code:%d %s.", s, apr_strerror(s, buf, sizeof(buf)));
return AOSE_INTERNAL_ERROR;
}
if ((s = aos_convert_to_iso8601_time(datestr, g_s_ios8601_format, &result))
!= AOSE_OK) {
aos_error_log("aos_convert_to_iso8601_time failure, code:%d.", s);
}
return s;
}
int aos_get_iso8601_str_time_ex(char datestr[AOS_MAX_GMT_TIME_LEN], apr_time_t now)
{
int s;
char buf[128];
apr_time_exp_t result;
if ((s = apr_time_exp_gmt(&result, now)) != APR_SUCCESS) {
aos_error_log("apr_time_exp_gmt fialure, code:%d %s.", s, apr_strerror(s, buf, sizeof(buf)));
return AOSE_INTERNAL_ERROR;
}
if ((s = aos_convert_to_iso8601_time(datestr, g_s_ios8601_format, &result))
!= AOSE_OK) {
aos_error_log("aos_convert_to_iso8601_time failure, code:%d.", s);
}
return s;
}
int aos_get_gmt_time_date(const char *gmt, char datestr[AOS_MAX_SHORT_TIME_LEN])
{
char week[4];
char month[4];
apr_time_exp_t t;
int i;
if (!gmt) {
return 0;
}
memset(week,0,4);
memset(month,0,4);
sscanf(gmt,"%3s, %2d %3s %4d %2d:%2d:%2d GMT",
week, &t.tm_mday, month, &t.tm_year,
&t.tm_hour, &t.tm_min, &t.tm_sec);
for (i = 0; i < 12; i++) {
if (apr_strnatcmp(g_s_mon[i], (char const *)month) == 0) {
t.tm_mon = i + 1;
break;
}
}
apr_snprintf(datestr, AOS_MAX_SHORT_TIME_LEN, "%.4d%.2d%.2d",
t.tm_year, t.tm_mon, t.tm_mday);
return 0;
}
int aos_url_encode(char *dest, const char *src, int maxSrcSize)
{
static const char *hex = "0123456789ABCDEF";
int len = 0;
unsigned char c;
while (*src) {
if (++len > maxSrcSize) {
*dest = 0;
return AOSE_INVALID_ARGUMENT;
}
c = *src;
if (isalnum(c) || (c == '-') || (c == '_') || (c == '.') || (c == '~')) {
*dest++ = c;
} else if (*src == ' ') {
*dest++ = '%';
*dest++ = '2';
*dest++ = '0';
} else {
*dest++ = '%';
*dest++ = hex[c >> 4];
*dest++ = hex[c & 15];
}
src++;
}
*dest = 0;
return AOSE_OK;
}
int aos_url_encode_ex(char *dest, const char *src, int maxSrcSize, int slash)
{
static const char *hex = "0123456789ABCDEF";
int len = 0;
unsigned char c;
while (*src) {
if (++len > maxSrcSize) {
*dest = 0;
return AOSE_INVALID_ARGUMENT;
}
c = *src;
if (isalnum(c) || (c == '-') || (c == '_') || (c == '.') || (c == '~')) {
*dest++ = c;
}
else if (*src == ' ') {
*dest++ = '%';
*dest++ = '2';
*dest++ = '0';
}
else if (c == '/' && slash) {
*dest++ = c;
}
else {
*dest++ = '%';
*dest++ = hex[c >> 4];
*dest++ = hex[c & 15];
}
src++;
}
*dest = 0;
return AOSE_OK;
}
int aos_encode_hex(char* dest, const void* src, int srclen, int* len)
{
static const char hex_table[] = "0123456789abcdef";
const unsigned char* in = src;
int size;
if (!src) {
return AOSE_INVALID_ARGUMENT;
}
if (dest) {
for (size = 0; size < srclen; size++) {
*dest++ = hex_table[in[size] >> 4];
*dest++ = hex_table[in[size] & 0xf];
}
*dest = '\0';
}
if (len) {
*len = srclen * 2 + 1;
}
return AOSE_OK;
}
int aos_query_params_to_string(aos_pool_t *p, aos_table_t *query_params, aos_string_t *querystr)
{
int rs;
int pos;
int len;
char sep = '?';
char ebuf[AOS_MAX_QUERY_ARG_LEN*3+1];
char abuf[AOS_MAX_QUERY_ARG_LEN*6+128];
int max_len;
const aos_array_header_t *tarr;
const aos_table_entry_t *telts;
aos_buf_t *querybuf;
if (apr_is_empty_table(query_params)) {
return AOSE_OK;
}
max_len = sizeof(abuf)-1;
querybuf = aos_create_buf(p, 256);
aos_str_null(querystr);
tarr = aos_table_elts(query_params);
telts = (aos_table_entry_t*)tarr->elts;
for (pos = 0; pos < tarr->nelts; ++pos) {
if ((rs = aos_url_encode(ebuf, telts[pos].key, AOS_MAX_QUERY_ARG_LEN)) != AOSE_OK) {
aos_error_log("query params args too big, key:%s.", telts[pos].key);
return AOSE_INVALID_ARGUMENT;
}
len = apr_snprintf(abuf, max_len, "%c%s", sep, ebuf);
if (telts[pos].val != NULL && *telts[pos].val != '\0') {
if ((rs = aos_url_encode(ebuf, telts[pos].val, AOS_MAX_QUERY_ARG_LEN)) != AOSE_OK) {
aos_error_log("query params args too big, value:%s.", telts[pos].val);
return AOSE_INVALID_ARGUMENT;
}
len += apr_snprintf(abuf+len, max_len-len, "=%s", ebuf);
if (len >= AOS_MAX_QUERY_ARG_LEN) {
aos_error_log("query params args too big, %s.", abuf);
return AOSE_INVALID_ARGUMENT;
}
}
aos_buf_append_string(p, querybuf, abuf, len);
sep = '&';
}
// result
querystr->data = (char *)querybuf->pos;
querystr->len = aos_buf_size(querybuf);
return AOSE_OK;
}
void aos_gnome_sort(const char **headers, int size)
{
const char *tmp;
int i = 0, last_highest = 0;
while (i < size) {
if ((i == 0) || apr_strnatcasecmp(headers[i-1], headers[i]) < 0) {
i = ++last_highest;
} else {
tmp = headers[i];
headers[i] = headers[i - 1];
headers[--i] = tmp;
}
}
}
const char* aos_http_method_to_string(http_method_e method)
{
switch (method) {
case HTTP_GET:
return "GET";
case HTTP_HEAD:
return "HEAD";
case HTTP_PUT:
return "PUT";
case HTTP_POST:
return "POST";
case HTTP_DELETE:
return "DELETE";
default:
return "UNKNOWN";
}
}
int aos_base64_encode(const unsigned char *in, int inLen, char *out)
{
static const char *ENC =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
char *original_out = out;
while (inLen) {
// first 6 bits of char 1
*out++ = ENC[*in >> 2];
if (!--inLen) {
// last 2 bits of char 1, 4 bits of 0
*out++ = ENC[(*in & 0x3) << 4];
*out++ = '=';
*out++ = '=';
break;
}
// last 2 bits of char 1, first 4 bits of char 2
*out++ = ENC[((*in & 0x3) << 4) | (*(in + 1) >> 4)];
in++;
if (!--inLen) {
// last 4 bits of char 2, 2 bits of 0
*out++ = ENC[(*in & 0xF) << 2];
*out++ = '=';
break;
}
// last 4 bits of char 2, first 2 bits of char 3
*out++ = ENC[((*in & 0xF) << 2) | (*(in + 1) >> 6)];
in++;
// last 6 bits of char 3
*out++ = ENC[*in & 0x3F];
in++, inLen--;
}
return (out - original_out);
}
// HMAC-SHA-1:
//
// K - is key padded with zeros to 512 bits
// m - is message
// OPAD - 0x5c5c5c...
// IPAD - 0x363636...
//
// HMAC(K,m) = SHA1((K ^ OPAD) . SHA1((K ^ IPAD) . m))
void HMAC_SHA1(unsigned char hmac[20], const unsigned char *key, int key_len,
const unsigned char *message, int message_len)
{
unsigned char kopad[64], kipad[64];
int i;
unsigned char digest[APR_SHA1_DIGESTSIZE];
apr_sha1_ctx_t context;
if (key_len > 64) {
key_len = 64;
}
for (i = 0; i < key_len; i++) {
kopad[i] = key[i] ^ 0x5c;
kipad[i] = key[i] ^ 0x36;
}
for ( ; i < 64; i++) {
kopad[i] = 0 ^ 0x5c;
kipad[i] = 0 ^ 0x36;
}
apr_sha1_init(&context);
apr_sha1_update(&context, (const char *)kipad, 64);
apr_sha1_update(&context, (const char *)message, (unsigned int)message_len);
apr_sha1_final(digest, &context);
apr_sha1_init(&context);
apr_sha1_update(&context, (const char *)kopad, 64);
apr_sha1_update(&context, (const char *)digest, 20);
apr_sha1_final(hmac, &context);
}
unsigned char* aos_md5(aos_pool_t* pool, const char *in, apr_size_t in_len) {
unsigned char* out;
apr_md5_ctx_t context;
//APR_MD5_DIGESTSIZE: The MD5 digest size, value is 16
out = aos_palloc(pool, APR_MD5_DIGESTSIZE + 1);
if (!out) {
return NULL;
}
if (0 != apr_md5_init(&context)) {
return NULL;
}
if (0 != apr_md5_update(&context, in, in_len)) {
return NULL;
}
if (0 != apr_md5_final(out, &context)) {
return NULL;
}
out[APR_MD5_DIGESTSIZE] = '\0';
return out;
};
int aos_url_decode(const char *in, char *out)
{
static const char tbl[256] = {
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1,
-1,10,11,12,13,14,15,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,10,11,12,13,14,15,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1
};
char c, v1, v2;
if(in != NULL) {
while((c=*in++) != '\0') {
if(c == '%') {
if(!(v1=*in++) || (v1=tbl[(unsigned char)v1])<0 ||
!(v2=*in++) || (v2=tbl[(unsigned char)v2])<0) {
*out = '\0';
return -1;
}
c = (v1<<4)|v2;
} else if (c == '+') {
c = ' ';
}
*out++ = c;
}
}
*out = '\0';
return 0;
}
/*
* Convert a string to a long long integer.
*
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
long long aos_strtoll(const char *nptr, char **endptr, int base)
{
const char *s;
/* LONGLONG */
long long int acc, cutoff;
int c;
int neg, any, cutlim;
/* endptr may be NULL */
#ifdef __GNUC__
/* This outrageous construct just to shut up a GCC warning. */
(void) &acc; (void) &cutoff;
#endif
/*
* Skip white space and pick up leading +/- sign if any.
* If base is 0, allow 0x for hex and 0 for octal, else
* assume decimal; if base is already 16, allow 0x.
*/
s = nptr;
do {
c = (unsigned char) *s++;
} while (isspace(c));
if (c == '-') {
neg = 1;
c = *s++;
} else {
neg = 0;
if (c == '+')
c = *s++;
}
if ((base == 0 || base == 16) &&
c == '0' && (*s == 'x' || *s == 'X')) {
c = s[1];
s += 2;
base = 16;
}
if (base == 0)
base = c == '0' ? 8 : 10;
/*
* Compute the cutoff value between legal numbers and illegal
* numbers. That is the largest legal value, divided by the
* base. An input number that is greater than this value, if
* followed by a legal input character, is too big. One that
* is equal to this value may be valid or not; the limit
* between valid and invalid numbers is then based on the last
* digit. For instance, if the range for long longs is
* [-9223372036854775808..9223372036854775807] and the input base
* is 10, cutoff will be set to 922337203685477580 and cutlim to
* either 7 (neg==0) or 8 (neg==1), meaning that if we have
* accumulated a value > 922337203685477580, or equal but the
* next digit is > 7 (or 8), the number is too big, and we will
* return a range error.
*
* Set any if any `digits' consumed; make it negative to indicate
* overflow.
*/
cutoff = neg ? LLONG_MIN : LLONG_MAX;
cutlim = (int)(cutoff % base);
cutoff /= base;
if (neg) {
if (cutlim > 0) {
cutlim -= base;
cutoff += 1;
}
cutlim = -cutlim;
}
for (acc = 0, any = 0;; c = (unsigned char) *s++) {
if (isdigit(c))
c -= '0';
else if (isalpha(c))
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
else
break;
if (c >= base)
break;
if (any < 0)
continue;
if (neg) {
if (acc < cutoff || (acc == cutoff && c > cutlim)) {
any = -1;
acc = LLONG_MIN;
errno = ERANGE;
} else {
any = 1;
acc *= base;
acc -= c;
}
} else {
if (acc > cutoff || (acc == cutoff && c > cutlim)) {
any = -1;
acc = LLONG_MAX;
errno = ERANGE;
} else {
any = 1;
acc *= base;
acc += c;
}
}
}
if (endptr != 0)
/* LINTED interface specification */
*endptr = (char *)(any ? s - 1 : nptr);
return (acc);
}
int64_t aos_atoi64(const char *nptr)
{
return aos_strtoull(nptr, NULL, 10);
}
unsigned long long aos_strtoull(const char *nptr, char **endptr, int base)
{
const char *s;
unsigned long long acc, cutoff;
int c;
int neg, any, cutlim;
/*
* See strtoq for comments as to the logic used.
*/
s = nptr;
do {
c = (unsigned char) *s++;
} while (isspace(c));
if (c == '-') {
neg = 1;
c = *s++;
} else {
neg = 0;
if (c == '+')
c = *s++;
}
if ((base == 0 || base == 16) &&
c == '0' && (*s == 'x' || *s == 'X')) {
c = s[1];
s += 2;
base = 16;
}
if (base == 0)
base = c == '0' ? 8 : 10;
cutoff = ULLONG_MAX / (unsigned long long)base;
cutlim = ULLONG_MAX % (unsigned long long)base;
for (acc = 0, any = 0;; c = (unsigned char) *s++) {
if (isdigit(c))
c -= '0';
else if (isalpha(c))
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
else
break;
if (c >= base)
break;
if (any < 0)
continue;
if (acc > cutoff || (acc == cutoff && c > cutlim)) {
any = -1;
acc = ULLONG_MAX;
errno = ERANGE;
} else {
any = 1;
acc *= (unsigned long long)base;
acc += c;
}
}
if (neg && any > 0)
#ifdef WIN32
#pragma warning(disable : 4146)
#endif
acc = -acc;
#ifdef WIN32
#pragma warning(default : 4146)
#endif
if (endptr != 0)
*endptr = (char *) (any ? s - 1 : nptr);
return (acc);
}
uint64_t aos_atoui64(const char *nptr)
{
return aos_strtoull(nptr, NULL, 10);
}
/* ===== start - public domain SHA256 implementation ===== */
/* This is based on SHA256 implementation in LibTomCrypt that was released into
* public domain by Tom St Denis. */
#define WPA_GET_BE32(a) ((((uint32_t)(a)[0]) << 24) |(((uint32_t)(a)[1]) << 16) |(((uint32_t)(a)[2]) << 8) |((uint32_t)(a)[3]))
#define WPA_PUT_BE32(a, val) \
do { \
(a)[0] = (unsigned char)((((uint32_t) (val)) >> 24) & 0xff); \
(a)[1] = (unsigned char)((((uint32_t) (val)) >> 16) & 0xff); \
(a)[2] = (unsigned char)((((uint32_t) (val)) >> 8) & 0xff); \
(a)[3] = (unsigned char)(((uint32_t) (val)) & 0xff); \
} while(0)
#define WPA_PUT_BE64(a, val) \
do { \
(a)[0] = (unsigned char)(((uint64_t)(val)) >> 56); \
(a)[1] = (unsigned char)(((uint64_t)(val)) >> 48); \
(a)[2] = (unsigned char)(((uint64_t)(val)) >> 40); \
(a)[3] = (unsigned char)(((uint64_t)(val)) >> 32); \
(a)[4] = (unsigned char)(((uint64_t)(val)) >> 24); \
(a)[5] = (unsigned char)(((uint64_t)(val)) >> 16); \
(a)[6] = (unsigned char)(((uint64_t)(val)) >> 8); \
(a)[7] = (unsigned char)(((uint64_t)(val)) & 0xff); \
} while(0)
typedef struct sha256_state {
uint64_t length;
uint32_t state[8], curlen;
unsigned char buf[64];
} SHA256_CTX;
/* the K array */
static const uint32_t K[64] = {
0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, 0x3956c25bUL,
0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, 0xd807aa98UL, 0x12835b01UL,
0x243185beUL, 0x550c7dc3UL, 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL,
0xc19bf174UL, 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL,
0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, 0x983e5152UL,
0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, 0xc6e00bf3UL, 0xd5a79147UL,
0x06ca6351UL, 0x14292967UL, 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL,
0x53380d13UL, 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL,
0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, 0xd192e819UL,
0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, 0x19a4c116UL, 0x1e376c08UL,
0x2748774cUL, 0x34b0bcb5UL, 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL,
0x682e6ff3UL, 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL,
0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
};
/* Various logical functions */
#define RORc(x, y) \
(((((uint32_t)(x) & 0xFFFFFFFFUL) >> (uint32_t)((y) & 31)) | \
((uint32_t)(x) << (uint32_t)(32 - ((y) & 31)))) & 0xFFFFFFFFUL)
#define Ch(x,y,z) (z ^ (x & (y ^ z)))
#define Maj(x,y,z) (((x | y) & z) | (x & y))
#define S(x, n) RORc((x), (n))
#define R(x, n) (((x)&0xFFFFFFFFUL)>>(n))
#define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22))
#define Sigma1(x) (S(x, 6) ^ S(x, 11) ^ S(x, 25))
#define Gamma0(x) (S(x, 7) ^ S(x, 18) ^ R(x, 3))
#define Gamma1(x) (S(x, 17) ^ S(x, 19) ^ R(x, 10))
#ifndef MIN
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#endif
/* compress 512-bits */
static int sha256_compress(struct sha256_state* md, unsigned char* buf)
{
unsigned long S[8], W[64], t0, t1;
unsigned long t;
int i;
/* copy state into S */
for (i = 0; i < 8; i++) {
S[i] = md->state[i];
}
/* copy the state into 512-bits into W[0..15] */
for (i = 0; i < 16; i++)
W[i] = WPA_GET_BE32(buf + (4 * i));
/* fill W[16..63] */
for (i = 16; i < 64; i++) {
W[i] = Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) +
W[i - 16];
}
/* Compress */
#define RND(a,b,c,d,e,f,g,h,i) \
t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i]; \
t1 = Sigma0(a) + Maj(a, b, c); \
d += t0; \
h = t0 + t1;
for (i = 0; i < 64; ++i) {
RND(S[0], S[1], S[2], S[3], S[4], S[5], S[6], S[7], i);
t = S[7]; S[7] = S[6]; S[6] = S[5]; S[5] = S[4];
S[4] = S[3]; S[3] = S[2]; S[2] = S[1]; S[1] = S[0]; S[0] = t;
}
/* feedback */
for (i = 0; i < 8; i++) {
md->state[i] = md->state[i] + S[i];
}
return 0;
}
/* Initialize the hash state */
static void SHA256_Init(struct sha256_state* md)
{
md->curlen = 0;
md->length = 0;
md->state[0] = 0x6A09E667UL;
md->state[1] = 0xBB67AE85UL;
md->state[2] = 0x3C6EF372UL;
md->state[3] = 0xA54FF53AUL;
md->state[4] = 0x510E527FUL;
md->state[5] = 0x9B05688CUL;
md->state[6] = 0x1F83D9ABUL;
md->state[7] = 0x5BE0CD19UL;
}
/**
Process a block of memory though the hash
@param md The hash state
@param in The data to hash
@param inlen The length of the data (octets)
@return CRYPT_OK if successful
*/
static int SHA256_Update(struct sha256_state* md, const unsigned char* in, unsigned long inlen)
{
unsigned long n;
#define block_size 64
if (md->curlen > sizeof(md->buf))
return -1;
while (inlen > 0) {
if (md->curlen == 0 && inlen >= block_size) {
if (sha256_compress(md, (unsigned char*)in) < 0)
return -1;
md->length += block_size * 8;
in += block_size;
inlen -= block_size;
}
else {
n = MIN(inlen, (block_size - md->curlen));
memcpy(md->buf + md->curlen, in, n);
md->curlen += n;
in += n;
inlen -= n;
if (md->curlen == block_size) {
if (sha256_compress(md, md->buf) < 0)
return -1;
md->length += 8 * block_size;
md->curlen = 0;
}
}
}
return 0;
}
/**
Terminate the hash to get the digest
@param md The hash state
@param out [out] The destination of the hash (32 bytes)
@return CRYPT_OK if successful
*/
static int SHA256_Final(unsigned char* out, struct sha256_state* md)
{
int i;
if (md->curlen >= sizeof(md->buf))
return -1;
/* increase the length of the message */
md->length += md->curlen * 8;
/* append the '1' bit */
md->buf[md->curlen++] = (unsigned char)0x80;
/* if the length is currently above 56 bytes we append zeros
* then compress. Then we can fall back to padding zeros and length
* encoding like normal.
*/
if (md->curlen > 56) {
while (md->curlen < 64) {
md->buf[md->curlen++] = (unsigned char)0;
}
sha256_compress(md, md->buf);
md->curlen = 0;
}
/* pad up to 56 bytes of zeroes */
while (md->curlen < 56) {
md->buf[md->curlen++] = (unsigned char)0;
}
/* store length */
WPA_PUT_BE64(md->buf + 56, md->length);
sha256_compress(md, md->buf);
/* copy output */
for (i = 0; i < 8; i++)
WPA_PUT_BE32(out + (4 * i), md->state[i]);
return 0;
}
/* ===== end - public domain SHA256 implementation ===== */
void aos_HMAC_SHA256(char hmac[32], const char* key, int key_len, const char* message, int message_len)
{
unsigned char kopad[64], kipad[64];
int i;
unsigned char digest[32];
SHA256_CTX context;
if (key_len > 64) {
key_len = 64;
}
for (i = 0; i < key_len; i++) {
kopad[i] = key[i] ^ 0x5c;
kipad[i] = key[i] ^ 0x36;
}
for (; i < 64; i++) {
kopad[i] = 0 ^ 0x5c;
kipad[i] = 0 ^ 0x36;
}
SHA256_Init(&context);
SHA256_Update(&context, kipad, 64);
SHA256_Update(&context, (unsigned char*)message, (unsigned int)message_len);
SHA256_Final(digest, &context);
SHA256_Init(&context);
SHA256_Update(&context, kopad, 64);
SHA256_Update(&context, digest, 32);
SHA256_Final((unsigned char* )hmac, &context);
}
void aos_SHA256(char hash[32], const char* message, int message_len)
{
SHA256_CTX context;
memset(hash, 0, 32);
SHA256_Init(&context);
SHA256_Update(&context, (const unsigned char*)message, message_len);
SHA256_Final((unsigned char*)hash, &context);
}
================================================
FILE: oss_c_sdk/aos_util.h
================================================
#ifndef LIBAOS_UTIL_H
#define LIBAOS_UTIL_H
#include "aos_buf.h"
#include "aos_string.h"
#include "aos_define.h"
#include "aos_fstack.h"
#include <mxml.h>
#include <apr_md5.h>
#include <apr_sha1.h>
AOS_CPP_START
int aos_parse_xml_body(aos_list_t *bc, mxml_node_t **root);
void aos_gnome_sort(const char **headers, int size);
int aos_convert_to_gmt_time(char* date, const char* format, apr_time_exp_t *tm);
int aos_get_gmt_str_time(char datestr[AOS_MAX_GMT_TIME_LEN]);
int aos_convert_to_iso8601_time(char* date, const char* format, apr_time_exp_t* tm);
int aos_get_iso8601_str_time(char datestr[AOS_MAX_GMT_TIME_LEN]);
int aos_get_iso8601_str_time_ex(char datestr[AOS_MAX_GMT_TIME_LEN], apr_time_t now);
int aos_get_gmt_time_date(const char *gmt, char datestr[AOS_MAX_SHORT_TIME_LEN]);
/**
* URL-encodes a string from [src] into [dest]. [dest] must have at least
* 3x the number of characters that [source] has. At most [maxSrcSize] bytes
* from [src] are encoded; if more are present in [src], 0 is returned from
* urlEncode, else nonzero is returned.
* if slash not 0, don't change / to %2F
*/
int aos_url_encode(char *dest, const char *src, int maxSrcSize);
int aos_url_encode_ex(char *dest, const char *src, int maxSrcSize, int slash);
/**
* Convert binary data to a hex encoding.
*/
int aos_encode_hex(char* dest, const void* src, int srclen, int* len);
const char* aos_http_method_to_string(http_method_e method);
/**
* encode query string, check query args < AOS_MAX_QUERY_ARG_LEN
* result string "?a&b=x"
*/
int aos_query_params_to_string(aos_pool_t *p, aos_table_t *query_params, aos_string_t *querystr);
/**
* base64 encode bytes. The output buffer must have at least
* ((4 * (inLen + 1)) / 3) bytes in it. Returns the number of bytes written
* to [out].
*/
int aos_base64_encode(const unsigned char *in, int inLen, char *out);
/**
* Compute HMAC-SHA-1 with key [key] and message [message], storing result
* in [hmac]
*/
void HMAC_SHA1(unsigned char hmac[20], const unsigned char *key, int key_len,
const unsigned char *message, int message_len);
unsigned char* aos_md5(aos_pool_t* pool, const char* in, apr_size_t in_len);
int aos_url_decode(const char *in, char *out);
/*
* Convert a string to a long long integer.
*
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
long long aos_strtoll(const char *nptr, char **endptr, int base);
/*
* @brief Convert a string to int64_t.
**/
int64_t aos_atoi64(const char *nptr);
/*
* @brief Convert a string to an unsigned long long integer.
*
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
**/
unsigned long long aos_strtoull(const char *nptr, char **endptr, int base);
/*
* @brief Convert a string to uint64_t.
**/
uint64_t aos_atoui64(const char *nptr);
void aos_HMAC_SHA256(char hmac[32], const char* key, int key_len, const char* message, int message_len);
void aos_SHA256(char hash[32], const char* message, int message_len);
AOS_CPP_END
#endif
================================================
FILE: oss_c_sdk/oss_api.h
================================================
#ifndef LIBOSS_API_H
#define LIBOSS_API_H
#include "aos_util.h"
#include "aos_string.h"
#include "aos_status.h"
#include "oss_define.h"
#include "oss_util.h"
OSS_CPP_START
/*
* @brief create oss bucket
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] oss_acl the oss bucket acl
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_create_bucket(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_acl_e oss_acl,
aos_table_t **resp_headers);
/*
* @brief create oss bucket with storage class
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] oss_acl the oss bucket acl
* @param[in] storage_class the oss bucket storage_class
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_create_bucket_with_storage_class(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_acl_e oss_acl,
oss_storage_class_type_e storage_class,
aos_table_t **resp_headers);
/*
* @brief delete oss bucket
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_delete_bucket(const oss_request_options_t *options,
const aos_string_t *bucket,
aos_table_t **resp_headers);
/*
* @brief put oss bucket acl
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] oss_acl the oss bucket acl
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_bucket_acl(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_acl_e oss_acl,
aos_table_t **resp_headers);
/*
* @brief get oss bucket acl
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] oss_acl the oss bucket acl
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_bucket_acl(const oss_request_options_t *options,
const aos_string_t *bucket,
aos_string_t *oss_acl,
aos_table_t **resp_headers);
/*
* @brief head oss bucket
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_head_bucket(const oss_request_options_t *options,
const aos_string_t *bucket,
aos_table_t **resp_headers);
/*
* @brief get oss bucket location
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] oss_location the oss bucket location
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_bucket_location(const oss_request_options_t *options,
const aos_string_t *bucket,
aos_string_t *oss_location,
aos_table_t **resp_headers);
/*
* @brief get oss bucket info
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] bucket_info the oss bucket info
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_bucket_info(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_bucket_info_t *bucket_info,
aos_table_t **resp_headers);
/*
* @brief get oss bucket stat
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] bucket_stat the oss bucket stat
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_bucket_stat(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_bucket_stat_t *bucket_stat,
aos_table_t **resp_headers);
/*
* @brief get oss bucket cors
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] rule_list the oss bucket cors rule list
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_bucket_cors(const oss_request_options_t *options,
const aos_string_t *bucket,
aos_list_t *rule_list,
aos_table_t **resp_headers);
/*
* @brief delete oss bucket cors
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_delete_bucket_cors(const oss_request_options_t *options,
const aos_string_t *bucket,
aos_table_t **resp_headers);
/*
* @brief get oss bucket referer
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] referer_config the oss bucket referer config
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_bucket_referer(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_referer_config_t *referer_config,
aos_table_t **resp_headers);
/*
* @brief put oss bucket storage capacity
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] storage_capacity the oss bucket storage capacity, unit gigabyte
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_bucket_storage_capacity(const oss_request_options_t *options,
const aos_string_t *bucket,
long storage_capacity,
aos_table_t **resp_headers);
/*
* @brief get oss bucket storage capacity
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] storage_capacity the oss bucket storage capacity
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_bucket_storage_capacity(const oss_request_options_t *options,
const aos_string_t *bucket,
long *storage_capacity,
aos_table_t **resp_headers);
/*
* @brief put oss bucket lifecycle
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] lifecycle_rule_list the oss bucket lifecycle list
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_bucket_lifecycle(const oss_request_options_t *options,
const aos_string_t *bucket,
aos_list_t *lifecycle_rule_list,
aos_table_t **resp_headers);
/*
* @brief put oss bucket referer
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] referer_config the oss bucket referer_config
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_bucket_referer(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_referer_config_t *referer_config,
aos_table_t **resp_headers);
/*
* @brief put oss bucket cors
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] rule_list the oss bucket ocor rule list
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_bucket_cors(const oss_request_options_t *options,
const aos_string_t *bucket,
aos_list_t *rule_list,
aos_table_t **resp_headers);
/*
* @brief put oss bucket website
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] website_config the oss bucket website config
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_bucket_website(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_website_config_t *website_config,
aos_table_t **resp_headers);
/*
* @brief get oss bucket website
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] website_config the oss bucket website config
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_bucket_website(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_website_config_t *website_config,
aos_table_t **resp_headers);
/*
* @brief delete oss bucket website
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_delete_bucket_website(const oss_request_options_t *options,
const aos_string_t *bucket,
aos_table_t **resp_headers);
/*
* @brief put oss bucket logging
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] content the oss bucket logging content rule
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_bucket_logging(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_logging_config_content_t *content,
aos_table_t **resp_headers);
/*
* @brief get oss bucket logging
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] content the oss bucket logging content rule
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_bucket_logging(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_logging_config_content_t *logging_content,
aos_table_t **resp_headers);
/*
* @brief delete oss bucket logging
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_delete_bucket_logging(const oss_request_options_t *options,
const aos_string_t *bucket,
aos_table_t **resp_headers);
/*
* @brief get oss bucket lifecycle
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] lifecycle_rule_list the oss bucket lifecycle list
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_bucket_lifecycle(const oss_request_options_t *options,
const aos_string_t *bucket,
aos_list_t *lifecycle_rule_list,
aos_table_t **resp_headers);
/*
* @brief delete oss bucket lifecycle
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_delete_bucket_lifecycle(const oss_request_options_t *options,
const aos_string_t *bucket,
aos_table_t **resp_headers);
/*
* @brief list oss objects
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] params input params for list object request,
including prefix, marker, delimiter, max_ret
* @param[out] params output params for list object response,
including truncated, next_marker, obje list
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_list_object(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_list_object_params_t *params,
aos_table_t **resp_headers);
/*
* @brief list oss buckets
* @param[in] options the oss request options
* @param[in] params input params for list bucket request,
including prefix, marker, max_keys
* @param[out] params output params for list bucket response,
including truncated, next_marker, bucket list
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_list_bucket(const oss_request_options_t *options,
oss_list_buckets_params_t *params,
aos_table_t **resp_headers);
/*
* @brief put oss object from buffer
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] buffer the buffer containing object content
* @param[in] headers the headers for request
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_object_from_buffer(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_list_t *buffer,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief put oss object from file
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] filename the filename to put
* @param[in] headers the headers for request
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_object_from_file(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
const aos_string_t *filename,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief put oss object from buffer
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] buffer the buffer containing object content
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[in] progress_callback the progress callback function
* @param[out] resp_headers oss server response headers
* @param[out] resp_body oss server response body
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_do_put_object_from_buffer(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_list_t *buffer,
aos_table_t *headers,
aos_table_t *params,
oss_progress_callback progress_callback,
aos_table_t **resp_headers,
aos_list_t *resp_body);
/*
* @brief put oss object from file
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] filename the filename to put
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[in] progress_callback the progress callback function
* @param[out] resp_headers oss server response headers
* @param[out] resp_body oss server response body
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_do_put_object_from_file(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
const aos_string_t *filename,
aos_table_t *headers,
aos_table_t *params,
oss_progress_callback progress_callback,
aos_table_t **resp_headers,
aos_list_t *resp_body);
/*
* @brief get oss object to buffer
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[out] buffer the buffer containing object content
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_object_to_buffer(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_table_t *headers,
aos_table_t *params,
aos_list_t *buffer,
aos_table_t **resp_headers);
/*
* @brief restore oss object from archive bucket
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_restore_object(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief restore oss object from cold archive bucket
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] tier the mode of restoring an object
* @param[in] day the day of staying in retrievable state
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_restore_object_with_tier(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
oss_tier_type_e tier,
int day,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief get oss object to buffer
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[in] progress_callback the progress callback function
* @param[out] buffer the buffer containing object content
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_do_get_object_to_buffer(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_table_t *headers,
aos_table_t *params,
aos_list_t *buffer,
oss_progress_callback progress_callback,
aos_table_t **resp_headers);
/*
* @brief get oss object to file
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[in] filename the filename storing object content
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_object_to_file(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_table_t *headers,
aos_table_t *params,
aos_string_t *filename,
aos_table_t **resp_headers);
/*
* @brief get oss object to file
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[in] filename the filename storing object content
* @param[in] progress_callback the progress callback function
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_do_get_object_to_file(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_table_t *headers,
aos_table_t *params,
aos_string_t *filename,
oss_progress_callback progress_callback,
aos_table_t **resp_headers);
/*
* @brief head oss object
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] headers the headers for request
* @param[out] resp_headers oss server response headers containing object meta
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_head_object(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief get object meta
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[out] resp_headers oss server response headers containing object meta
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_object_meta(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_table_t **resp_headers);
/*
* @brief put object acl
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] oss_acl the oss object ACL
* @param[out] resp_headers oss server response headers containing object meta
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_object_acl(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
oss_acl_e oss_acl,
aos_table_t **resp_headers);
/*
* @brief put object acl
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[out] oss_acl the oss object ACL
* @param[out] resp_headers oss server response headers containing object meta
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_object_acl(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_string_t *oss_acl,
aos_table_t **resp_headers);
/*
* @brief put symlink oss object
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] sym_object the oss symlink object name
* @param[in] target_object the oss target object game
* @param[out] resp_headers oss server response headers containing object meta
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_symlink(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *sym_object,
const aos_string_t *target_object,
aos_table_t **resp_headers);
/*
* @brief put symlink oss object
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] sym_object the oss symlink object name
* @param[in] target_object the oss target object game
* @param[in] headers the headers for request
* @param[out] resp_headers oss server response headers containing object meta
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_do_put_symlink(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *sym_object,
const aos_string_t *target_object,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief get symlink oss object
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] sym_object the oss symlink object name
* @param[out] resp_headers oss server response headers containing object meta
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_symlink(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *sym_object,
aos_table_t **resp_headers);
/*
* @brief delete oss object
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_delete_object(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_table_t **resp_headers);
/*
* @brief delete oss objects
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object_list the oss object list name
* @param[in] is_quiet is quiet or verbose
* @param[out] resp_headers oss server response headers
* @param[out] deleted_object_list deleted object list
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_delete_objects(const oss_request_options_t *options,
const aos_string_t *bucket,
aos_list_t *object_list,
int is_quiet,
aos_table_t **resp_headers,
aos_list_t *deleted_object_list);
/*
* @brief delete oss objects by prefix
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] prefix prefix of delete objects
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_delete_objects_by_prefix(oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *prefix);
/*
* @brief copy oss objects
* @param[in] options the oss request options
* @param[in] source_bucket the oss source bucket name
* @param[in] object_list the oss source object list name
* @param[in] dest_bucket the oss dest bucket name
* @param[in] dest_list the oss dest object list name
* @param[in] headers the headers for request
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_copy_object(const oss_request_options_t *options,
const aos_string_t *source_bucket,
const aos_string_t *source_object,
const aos_string_t *dest_bucket,
const aos_string_t *dest_object,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief append oss object from buffer
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] position the start position append
* @param[in] buffer the buffer containing object content
* @param[in] headers the headers for request
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_append_object_from_buffer(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
int64_t position,
aos_list_t *buffer,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief append oss object from buffer
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] position the start position append
* @param[in] init_crc the initial crc value
* @param[in] buffer the buffer containing object content
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[in] progress_callback the progress callback function
* @param[out] resp_headers oss server response headers
* @param[out] resp_body oss server response body
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_do_append_object_from_buffer(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
int64_t position,
uint64_t init_crc,
aos_list_t *buffer,
aos_table_t *headers,
aos_table_t *params,
oss_progress_callback progress_callback,
aos_table_t **resp_headers,
aos_list_t *resp_body);
/*
* @brief append oss object from file
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] position the start position append
* @param[in] append_file the file containing appending content
* @param[in] headers the headers for request
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_append_object_from_file(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
int64_t position,
const aos_string_t *append_file,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief append oss object from file
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] position the start position append
* @param[in] init_crc the initial crc value
* @param[in] append_file the file containing appending content
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[in] progress_callback the progress callback function
* @param[out] resp_headers oss server response headers
* @param[out] resp_body oss server response body
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_do_append_object_from_file(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
int64_t position,
uint64_t init_crc,
const aos_string_t *append_file,
aos_table_t *headers,
aos_table_t *params,
oss_progress_callback progress_callback,
aos_table_t **resp_headers,
aos_list_t *resp_body);
/*
* @brief gen signed url for oss object api
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] expires the end expire time for signed url
* @param[in] req the aos http request
* @return signed url, non-NULL success, NULL failure
*/
char *oss_gen_signed_url(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
int64_t expires,
aos_http_request_t *req);
/*
* @brief oss put object from buffer using signed url
* @param[in] options the oss request options
* @param[in] signed_url the signed url for put object
* @param[in] buffer the buffer containing object content
* @param[in] headers the headers for request
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_object_from_buffer_by_url(const oss_request_options_t *options,
const aos_string_t *signed_url,
aos_list_t *buffer,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief oss put object from file using signed url
* @param[in] options the oss request options
* @param[in] signed_url the signed url for put object
* @param[in] filename the filename containing object content
* @param[in] headers the headers for request
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_object_from_file_by_url(const oss_request_options_t *options,
const aos_string_t *signed_url,
aos_string_t *filename,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief oss get object to buffer using signed url
* @param[in] options the oss request options
* @param[in] signed_url the signed url for put object
* @param[in] buffer the buffer containing object content
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_object_to_buffer_by_url(const oss_request_options_t *options,
const aos_string_t *signed_url,
aos_table_t *headers,
aos_table_t *params,
aos_list_t *buffer,
aos_table_t **resp_headers);
/*
* @brief oss get object to file using signed url
* @param[in] options the oss request options
* @param[in] signed_url the signed url for put object
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[in] filename the filename containing object content
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_object_to_file_by_url(const oss_request_options_t *options,
const aos_string_t *signed_url,
aos_table_t *headers,
aos_table_t *params,
aos_string_t *filename,
aos_table_t **resp_headers);
/*
* @brief oss head object using signed url
* @param[in] options the oss request options
* @param[in] signed_url the signed url for put object
* @param[in] headers the headers for request
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_head_object_by_url(const oss_request_options_t *options,
const aos_string_t *signed_url,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief oss get object meta using signed url
* @param[in] options the oss request options
* @param[in] signed_url the signed url for put object
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_object_meta_by_url(const oss_request_options_t *options,
const aos_string_t *signed_url,
aos_table_t **resp_headers);
/*
* @brief oss init multipart upload
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] upload_id the upload id to upload if has
* @param[in] headers the headers for request
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_init_multipart_upload(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_string_t *upload_id,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief oss upload part from buffer
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] upload_id the upload id to upload if has
* @param[in] part_num the upload part number
* @param[in] buffer the buffer containing upload part content
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_upload_part_from_buffer(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
const aos_string_t *upload_id,
int part_num,
aos_list_t *buffer,
aos_table_t **resp_headers);
/*
* @brief oss upload part from buffer
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] upload_id the upload id to upload if has
* @param[in] part_num the upload part number
* @param[in] buffer the buffer containing upload part content
* @param[in] progress_callback the progress callback function
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[out] resp_headers oss server response headers
* @param[out] resp_body oss server response body
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_do_upload_part_from_buffer(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
const aos_string_t *upload_id,
int part_num,
aos_list_t *buffer,
oss_progress_callback progress_callback,
aos_table_t *headers,
aos_table_t *params,
aos_table_t **resp_headers,
aos_list_t *resp_body);
/*
* @brief oss upload part from file
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] upload_id the upload id to upload if has
* @param[in] part_num the upload part number
* @param[in] upload_file the file containing upload part content
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_upload_part_from_file(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
const aos_string_t *upload_id,
int part_num,
oss_upload_file_t *upload_file,
aos_table_t **resp_headers);
/*
* @brief oss upload part from file
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] upload_id the upload id to upload if has
* @param[in] part_num the upload part number
* @param[in] upload_file the file containing upload part content
* @param[in] progress_callback the progress callback function
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[out] resp_headers oss server response headers
* @param[out] resp_body oss server response body
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_do_upload_part_from_file(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
const aos_string_t *upload_id,
int part_num,
oss_upload_file_t *upload_file,
oss_progress_callback progress_callback,
aos_table_t *headers,
aos_table_t *params,
aos_table_t **resp_headers,
aos_list_t *resp_body);
/*
* @brief oss abort multipart upload
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] upload_id the upload id to upload if has
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_abort_multipart_upload(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_string_t *upload_id,
aos_table_t **resp_headers);
/*
* @brief oss complete multipart upload
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] upload_id the upload id to upload if has
* @param[in] part_list the uploaded part list to complete
* @param[in] headers the headers for request
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_complete_multipart_upload(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
const aos_string_t *upload_id,
aos_list_t *part_list,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief oss complete multipart upload
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] upload_id the upload id to upload if has
* @param[in] part_list the uploaded part list to complete
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[out] resp_headers oss server response headers
* @param[out] resp_body oss server response body
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_do_complete_multipart_upload(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
const aos_string_t *upload_id,
aos_list_t *part_list,
aos_table_t *headers,
aos_table_t *params,
aos_table_t **resp_headers,
aos_list_t *resp_body);
/*
* @brief oss list upload part with specific upload_id for object
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] upload_id the upload id to upload if has
* @param[in] params the input list upload part parameters,
incluing part_number_marker, max_ret
* @param[out] params the output params,
including next_part_number_marker, part_list, truncated
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_list_upload_part(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
const aos_string_t *upload_id,
oss_list_upload_part_params_t *params,
aos_table_t **resp_headers);
/*
* @brief oss list multipart upload for bucket
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] params the input list multipart upload parameters
* @param[out] params the output params including next_key_marker, next_upload_id_markert, upload_list etc
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_list_multipart_upload(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_list_multipart_upload_params_t *params,
aos_table_t **resp_headers);
/*
* @brief oss copy large object using upload part copy
* @param[in] options the oss request options
* @param[in] paramsthe upload part copy parameters
* @param[in] headers the headers for request
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_upload_part_copy(const oss_request_options_t *options,
oss_upload_part_copy_params_t *params,
aos_table_t *headers,
aos_table_t **resp_headers);
/*
* @brief oss upload file using multipart upload
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] upload_id the upload id to upload if has
* @param[in] filename the filename containing object content
* @param[in] part_size the part size for multipart upload
* @param[in] headers the headers for request
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_upload_file(oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *object,
aos_string_t *upload_id,
aos_string_t *filename,
int64_t part_size,
aos_table_t *headers);
/*
* @brief oss upload file with mulit-thread and resumable
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] filepath the filename containing object content
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[in] clt_params the control params of upload
* @param[in] progress_callback the progress callback function
* @param[out] resp_headers oss server response headers
* @param[out] resp_body oss server response body
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_resumable_upload_file(oss_request_options_t *options,
aos_string_t *bucket,
aos_string_t *object,
aos_string_t *filepath,
aos_table_t *headers,
aos_table_t *params,
oss_resumable_clt_params_t *clt_params,
oss_progress_callback progress_callback,
aos_table_t **resp_headers,
aos_list_t *resp_body);
/*
* @brief oss upload file with mulit-thread and resumable
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] object the oss object name
* @param[in] filepath download object to the file
* @param[in] headers the headers for request
* @param[in] params the params for request
* @param[in] clt_params the control params of upload
* @param[in] progress_callback the progress callback function
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_resumable_download_file(oss_request_options_t *options,
aos_string_t *bucket,
aos_string_t *object,
aos_string_t *filepath,
aos_table_t *headers,
aos_table_t *params,
oss_resumable_clt_params_t *clt_params,
oss_progress_callback progress_callback,
aos_table_t **resp_headers);
/*
* @brief oss create live channel
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] config the oss live channel configuration
* @param[in] publish_url_list the publish url list
* @param[in] play_url_list the play url list
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_create_live_channel(const oss_request_options_t *options,
const aos_string_t *bucket,
oss_live_channel_configuration_t *config,
aos_list_t *publish_url_list,
aos_list_t *play_url_list,
aos_table_t **resp_headers);
/*
* @brief oss set live channel status
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] live_channel the oss live channel name
* @param[in] live_channel_status the oss live channel status, enabled or disabled
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_put_live_channel_status(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *live_channel,
const aos_string_t *live_channel_status,
aos_table_t **resp_headers);
/*
* @brief oss get live channel information
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] live_channel the oss live channel name
* @param[out] info the oss live channel information
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_live_channel_info(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *live_channel,
oss_live_channel_configuration_t *info,
aos_table_t **resp_headers);
/*
* @brief oss get live channel stat
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] live_channel the oss live channel name
* @param[out] stat the oss live channel stat
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_get_live_channel_stat(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *live_channel,
oss_live_channel_stat_t *stat,
aos_table_t **resp_headers);
/*
* @brief delete oss live channel
* @param[in] options the oss request options
* @param[in] bucket the oss bucket name
* @param[in] live_channel the oss live channel name
* @param[out] resp_headers oss server response headers
* @return aos_status_t, code is 2xx success, other failure
*/
aos_status_t *oss_delete_live_channel(const oss_request_options_t *options,
const aos_string_t *bucket,
const aos_string_t *live_channel,
aos_table_t **resp_headers);
/*
* @brief list oss live channels
* @param[in] options the oss request op
gitextract_876k0tp9/
├── .github/
│ └── workflows/
│ ├── linux-clang.yml
│ ├── linux-gcc.yml
│ └── windows.yml
├── .travis.yml
├── CHANGELOG.md
├── CMakeLists.txt
├── LICENSE
├── README-CN.md
├── README.md
├── oss_c_sdk/
│ ├── aos_buf.c
│ ├── aos_buf.h
│ ├── aos_crc64.c
│ ├── aos_crc64.h
│ ├── aos_define.h
│ ├── aos_fstack.c
│ ├── aos_fstack.h
│ ├── aos_http_io.c
│ ├── aos_http_io.h
│ ├── aos_list.h
│ ├── aos_log.c
│ ├── aos_log.h
│ ├── aos_status.c
│ ├── aos_status.h
│ ├── aos_string.c
│ ├── aos_string.h
│ ├── aos_transport.c
│ ├── aos_transport.h
│ ├── aos_util.c
│ ├── aos_util.h
│ ├── oss_api.h
│ ├── oss_auth.c
│ ├── oss_auth.h
│ ├── oss_bucket.c
│ ├── oss_define.c
│ ├── oss_define.h
│ ├── oss_live.c
│ ├── oss_multipart.c
│ ├── oss_object.c
│ ├── oss_resumable.c
│ ├── oss_resumable.h
│ ├── oss_util.c
│ ├── oss_util.h
│ ├── oss_xml.c
│ └── oss_xml.h
├── oss_c_sdk.sln
├── oss_c_sdk_sample/
│ ├── CMakeLists.txt
│ ├── main.c
│ ├── oss_append_object_sample.c
│ ├── oss_callback_sample.c
│ ├── oss_config.c
│ ├── oss_config.h
│ ├── oss_crc_sample.c
│ ├── oss_delete_object_sample.c
│ ├── oss_get_object_acl_sample.c
│ ├── oss_get_object_meta_sample.c
│ ├── oss_get_object_sample.c
│ ├── oss_head_object_sample.c
│ ├── oss_image_sample.c
│ ├── oss_list_object_sample.c
│ ├── oss_multipart_upload_sample.c
│ ├── oss_progress_sample.c
│ ├── oss_put_object_acl_sample.c
│ ├── oss_put_object_sample.c
│ ├── oss_resumable_sample.c
│ ├── oss_sample_util.c
│ ├── oss_sample_util.h
│ └── oss_select_object_sample.c
├── oss_c_sdk_test/
│ ├── CMakeLists.txt
│ ├── CuTest-README.txt
│ ├── CuTest.c
│ ├── CuTest.h
│ ├── ca-certificates.crt
│ ├── cjson.c
│ ├── cjson.h
│ ├── cjson_utils.c
│ ├── cjson_utils.h
│ ├── oss_config.c
│ ├── oss_config.h
│ ├── oss_test_util.c
│ ├── oss_test_util.h
│ ├── sample_data.csv
│ ├── test.h.in
│ ├── test_all.c
│ ├── test_aos.c
│ ├── test_oss_bucket.c
│ ├── test_oss_callback.c
│ ├── test_oss_crc.c
│ ├── test_oss_https.c
│ ├── test_oss_image.c
│ ├── test_oss_live.c
│ ├── test_oss_multipart.c
│ ├── test_oss_object.c
│ ├── test_oss_object_tagging.c
│ ├── test_oss_progress.c
│ ├── test_oss_proxy.c
│ ├── test_oss_resumable.c
│ ├── test_oss_select_object.c
│ ├── test_oss_sign.c
│ └── test_oss_xml.c
└── third_party/
├── include/
│ ├── apr/
│ │ ├── apr.h
│ │ ├── apr.h.in
│ │ ├── apr.hnw
│ │ ├── apr.hw
│ │ ├── apr.hwc
│ │ ├── apr_allocator.h
│ │ ├── apr_atomic.h
│ │ ├── apr_dso.h
│ │ ├── apr_env.h
│ │ ├── apr_errno.h
│ │ ├── apr_escape.h
│ │ ├── apr_escape_test_char.h
│ │ ├── apr_file_info.h
│ │ ├── apr_file_io.h
│ │ ├── apr_fnmatch.h
│ │ ├── apr_general.h
│ │ ├── apr_getopt.h
│ │ ├── apr_global_mutex.h
│ │ ├── apr_hash.h
│ │ ├── apr_inherit.h
│ │ ├── apr_lib.h
│ │ ├── apr_mmap.h
│ │ ├── apr_network_io.h
│ │ ├── apr_poll.h
│ │ ├── apr_pools.h
│ │ ├── apr_portable.h
│ │ ├── apr_proc_mutex.h
│ │ ├── apr_random.h
│ │ ├── apr_ring.h
│ │ ├── apr_shm.h
│ │ ├── apr_signal.h
│ │ ├── apr_skiplist.h
│ │ ├── apr_strings.h
│ │ ├── apr_support.h
│ │ ├── apr_tables.h
│ │ ├── apr_thread_cond.h
│ │ ├── apr_thread_mutex.h
│ │ ├── apr_thread_proc.h
│ │ ├── apr_thread_rwlock.h
│ │ ├── apr_time.h
│ │ ├── apr_user.h
│ │ ├── apr_version.h
│ │ ├── apr_want.h
│ │ └── arch/
│ │ ├── aix/
│ │ │ └── apr_arch_dso.h
│ │ ├── apr_private_common.h
│ │ ├── beos/
│ │ │ ├── apr_arch_dso.h
│ │ │ ├── apr_arch_proc_mutex.h
│ │ │ ├── apr_arch_thread_cond.h
│ │ │ ├── apr_arch_thread_mutex.h
│ │ │ ├── apr_arch_thread_rwlock.h
│ │ │ └── apr_arch_threadproc.h
│ │ ├── netware/
│ │ │ ├── apr_arch_dso.h
│ │ │ ├── apr_arch_file_io.h
│ │ │ ├── apr_arch_global_mutex.h
│ │ │ ├── apr_arch_internal_time.h
│ │ │ ├── apr_arch_networkio.h
│ │ │ ├── apr_arch_pre_nw.h
│ │ │ ├── apr_arch_proc_mutex.h
│ │ │ ├── apr_arch_thread_cond.h
│ │ │ ├── apr_arch_thread_mutex.h
│ │ │ ├── apr_arch_thread_rwlock.h
│ │ │ ├── apr_arch_threadproc.h
│ │ │ └── apr_private.h
│ │ ├── os2/
│ │ │ ├── apr_arch_dso.h
│ │ │ ├── apr_arch_file_io.h
│ │ │ ├── apr_arch_inherit.h
│ │ │ ├── apr_arch_networkio.h
│ │ │ ├── apr_arch_os2calls.h
│ │ │ ├── apr_arch_proc_mutex.h
│ │ │ ├── apr_arch_thread_cond.h
│ │ │ ├── apr_arch_thread_mutex.h
│ │ │ ├── apr_arch_thread_rwlock.h
│ │ │ └── apr_arch_threadproc.h
│ │ ├── os390/
│ │ │ └── apr_arch_dso.h
│ │ ├── unix/
│ │ │ ├── apr_arch_atomic.h
│ │ │ ├── apr_arch_dso.h
│ │ │ ├── apr_arch_file_io.h
│ │ │ ├── apr_arch_global_mutex.h
│ │ │ ├── apr_arch_inherit.h
│ │ │ ├── apr_arch_internal_time.h
│ │ │ ├── apr_arch_misc.h
│ │ │ ├── apr_arch_networkio.h
│ │ │ ├── apr_arch_poll_private.h
│ │ │ ├── apr_arch_proc_mutex.h
│ │ │ ├── apr_arch_shm.h
│ │ │ ├── apr_arch_thread_cond.h
│ │ │ ├── apr_arch_thread_mutex.h
│ │ │ ├── apr_arch_thread_rwlock.h
│ │ │ └── apr_arch_threadproc.h
│ │ └── win32/
│ │ ├── apr_arch_atime.h
│ │ ├── apr_arch_dso.h
│ │ ├── apr_arch_file_io.h
│ │ ├── apr_arch_inherit.h
│ │ ├── apr_arch_misc.h
│ │ ├── apr_arch_networkio.h
│ │ ├── apr_arch_proc_mutex.h
│ │ ├── apr_arch_thread_cond.h
│ │ ├── apr_arch_thread_mutex.h
│ │ ├── apr_arch_thread_rwlock.h
│ │ ├── apr_arch_threadproc.h
│ │ ├── apr_arch_utf8.h
│ │ ├── apr_dbg_win32_handles.h
│ │ └── apr_private.h
│ ├── aprutil/
│ │ ├── apr_anylock.h
│ │ ├── apr_base64.h
│ │ ├── apr_buckets.h
│ │ ├── apr_crypto.h
│ │ ├── apr_date.h
│ │ ├── apr_dbd.h
│ │ ├── apr_dbm.h
│ │ ├── apr_hooks.h
│ │ ├── apr_ldap.h
│ │ ├── apr_ldap.h.in
│ │ ├── apr_ldap.hnw
│ │ ├── apr_ldap.hw
│ │ ├── apr_ldap.hwc
│ │ ├── apr_ldap_init.h
│ │ ├── apr_ldap_option.h
│ │ ├── apr_ldap_rebind.h
│ │ ├── apr_ldap_url.h
│ │ ├── apr_md4.h
│ │ ├── apr_md5.h
│ │ ├── apr_memcache.h
│ │ ├── apr_optional.h
│ │ ├── apr_optional_hooks.h
│ │ ├── apr_queue.h
│ │ ├── apr_reslist.h
│ │ ├── apr_rmm.h
│ │ ├── apr_sdbm.h
│ │ ├── apr_sha1.h
│ │ ├── apr_strmatch.h
│ │ ├── apr_thread_pool.h
│ │ ├── apr_uri.h
│ │ ├── apr_uuid.h
│ │ ├── apr_xlate.h
│ │ ├── apr_xml.h
│ │ ├── apu.h
│ │ ├── apu.h.in
│ │ ├── apu.hnw
│ │ ├── apu.hw
│ │ ├── apu.hwc
│ │ ├── apu_errno.h
│ │ ├── apu_version.h
│ │ ├── apu_want.h
│ │ ├── apu_want.h.in
│ │ ├── apu_want.hnw
│ │ ├── apu_want.hw
│ │ └── private/
│ │ ├── apr_crypto_internal.h
│ │ ├── apr_dbd_internal.h
│ │ ├── apr_dbd_odbc_v2.h
│ │ ├── apr_dbm_private.h
│ │ ├── apu_config.h
│ │ ├── apu_config.hnw
│ │ ├── apu_config.hw
│ │ ├── apu_internal.h
│ │ ├── apu_select_dbm.h
│ │ ├── apu_select_dbm.h.in
│ │ └── apu_select_dbm.hw
│ ├── curl/
│ │ ├── config-win32.h
│ │ ├── curl.h
│ │ ├── curlbuild.h
│ │ ├── curlrules.h
│ │ ├── curlver.h
│ │ ├── easy.h
│ │ ├── mprintf.h
│ │ ├── multi.h
│ │ ├── stdcheaders.h
│ │ └── typecheck-gcc.h
│ └── mxml/
│ ├── config.h
│ └── mxml.h
└── lib/
├── Win32/
│ ├── libapr-1.lib
│ ├── libapriconv-1.lib
│ ├── libaprutil-1.lib
│ ├── libcurl.lib
│ ├── libexpat.lib
│ └── mxml1.lib
└── x64/
├── libapr-1.lib
├── libapriconv-1.lib
├── libaprutil-1.lib
├── libcurl.lib
├── libexpat.lib
└── mxml1.lib
SYMBOL INDEX (1588 symbols across 181 files)
FILE: oss_c_sdk/aos_buf.c
function aos_buf_t (line 5) | aos_buf_t *aos_create_buf(aos_pool_t *p, int size)
function aos_buf_t (line 23) | aos_buf_t *aos_buf_pack(aos_pool_t *p, const void *data, int size)
function aos_buf_list_len (line 41) | int64_t aos_buf_list_len(aos_list_t *list)
function aos_file_buf_t (line 72) | aos_file_buf_t *aos_create_file_buf(aos_pool_t *p)
function aos_open_file_for_read (line 77) | int aos_open_file_for_read(aos_pool_t *p, const char *path, aos_file_buf...
function aos_open_file_for_all_read (line 101) | int aos_open_file_for_all_read(aos_pool_t *p, const char *path, aos_file...
function aos_open_file_for_range_read (line 106) | int aos_open_file_for_range_read(aos_pool_t *p, const char *path,
function aos_open_file_for_write (line 130) | int aos_open_file_for_write(aos_pool_t *p, const char *path, aos_file_bu...
function aos_open_file_for_write_notrunc (line 146) | int aos_open_file_for_write_notrunc(aos_pool_t *p, const char *path, aos...
function aos_buf_append_string (line 162) | void aos_buf_append_string(aos_pool_t *p, aos_buf_t *b, const char *str,...
FILE: oss_c_sdk/aos_buf.h
function AOS_CPP_START (line 7) | AOS_CPP_START
type aos_file_buf_t (line 17) | typedef struct {
FILE: oss_c_sdk/aos_crc64.c
function crc64_init (line 56) | static void crc64_init(uint64_t table[][256])
function crc64_little_init (line 81) | static void crc64_little_init(void)
function APR_INLINE (line 87) | static APR_INLINE uint64_t rev8(uint64_t a)
function crc64_big_init (line 100) | static void crc64_big_init(void)
function APR_INLINE (line 136) | static APR_INLINE uint64_t crc64_little(uint64_t crc, void *buf, size_t ...
function APR_INLINE (line 167) | static APR_INLINE uint64_t crc64_big(uint64_t crc, void *buf, size_t len)
function aos_crc64 (line 203) | uint64_t aos_crc64(uint64_t crc, void *buf, size_t len)
function aos_crc64_test (line 211) | uint64_t aos_crc64_test(uint64_t crc, void *buf, size_t len, int little)
function gf2_matrix_times (line 218) | static uint64_t gf2_matrix_times(uint64_t *mat, uint64_t vec)
function gf2_matrix_square (line 232) | static void gf2_matrix_square(uint64_t *square, uint64_t *mat)
function aos_crc64_combine (line 243) | uint64_t aos_crc64_combine(uint64_t crc1, uint64_t crc2, uintmax_t len2)
function aos_crc32 (line 336) | uint32_t aos_crc32(uint32_t crc, const void *buf, size_t bufLen)
FILE: oss_c_sdk/aos_define.h
type http_method_e (line 28) | typedef enum {
type aos_error_code_e (line 36) | typedef enum {
type apr_pool_t (line 67) | typedef apr_pool_t aos_pool_t;
type apr_table_t (line 68) | typedef apr_table_t aos_table_t;
type apr_table_entry_t (line 69) | typedef apr_table_entry_t aos_table_entry_t;
type apr_array_header_t (line 70) | typedef apr_array_header_t aos_array_header_t;
FILE: oss_c_sdk/aos_fstack.c
function aos_array_header_t (line 3) | aos_array_header_t *aos_fstack_create(aos_pool_t *p, int size)
function aos_fstack_push (line 8) | void aos_fstack_push(aos_array_header_t *fstack, void *data, aos_func_u ...
function aos_fstack_item_t (line 18) | aos_fstack_item_t *aos_fstack_pop(aos_array_header_t *fstack)
function aos_fstack_destory (line 47) | void aos_fstack_destory(aos_array_header_t *fstack)
FILE: oss_c_sdk/aos_fstack.h
type aos_func_u (line 13) | typedef union aos_func_u {
type aos_fstack_item_t (line 20) | typedef struct aos_fstack_item_t {
FILE: oss_c_sdk/aos_http_io.c
function CURL (line 24) | CURL *aos_request_get()
function request_release (line 45) | void request_release(CURL *request)
function request_release2 (line 64) | void request_release2(aos_curl_http_transport_t* t)
function aos_set_default_request_options (line 85) | void aos_set_default_request_options(aos_http_request_options_t *op)
function aos_set_default_transport_options (line 90) | void aos_set_default_transport_options(aos_http_transport_options_t *op)
function aos_http_request_options_t (line 95) | aos_http_request_options_t *aos_http_request_options_create(aos_pool_t *p)
function aos_http_transport_options_t (line 116) | aos_http_transport_options_t *aos_http_transport_options_create(aos_pool...
function aos_http_controller_t (line 121) | aos_http_controller_t *aos_http_controller_create(aos_pool_t *p, int owner)
function aos_http_request_t (line 141) | aos_http_request_t *aos_http_request_create(aos_pool_t *p)
function aos_http_response_t (line 158) | aos_http_response_t *aos_http_response_create(aos_pool_t *p)
function aos_read_http_body_memory (line 174) | int aos_read_http_body_memory(aos_http_request_t *req, char *buffer, int...
function aos_read_http_body_file (line 202) | int aos_read_http_body_file(aos_http_request_t *req, char *buffer, int len)
function aos_write_http_body_memory (line 233) | int aos_write_http_body_memory(aos_http_response_t *resp, const char *bu...
function aos_write_http_body_file (line 246) | int aos_write_http_body_file(aos_http_response_t *resp, const char *buff...
function aos_http_io_initialize (line 280) | int aos_http_io_initialize(const char *user_agent_info, int flags)
function aos_http_io_deinitialize (line 328) | void aos_http_io_deinitialize()
function aos_http_send_request (line 347) | int aos_http_send_request(aos_http_controller_t *ctl, aos_http_request_t...
FILE: oss_c_sdk/aos_http_io.h
function APR_INLINE (line 12) | static APR_INLINE const char *aos_http_controller_get_reason(aos_http_co...
type aos_http_transport_t (line 40) | typedef aos_http_transport_t *(*aos_http_transport_create_pt)(aos_pool_t...
FILE: oss_c_sdk/aos_list.h
type aos_list_t (line 7) | typedef struct aos_list_s aos_list_t;
type aos_list_s (line 9) | struct aos_list_s {
function APR_INLINE (line 20) | static APR_INLINE void __aos_list_add(aos_list_t *list, aos_list_t *prev...
function APR_INLINE (line 29) | static APR_INLINE void aos_list_add_tail(aos_list_t *list, aos_list_t *h...
function APR_INLINE (line 34) | static APR_INLINE void __aos_list_del(aos_list_t *prev, aos_list_t *next)
function APR_INLINE (line 41) | static APR_INLINE void aos_list_del(aos_list_t *entry)
function APR_INLINE (line 48) | static APR_INLINE int aos_list_empty(const aos_list_t *head)
function APR_INLINE (line 54) | static APR_INLINE void aos_list_movelist(aos_list_t *list, aos_list_t *n...
FILE: oss_c_sdk/aos_log.c
function aos_log_set_print (line 10) | void aos_log_set_print(aos_log_print_pt p)
function aos_log_set_format (line 15) | void aos_log_set_format(aos_log_format_pt p)
function aos_log_set_level (line 20) | void aos_log_set_level(aos_log_level_e level)
function aos_log_set_output (line 25) | void aos_log_set_output(apr_file_t *output)
function aos_log_print_default (line 30) | void aos_log_print_default(const char *message, int len)
function aos_log_format_default (line 40) | void aos_log_format_default(int level,
FILE: oss_c_sdk/aos_log.h
type aos_log_level_e (line 20) | typedef enum {
FILE: oss_c_sdk/aos_status.c
function aos_status_t (line 25) | aos_status_t *aos_status_create(aos_pool_t *p)
function aos_status_t (line 30) | aos_status_t *aos_status_dup(aos_pool_t *p, aos_status_t *src)
function aos_should_retry (line 39) | int aos_should_retry(aos_status_t *s)
function aos_status_t (line 62) | aos_status_t *aos_status_parse_from_body(aos_pool_t *p, aos_list_t *bc, ...
FILE: oss_c_sdk/aos_status.h
type aos_status_s (line 9) | struct aos_status_s
type aos_status_s (line 11) | struct aos_status_s {
function APR_INLINE (line 18) | static APR_INLINE int aos_status_is_ok(aos_status_t *s)
function APR_INLINE (line 23) | static APR_INLINE int aos_http_is_ok(int st)
FILE: oss_c_sdk/aos_string.c
function aos_strip_str_func (line 12) | static void aos_strip_str_func(aos_string_t *str, aos_is_char_pt func)
function aos_unquote_str (line 32) | void aos_unquote_str(aos_string_t *str)
function aos_strip_space (line 37) | void aos_strip_space(aos_string_t *str)
function aos_trip_space_and_cntrl (line 42) | void aos_trip_space_and_cntrl(aos_string_t *str)
function aos_ends_with (line 47) | int aos_ends_with(const aos_string_t *str, const aos_string_t *suffix)
FILE: oss_c_sdk/aos_string.h
function AOS_CPP_START (line 6) | AOS_CPP_START
function APR_INLINE (line 22) | static APR_INLINE int aos_string_is_empty(const aos_string_t *str)
function APR_INLINE (line 31) | static APR_INLINE void aos_string_tolower(aos_string_t *str)
function APR_INLINE (line 40) | static APR_INLINE char *aos_strlchr(char *p, char *last, char c)
function APR_INLINE (line 51) | static APR_INLINE int aos_is_quote(char c)
function APR_INLINE (line 56) | static APR_INLINE int aos_is_space(char c)
function APR_INLINE (line 61) | static APR_INLINE int aos_is_space_or_cntrl(char c)
function APR_INLINE (line 66) | static APR_INLINE int aos_is_null_string(aos_string_t *str)
FILE: oss_c_sdk/aos_transport.c
function aos_curl_debug_callback (line 22) | static int aos_curl_debug_callback(void *handle, curl_infotype type, cha...
function aos_init_curl_headers (line 39) | static void aos_init_curl_headers(aos_curl_http_transport_t *t)
function aos_init_curl_url (line 63) | static int aos_init_curl_url(aos_curl_http_transport_t *t)
function aos_transport_cleanup (line 104) | static void aos_transport_cleanup(aos_http_transport_t *t)
function aos_http_transport_t (line 126) | aos_http_transport_t *aos_curl_http_transport_create(aos_pool_t *p)
function aos_move_transport_state (line 151) | static void aos_move_transport_state(aos_curl_http_transport_t *t, aos_t...
function aos_curl_response_headers_parse (line 158) | void aos_curl_response_headers_parse(aos_pool_t *p, aos_table_t *headers...
function aos_curl_default_header_callback (line 185) | size_t aos_curl_default_header_callback(char *buffer, size_t size, size_...
function aos_curl_transport_headers_done (line 204) | static void aos_curl_transport_headers_done(aos_curl_http_transport_t *t)
function aos_curl_default_write_callback (line 236) | size_t aos_curl_default_write_callback(char *ptr, size_t size, size_t nm...
function aos_curl_default_read_callback (line 302) | size_t aos_curl_default_read_callback(char *buffer, size_t size, size_t ...
function aos_curl_code_to_status (line 341) | static int aos_curl_code_to_status(CURLcode code)
function aos_curl_transport_finish (line 363) | static void aos_curl_transport_finish(aos_curl_http_transport_t *t)
function aos_curl_transport_setup (line 373) | int aos_curl_transport_setup(aos_curl_http_transport_t *t)
function aos_curl_http_transport_perform (line 477) | int aos_curl_http_transport_perform(aos_http_transport_t *t_)
FILE: oss_c_sdk/aos_transport.h
type aos_http_request_s (line 10) | struct aos_http_request_s
type aos_http_response_t (line 11) | typedef struct aos_http_response_s aos_http_response_t;
type aos_http_transport_t (line 12) | typedef struct aos_http_transport_s aos_http_transport_t;
type aos_http_controller_t (line 13) | typedef struct aos_http_controller_s aos_http_controller_t;
type aos_http_request_options_t (line 15) | typedef struct aos_http_request_options_s aos_http_request_options_t;
type aos_http_transport_options_t (line 16) | typedef struct aos_http_transport_options_s aos_http_transport_options_t;
type aos_curl_http_transport_t (line 17) | typedef struct aos_curl_http_transport_s aos_curl_http_transport_t;
type aos_http_request_options_s (line 28) | struct aos_http_request_options_s {
type aos_http_transport_options_s (line 43) | struct aos_http_transport_options_s {
type aos_http_controller_s (line 58) | struct aos_http_controller_s {
type aos_http_controller_ex_t (line 62) | typedef struct aos_http_controller_ex_s {
type aos_http_body_type_e (line 69) | typedef enum {
type aos_http_request_s (line 75) | struct aos_http_request_s {
type aos_http_response_s (line 104) | struct aos_http_response_s {
type aos_transport_state_e (line 124) | typedef enum {
type aos_curl_http_transport_s (line 146) | struct aos_curl_http_transport_s {
FILE: oss_c_sdk/aos_util.c
function aos_parse_xml_body (line 16) | int aos_parse_xml_body(aos_list_t *bc, mxml_node_t **root)
function aos_convert_to_gmt_time (line 42) | int aos_convert_to_gmt_time(char* date, const char* format, apr_time_exp...
function aos_get_gmt_str_time (line 53) | int aos_get_gmt_str_time(char datestr[AOS_MAX_GMT_TIME_LEN])
function aos_convert_to_iso8601_time (line 74) | int aos_convert_to_iso8601_time(char* date, const char* format, apr_time...
function aos_get_iso8601_str_time (line 86) | int aos_get_iso8601_str_time(char datestr[AOS_MAX_GMT_TIME_LEN])
function aos_get_iso8601_str_time_ex (line 107) | int aos_get_iso8601_str_time_ex(char datestr[AOS_MAX_GMT_TIME_LEN], apr_...
function aos_get_gmt_time_date (line 126) | int aos_get_gmt_time_date(const char *gmt, char datestr[AOS_MAX_SHORT_TI...
function aos_url_encode (line 155) | int aos_url_encode(char *dest, const char *src, int maxSrcSize)
function aos_url_encode_ex (line 187) | int aos_url_encode_ex(char *dest, const char *src, int maxSrcSize, int s...
function aos_encode_hex (line 224) | int aos_encode_hex(char* dest, const void* src, int srclen, int* len)
function aos_query_params_to_string (line 249) | int aos_query_params_to_string(aos_pool_t *p, aos_table_t *query_params,...
function aos_gnome_sort (line 301) | void aos_gnome_sort(const char **headers, int size)
function aos_base64_encode (line 335) | int aos_base64_encode(const unsigned char *in, int inLen, char *out)
function HMAC_SHA1 (line 380) | void HMAC_SHA1(unsigned char hmac[20], const unsigned char *key, int key...
function aos_url_decode (line 438) | int aos_url_decode(const char *in, char *out)
function aos_strtoll (line 485) | long long aos_strtoll(const char *nptr, char **endptr, int base)
function aos_atoi64 (line 593) | int64_t aos_atoi64(const char *nptr)
function aos_strtoull (line 598) | unsigned long long aos_strtoull(const char *nptr, char **endptr, int base)
function aos_atoui64 (line 665) | uint64_t aos_atoui64(const char *nptr)
type SHA256_CTX (line 696) | typedef struct sha256_state {
function sha256_compress (line 734) | static int sha256_compress(struct sha256_state* md, unsigned char* buf)
function SHA256_Init (line 769) | static void SHA256_Init(struct sha256_state* md)
function SHA256_Update (line 789) | static int SHA256_Update(struct sha256_state* md, const unsigned char* i...
function SHA256_Final (line 825) | static int SHA256_Final(unsigned char* out, struct sha256_state* md)
function aos_HMAC_SHA256 (line 859) | void aos_HMAC_SHA256(char hmac[32], const char* key, int key_len, const ...
function aos_SHA256 (line 891) | void aos_SHA256(char hash[32], const char* message, int message_len)
FILE: oss_c_sdk/oss_auth.c
function is_oss_sub_resource (line 58) | static int is_oss_sub_resource(const char *str)
function is_oss_canonicalized_header (line 69) | static int is_oss_canonicalized_header(const char *str)
function oss_get_canonicalized_headers (line 75) | static int oss_get_canonicalized_headers(aos_pool_t *p,
function oss_get_canonicalized_resource (line 139) | static int oss_get_canonicalized_resource(aos_pool_t *p,
function oss_get_string_to_sign (line 194) | int oss_get_string_to_sign(aos_pool_t *p,
function oss_sign_headers (line 255) | void oss_sign_headers(aos_pool_t *p,
function oss_get_signed_headers (line 277) | int oss_get_signed_headers(aos_pool_t *p,
function oss_sign_request (line 300) | int oss_sign_request(aos_http_request_t *req,
function get_oss_request_signature (line 336) | int get_oss_request_signature(const oss_request_options_t *options,
function oss_get_signed_url (line 371) | int oss_get_signed_url(const oss_request_options_t *options,
function oss_get_rtmp_signed_url (line 431) | int oss_get_rtmp_signed_url(const oss_request_options_t *options,
function get_oss_rtmp_request_signature (line 486) | int get_oss_rtmp_request_signature(const oss_request_options_t *options,
function oss_get_rtmp_string_to_sign (line 519) | int oss_get_rtmp_string_to_sign(aos_pool_t *p,
function oss_get_canonicalized_params (line 550) | static int oss_get_canonicalized_params(aos_pool_t *p,
function cmp_table_key_v4 (line 614) | static int cmp_table_key_v4(const void* v1, const void* v2)
function is_oss_signed_header_v4 (line 621) | static int is_oss_signed_header_v4(const char* str)
function oss_build_canonical_request_v4 (line 632) | static int oss_build_canonical_request_v4(aos_pool_t* p, aos_http_reques...
function oss_build_string_to_sign_v4 (line 735) | static int oss_build_string_to_sign_v4(aos_pool_t* p, const aos_string_t...
function oss_build_signing_key_v4 (line 767) | static int oss_build_signing_key_v4(aos_pool_t* p, const aos_string_t* a...
function oss_build_signature_v4 (line 782) | static int oss_build_signature_v4(aos_pool_t* p, const char signing_key[...
function oss_sign_request_v4 (line 797) | static int oss_sign_request_v4(aos_http_request_t *req, const oss_config...
function get_oss_request_signature_v4 (line 892) | static int get_oss_request_signature_v4(const oss_request_options_t *opt...
FILE: oss_c_sdk/oss_bucket.c
function aos_status_t (line 11) | static aos_status_t *oss_create_bucket_with_params(const oss_request_opt...
function aos_status_t (line 51) | aos_status_t *oss_create_bucket(const oss_request_options_t *options,
function aos_status_t (line 68) | aos_status_t *oss_create_bucket_with_storage_class(const oss_request_opt...
function aos_status_t (line 86) | aos_status_t *oss_delete_bucket(const oss_request_options_t *options,
function aos_status_t (line 110) | aos_status_t *oss_put_bucket_acl(const oss_request_options_t *options,
function aos_status_t (line 142) | aos_status_t *oss_get_bucket_acl(const oss_request_options_t *options,
function aos_status_t (line 178) | aos_status_t *oss_head_bucket(const oss_request_options_t *options,
function aos_status_t (line 205) | aos_status_t *oss_get_bucket_location(const oss_request_options_t *options,
function aos_status_t (line 241) | aos_status_t *oss_get_bucket_info(const oss_request_options_t *options,
function aos_status_t (line 277) | aos_status_t *oss_get_bucket_stat(const oss_request_options_t *options,
function aos_status_t (line 313) | aos_status_t *oss_get_bucket_referer(const oss_request_options_t *options,
function aos_status_t (line 349) | aos_status_t *oss_put_bucket_storage_capacity(const oss_request_options_...
function aos_status_t (line 380) | aos_status_t *oss_get_bucket_storage_capacity(const oss_request_options_...
function aos_status_t (line 416) | aos_status_t *oss_list_object(const oss_request_options_t *options,
function aos_status_t (line 459) | aos_status_t *oss_list_bucket(const oss_request_options_t *options,
function aos_status_t (line 505) | aos_status_t *oss_put_bucket_logging(const oss_request_options_t *options,
function aos_status_t (line 538) | aos_status_t *oss_get_bucket_logging(const oss_request_options_t *options,
function aos_status_t (line 574) | aos_status_t *oss_delete_bucket_logging(const oss_request_options_t *opt...
function aos_status_t (line 600) | aos_status_t *oss_put_bucket_lifecycle(const oss_request_options_t *opti...
function aos_status_t (line 632) | aos_status_t *oss_put_bucket_cors(const oss_request_options_t *options,
function aos_status_t (line 664) | aos_status_t *oss_get_bucket_cors(const oss_request_options_t *options,
function aos_status_t (line 700) | aos_status_t *oss_delete_bucket_cors(const oss_request_options_t *options,
function aos_status_t (line 726) | aos_status_t *oss_put_bucket_referer(const oss_request_options_t *options,
function aos_status_t (line 758) | aos_status_t *oss_put_bucket_website(const oss_request_options_t *options,
function aos_status_t (line 790) | aos_status_t *oss_get_bucket_website(const oss_request_options_t *options,
function aos_status_t (line 826) | aos_status_t *oss_delete_bucket_website(const oss_request_options_t *opt...
function aos_status_t (line 852) | aos_status_t *oss_get_bucket_lifecycle(const oss_request_options_t *opti...
function aos_status_t (line 891) | aos_status_t *oss_delete_bucket_lifecycle(const oss_request_options_t *o...
function aos_status_t (line 919) | aos_status_t *oss_delete_objects(const oss_request_options_t *options,
function aos_status_t (line 986) | aos_status_t *oss_delete_objects_by_prefix(oss_request_options_t *options,
FILE: oss_c_sdk/oss_define.h
type oss_lib_curl_initializer_t (line 123) | typedef struct oss_lib_curl_initializer_s oss_lib_curl_initializer_t;
type oss_acl_e (line 138) | typedef enum {
type oss_storage_class_type_e (line 145) | typedef enum {
type oss_tier_type_e (line 153) | typedef enum {
type oss_config_t (line 159) | typedef struct {
type oss_create_bucket_params_t (line 174) | typedef struct {
type oss_request_options_t (line 179) | typedef struct {
type oss_list_object_content_t (line 185) | typedef struct {
type oss_list_bucket_content_t (line 197) | typedef struct {
type oss_list_object_common_prefix_t (line 207) | typedef struct {
type oss_list_multipart_upload_content_t (line 212) | typedef struct {
type oss_list_part_content_t (line 219) | typedef struct {
type oss_complete_part_content_t (line 227) | typedef struct {
type oss_upload_part_t (line 233) | typedef struct {
type oss_list_object_params_t (line 238) | typedef struct {
type oss_list_buckets_params_t (line 249) | typedef struct {
type oss_list_upload_part_params_t (line 260) | typedef struct {
type oss_list_multipart_upload_params_t (line 268) | typedef struct {
type oss_upload_part_copy_params_t (line 280) | typedef struct {
type oss_upload_file_t (line 291) | typedef struct {
type oss_lifecycle_rule_date_t (line 297) | typedef struct {
type oss_lifecycle_rule_content_t (line 302) | typedef struct {
type oss_sub_cors_rule_t (line 314) | typedef struct {
type oss_cors_rule_t (line 319) | typedef struct {
type oss_referer_t (line 328) | typedef struct {
type oss_referer_config_t (line 333) | typedef struct {
type oss_website_config_t (line 338) | typedef struct {
type oss_logging_config_content_t (line 343) | typedef struct {
type oss_bucket_info_t (line 350) | typedef struct {
type oss_bucket_stat_t (line 361) | typedef struct {
type oss_object_key_t (line 367) | typedef struct {
type oss_content_type_t (line 372) | typedef struct {
type oss_resumable_clt_params_t (line 377) | typedef struct {
type oss_live_channel_target_t (line 384) | typedef struct {
type oss_live_channel_configuration_t (line 391) | typedef struct {
type oss_live_channel_publish_url_t (line 398) | typedef struct {
type oss_live_channel_play_url_t (line 403) | typedef struct {
type oss_video_stat_t (line 408) | typedef struct {
type oss_audio_stat_t (line 416) | typedef struct {
type oss_live_channel_stat_t (line 422) | typedef struct {
type oss_live_channel_content_t (line 430) | typedef struct {
type oss_list_live_channel_params_t (line 440) | typedef struct {
type oss_live_record_content_t (line 449) | typedef struct {
type oss_select_object_input_param_t (line 456) | typedef struct {
type oss_select_object_output_param_t (line 466) | typedef struct {
type oss_select_object_option_param_t (line 475) | typedef struct {
type oss_select_object_params_t (line 479) | typedef struct {
type oss_select_object_meta_params_t (line 485) | typedef struct {
type oss_tag_content_t (line 496) | typedef struct {
FILE: oss_c_sdk/oss_live.c
function aos_status_t (line 12) | aos_status_t *oss_create_live_channel(const oss_request_options_t *options,
function aos_status_t (line 60) | aos_status_t *oss_put_live_channel_status(const oss_request_options_t *o...
function aos_status_t (line 93) | aos_status_t *oss_get_live_channel_info(const oss_request_options_t *opt...
function aos_status_t (line 134) | aos_status_t *oss_get_live_channel_stat(const oss_request_options_t *opt...
function aos_status_t (line 175) | aos_status_t *oss_delete_live_channel(const oss_request_options_t *options,
function aos_status_t (line 204) | aos_status_t *oss_list_live_channel(const oss_request_options_t *options,
function aos_status_t (line 247) | aos_status_t *oss_get_live_channel_history(const oss_request_options_t *...
function aos_status_t (line 288) | aos_status_t *oss_gen_vod_play_list(const oss_request_options_t *options,
FILE: oss_c_sdk/oss_multipart.c
function aos_status_t (line 11) | aos_status_t *oss_init_multipart_upload(const oss_request_options_t *opt...
function aos_status_t (line 51) | aos_status_t *oss_abort_multipart_upload(const oss_request_options_t *op...
function aos_status_t (line 81) | aos_status_t *oss_list_upload_part(const oss_request_options_t *options,
function aos_status_t (line 126) | aos_status_t *oss_list_multipart_upload(const oss_request_options_t *opt...
function aos_status_t (line 171) | aos_status_t *oss_complete_multipart_upload(const oss_request_options_t ...
function aos_status_t (line 183) | aos_status_t *oss_do_complete_multipart_upload(const oss_request_options...
function aos_status_t (line 222) | aos_status_t *oss_upload_part_from_buffer(const oss_request_options_t *o...
function aos_status_t (line 234) | aos_status_t *oss_do_upload_part_from_buffer(const oss_request_options_t...
function aos_status_t (line 277) | aos_status_t *oss_upload_part_from_file(const oss_request_options_t *opt...
function aos_status_t (line 289) | aos_status_t *oss_do_upload_part_from_file(const oss_request_options_t *...
function aos_status_t (line 339) | aos_status_t *oss_upload_part_copy(const oss_request_options_t *options,
function aos_status_t (line 387) | aos_status_t *oss_get_sorted_uploaded_part(oss_request_options_t *options,
function aos_status_t (line 461) | aos_status_t *oss_upload_file(oss_request_options_t *options,
FILE: oss_c_sdk/oss_object.c
function aos_status_t (line 38) | aos_status_t *oss_put_object_from_buffer(const oss_request_options_t *op...
function aos_status_t (line 49) | aos_status_t *oss_do_put_object_from_buffer(const oss_request_options_t ...
function aos_status_t (line 88) | aos_status_t *oss_put_object_from_file(const oss_request_options_t *opti...
function aos_status_t (line 99) | aos_status_t *oss_do_put_object_from_file(const oss_request_options_t *o...
function aos_status_t (line 146) | aos_status_t *oss_get_object_to_buffer(const oss_request_options_t *opti...
function aos_status_t (line 158) | aos_status_t *oss_do_get_object_to_buffer(const oss_request_options_t *o...
function aos_status_t (line 192) | aos_status_t *oss_restore_object(const oss_request_options_t *options,
function aos_status_t (line 229) | aos_status_t *oss_restore_object_with_tier(const oss_request_options_t *...
function aos_status_t (line 265) | aos_status_t *oss_get_object_to_file(const oss_request_options_t *options,
function aos_status_t (line 277) | aos_status_t *oss_do_get_object_to_file(const oss_request_options_t *opt...
function aos_status_t (line 323) | aos_status_t *oss_head_object(const oss_request_options_t *options,
function aos_status_t (line 350) | aos_status_t *oss_get_object_meta(const oss_request_options_t *options,
function aos_status_t (line 379) | aos_status_t *oss_put_object_acl(const oss_request_options_t *options,
function aos_status_t (line 422) | aos_status_t *oss_get_object_acl(const oss_request_options_t *options,
function aos_status_t (line 470) | aos_status_t *oss_put_symlink(const oss_request_options_t *options,
function aos_status_t (line 479) | aos_status_t *oss_do_put_symlink(const oss_request_options_t *options,
function aos_status_t (line 509) | aos_status_t *oss_get_symlink(const oss_request_options_t *options,
function aos_status_t (line 537) | aos_status_t *oss_delete_object(const oss_request_options_t *options,
function aos_status_t (line 564) | aos_status_t *oss_copy_object(const oss_request_options_t *options,
function aos_status_t (line 609) | aos_status_t *oss_append_object_from_buffer(const oss_request_options_t ...
function aos_status_t (line 645) | aos_status_t *oss_do_append_object_from_buffer(const oss_request_options...
function aos_status_t (line 690) | aos_status_t *oss_append_object_from_file(const oss_request_options_t *o...
function aos_status_t (line 733) | aos_status_t *oss_do_append_object_from_file(const oss_request_options_t...
function aos_status_t (line 785) | aos_status_t *oss_put_object_from_buffer_by_url(const oss_request_option...
function aos_status_t (line 815) | aos_status_t *oss_put_object_from_file_by_url(const oss_request_options_...
function aos_status_t (line 850) | aos_status_t *oss_get_object_to_buffer_by_url(const oss_request_options_...
function aos_status_t (line 879) | aos_status_t *oss_get_object_to_file_by_url(const oss_request_options_t ...
function aos_status_t (line 921) | aos_status_t *oss_head_object_by_url(const oss_request_options_t *options,
function aos_status_t (line 943) | aos_status_t *oss_select_object_to_buffer(const oss_request_options_t *o...
function aos_status_t (line 956) | aos_status_t *oss_do_select_object_to_buffer(const oss_request_options_t...
function aos_status_t (line 1017) | aos_status_t *oss_select_object_to_file(const oss_request_options_t *opt...
function aos_status_t (line 1031) | aos_status_t *oss_do_select_object_to_file(const oss_request_options_t *...
function aos_status_t (line 1104) | aos_status_t *oss_create_select_object_meta(const oss_request_options_t ...
function aos_status_t (line 1161) | aos_status_t *oss_put_object_tagging(const oss_request_options_t *options,
function aos_status_t (line 1196) | aos_status_t *oss_get_object_tagging(const oss_request_options_t *options,
function aos_status_t (line 1234) | aos_status_t *oss_delete_object_tagging(const oss_request_options_t *opt...
FILE: oss_c_sdk/oss_resumable.c
function oss_get_thread_num (line 13) | int32_t oss_get_thread_num(oss_resumable_clt_params_t *clt_params)
function oss_get_upload_checkpoint_path (line 21) | void oss_get_upload_checkpoint_path(oss_resumable_clt_params_t *clt_para...
function oss_get_download_checkpoint_path (line 40) | void oss_get_download_checkpoint_path(oss_resumable_clt_params_t *clt_pa...
function oss_get_file_info (line 59) | int oss_get_file_info(const aos_string_t *filepath, aos_pool_t *pool, ap...
function oss_does_file_exist (line 82) | int oss_does_file_exist(const aos_string_t *filepath, aos_pool_t *pool)
function oss_open_checkpoint_file (line 96) | int oss_open_checkpoint_file(aos_pool_t *pool, aos_string_t *checkpoint...
function oss_get_part_num (line 110) | int oss_get_part_num(int64_t file_size, int64_t part_size)
function oss_build_parts (line 119) | void oss_build_parts(int64_t file_size, int64_t part_size, oss_checkpoin...
function oss_build_thread_params (line 130) | void oss_build_thread_params(oss_thread_params_t *thd_params, int part_num,
function oss_destroy_thread_pool (line 159) | void oss_destroy_thread_pool(oss_thread_params_t *thd_params, int part_num)
function oss_set_task_tracker (line 167) | void oss_set_task_tracker(oss_thread_params_t *thd_params, int part_num,
function oss_verify_checkpoint_md5 (line 181) | int oss_verify_checkpoint_md5(aos_pool_t *pool, const oss_checkpoint_t *...
function oss_build_upload_checkpoint (line 186) | void oss_build_upload_checkpoint(aos_pool_t *pool, oss_checkpoint_t *che...
function oss_build_download_checkpoint (line 208) | void oss_build_download_checkpoint(aos_pool_t *pool, oss_checkpoint_t *c...
function oss_dump_checkpoint (line 234) | int oss_dump_checkpoint(aos_pool_t *pool, const oss_checkpoint_t *checkp...
function oss_load_checkpoint (line 272) | int oss_load_checkpoint(aos_pool_t *pool, const aos_string_t *filepath, ...
function oss_is_upload_checkpoint_valid (line 312) | int oss_is_upload_checkpoint_valid(aos_pool_t *pool, oss_checkpoint_t *c...
function oss_is_download_checkpoint_valid (line 323) | int oss_is_download_checkpoint_valid(aos_pool_t *pool,
function oss_update_checkpoint (line 340) | void oss_update_checkpoint(aos_pool_t *pool, oss_checkpoint_t *checkpoint,
function oss_get_checkpoint_todo_parts (line 350) | void oss_get_checkpoint_todo_parts(oss_checkpoint_t *checkpoint, int *pa...
function oss_get_checkpoint_done_parts_size (line 367) | static void oss_get_checkpoint_done_parts_size(oss_checkpoint_t *checkpo...
function aos_status_t (line 416) | aos_status_t *oss_resumable_upload_file_without_cp(oss_request_options_t...
function aos_status_t (line 572) | aos_status_t *oss_resumable_upload_file_with_cp(oss_request_options_t *o...
function aos_status_t (line 776) | aos_status_t *oss_resumable_upload_file(oss_request_options_t *options,
function download_part (line 825) | static void download_part(oss_request_options_t *options,
function aos_status_t (line 916) | aos_status_t *oss_resumable_download_file_internal(oss_request_options_t...
function aos_status_t (line 1161) | aos_status_t *oss_resumable_download_file(oss_request_options_t *options,
FILE: oss_c_sdk/oss_resumable.h
type oss_checkpoint_part_t (line 17) | typedef struct {
type oss_checkpoint_t (line 26) | typedef struct {
type oss_part_task_result_t (line 48) | typedef struct {
type oss_thread_params_t (line 55) | typedef struct {
FILE: oss_c_sdk/oss_util.c
function starts_with (line 120) | static int starts_with(const aos_string_t *str, const char *prefix) {
function generate_proto (line 131) | static void generate_proto(const oss_request_options_t *options,
function generate_rtmp_proto (line 142) | static void generate_rtmp_proto(const oss_request_options_t *options,
function is_valid_ip (line 149) | int is_valid_ip(const char *str)
function oss_preprocess_endpoint (line 161) | void oss_preprocess_endpoint(aos_string_t *endpoint)
function oss_config_t (line 207) | oss_config_t *oss_config_create(aos_pool_t *p)
function oss_config_resolve (line 212) | void oss_config_resolve(aos_pool_t *pool, oss_config_t *config, aos_http...
function oss_request_options_t (line 230) | oss_request_options_t *oss_request_options_create(aos_pool_t *p)
function oss_get_object_uri (line 248) | void oss_get_object_uri(const oss_request_options_t *options,
function oss_get_service_uri (line 289) | void oss_get_service_uri(const oss_request_options_t *options,
function oss_get_bucket_uri (line 316) | void oss_get_bucket_uri(const oss_request_options_t *options,
function oss_get_rtmp_uri (line 355) | void oss_get_rtmp_uri(const oss_request_options_t *options,
function oss_write_request_body_from_buffer (line 396) | void oss_write_request_body_from_buffer(aos_list_t *buffer,
function oss_write_request_body_from_file (line 403) | int oss_write_request_body_from_file(aos_pool_t *p,
function oss_write_request_body_from_upload_file (line 424) | int oss_write_request_body_from_upload_file(aos_pool_t *p,
function oss_fill_read_response_body (line 447) | void oss_fill_read_response_body(aos_http_response_t *resp,
function oss_init_read_response_body_to_file (line 455) | int oss_init_read_response_body_to_file(aos_pool_t *p,
function oss_init_read_response_body_to_fb (line 474) | int oss_init_read_response_body_to_fb(aos_file_buf_t *fb,
function oss_fill_read_response_header (line 488) | void oss_fill_read_response_header(aos_http_response_t *resp,
function oss_list_bucket_content_t (line 512) | oss_list_bucket_content_t *oss_create_list_bucket_content(aos_pool_t *p)
function oss_bucket_info_t (line 518) | oss_bucket_info_t *oss_create_bucket_info(aos_pool_t *p)
function oss_list_object_content_t (line 524) | oss_list_object_content_t *oss_create_list_object_content(aos_pool_t *p)
function oss_list_object_common_prefix_t (line 530) | oss_list_object_common_prefix_t *oss_create_list_object_common_prefix(ao...
function oss_list_multipart_upload_content_t (line 536) | oss_list_multipart_upload_content_t *oss_create_list_multipart_upload_co...
function oss_list_part_content_t (line 542) | oss_list_part_content_t *oss_create_list_part_content(aos_pool_t *p)
function oss_complete_part_content_t (line 551) | oss_complete_part_content_t *oss_create_complete_part_content(aos_pool_t...
function oss_list_object_params_t (line 560) | oss_list_object_params_t *oss_create_list_object_params(aos_pool_t *p)
function oss_list_buckets_params_t (line 575) | oss_list_buckets_params_t *oss_create_list_buckets_params(aos_pool_t *p)
function oss_list_upload_part_params_t (line 591) | oss_list_upload_part_params_t *oss_create_list_upload_part_params(aos_po...
function oss_list_multipart_upload_params_t (line 603) | oss_list_multipart_upload_params_t *oss_create_list_multipart_upload_par...
function oss_upload_part_copy_params_t (line 618) | oss_upload_part_copy_params_t *oss_create_upload_part_copy_params(aos_po...
function APR_INLINE (line 624) | static APR_INLINE void oss_init_lifecycle_rule_date(oss_lifecycle_rule_d...
function oss_logging_config_content_t (line 630) | oss_logging_config_content_t *oss_create_logging_rule_content(aos_pool_t...
function oss_lifecycle_rule_content_t (line 641) | oss_lifecycle_rule_content_t *oss_create_lifecycle_rule_content(aos_pool...
function oss_create_sub_cors_rule (line 657) | void oss_create_sub_cors_rule(aos_pool_t *p, aos_list_t *list, char *rul...
function oss_cors_rule_t (line 665) | oss_cors_rule_t *oss_create_cors_rule(aos_pool_t *p)
function oss_referer_t (line 680) | oss_referer_t * oss_create_and_add_refer(aos_pool_t *p, oss_referer_conf...
function oss_upload_file_t (line 694) | oss_upload_file_t *oss_create_upload_file(aos_pool_t *p)
function oss_object_key_t (line 699) | oss_object_key_t *oss_create_oss_object_key(aos_pool_t *p)
function oss_live_channel_publish_url_t (line 704) | oss_live_channel_publish_url_t *oss_create_live_channel_publish_url(aos_...
function oss_live_channel_play_url_t (line 709) | oss_live_channel_play_url_t *oss_create_live_channel_play_url(aos_pool_t...
function oss_live_channel_content_t (line 714) | oss_live_channel_content_t *oss_create_list_live_channel_content(aos_poo...
function oss_live_record_content_t (line 724) | oss_live_record_content_t *oss_create_live_record_content(aos_pool_t *p)
function oss_live_channel_configuration_t (line 732) | oss_live_channel_configuration_t *oss_create_live_channel_configuration_...
function oss_checkpoint_t (line 749) | oss_checkpoint_t *oss_create_checkpoint_content(aos_pool_t *p)
function oss_resumable_clt_params_t (line 764) | oss_resumable_clt_params_t *oss_create_resumable_clt_params_content(aos_...
function oss_list_live_channel_params_t (line 778) | oss_list_live_channel_params_t *oss_create_list_live_channel_params(aos_...
function oss_select_object_params_t (line 791) | oss_select_object_params_t *oss_create_select_object_params(aos_pool_t *p)
function oss_select_object_meta_params_t (line 816) | oss_select_object_meta_params_t *oss_create_select_object_meta_params(ao...
function oss_init_request (line 875) | void oss_init_request(const oss_request_options_t *options,
function oss_init_service_request (line 890) | void oss_init_service_request(const oss_request_options_t *options,
function oss_init_bucket_request (line 901) | void oss_init_bucket_request(const oss_request_options_t *options,
function oss_init_object_request (line 913) | void oss_init_object_request(const oss_request_options_t *options,
function oss_init_live_channel_request (line 935) | void oss_init_live_channel_request(const oss_request_options_t *options,
function oss_init_signed_url_request (line 948) | void oss_init_signed_url_request(const oss_request_options_t *options,
function aos_status_t (line 964) | aos_status_t *oss_send_request(aos_http_controller_t *ctl,
function aos_status_t (line 995) | aos_status_t *oss_process_request(const oss_request_options_t *options,
function aos_status_t (line 1017) | aos_status_t *oss_process_signed_request(const oss_request_options_t *op...
function oss_get_part_size (line 1024) | void oss_get_part_size(int64_t filesize, int64_t *part_size)
function part_sort_cmp (line 1036) | int part_sort_cmp(const void *a, const void *b)
function oss_headers_add_range (line 1043) | void oss_headers_add_range(apr_pool_t *pool, apr_table_t *headers, int64...
function set_content_type (line 1076) | void set_content_type(const char* file_name,
function aos_table_t (line 1097) | aos_table_t* aos_table_create_if_null(const oss_request_options_t *options,
function is_enable_crc (line 1107) | int is_enable_crc(const oss_request_options_t *options)
function has_crc_in_response (line 1112) | int has_crc_in_response(const aos_http_response_t *resp)
function has_range_or_process_in_request (line 1121) | int has_range_or_process_in_request(const aos_http_request_t *req)
function check_crc (line 1131) | static int check_crc(uint64_t crc, const apr_table_t *headers)
function oss_check_crc_consistent (line 1140) | int oss_check_crc_consistent(uint64_t crc, const apr_table_t *resp_heade...
function oss_get_temporary_file_name (line 1149) | int oss_get_temporary_file_name(aos_pool_t *p, const aos_string_t *filen...
function oss_temp_file_rename (line 1163) | int oss_temp_file_rename(aos_status_t *s, const char *from_path, const c...
type select_object_depack_frame (line 1181) | typedef struct
function oss_init_depack_frame (line 1196) | static void oss_init_depack_frame(aos_http_response_t *resp)
function oss_depack_frame (line 1213) | static int oss_depack_frame(select_object_depack_frame *depack, const ch...
function oss_write_select_object_to (line 1278) | static int oss_write_select_object_to(aos_http_response_t *resp, const c...
function oss_write_select_object_body (line 1288) | static int oss_write_select_object_body(aos_http_response_t *resp, const...
function oss_init_select_object_read_response_body (line 1357) | int oss_init_select_object_read_response_body(aos_pool_t *p, aos_http_re...
function oss_check_select_object_status (line 1375) | void oss_check_select_object_status(aos_http_response_t *resp, aos_statu...
function oss_init_create_select_object_meta_read_response_body (line 1410) | int oss_init_create_select_object_meta_read_response_body(aos_pool_t *p,...
function oss_check_create_select_object_meta_status (line 1428) | void oss_check_create_select_object_meta_status(aos_http_response_t *res...
function oss_tag_content_t (line 1499) | oss_tag_content_t *oss_create_tag_content(aos_pool_t *p)
function oss_is_valid_bucket_name (line 1504) | int oss_is_valid_bucket_name(const aos_string_t *str)
function aos_status_t (line 1529) | aos_status_t *oss_get_bucket_name_invalid_error()
function oss_is_valid_object_name (line 1541) | int oss_is_valid_object_name(const aos_string_t* str)
function oss_is_valid_object_name_ex (line 1549) | int oss_is_valid_object_name_ex(const aos_string_t* str, int strict)
function aos_status_t (line 1563) | aos_status_t* oss_get_object_name_invalid_error()
function oss_is_valid_host (line 1575) | int oss_is_valid_host(const char *host)
function is_verify_object_strict (line 1620) | int is_verify_object_strict(const oss_request_options_t* options)
FILE: oss_c_sdk/oss_xml.c
function get_truncated_from_xml (line 14) | int get_truncated_from_xml(aos_pool_t *p, mxml_node_t *xml_node, const c...
function get_xmldoc (line 50) | int get_xmldoc(aos_list_t *bc, mxml_node_t **root)
function oss_acl_parse_from_body (line 80) | int oss_acl_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_string_t ...
function oss_location_parse_from_body (line 99) | int oss_location_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_stri...
function oss_storage_capacity_parse_from_body (line 118) | int oss_storage_capacity_parse_from_body(aos_pool_t *p, aos_list_t *bc, ...
function oss_logging_parse_from_body (line 137) | int oss_logging_parse_from_body(aos_pool_t *p, aos_list_t *bc, oss_loggi...
function oss_list_objects_owner_parse (line 176) | void oss_list_objects_owner_parse(aos_pool_t *p, mxml_node_t *xml_node, ...
function oss_list_objects_content_parse (line 198) | void oss_list_objects_content_parse(aos_pool_t *p, mxml_node_t *xml_node...
function oss_list_objects_contents_parse (line 258) | void oss_list_objects_contents_parse(aos_pool_t *p, mxml_node_t *root, c...
function oss_list_objects_prefix_parse (line 273) | void oss_list_objects_prefix_parse(aos_pool_t *p, mxml_node_t *xml_node,...
function oss_list_objects_common_prefix_parse (line 287) | void oss_list_objects_common_prefix_parse(aos_pool_t *p, mxml_node_t *xm...
function oss_list_objects_parse_from_body (line 302) | int oss_list_objects_parse_from_body(aos_pool_t *p, aos_list_t *bc,
function oss_list_buckets_content_parse (line 331) | void oss_list_buckets_content_parse(aos_pool_t *p, mxml_node_t *xml_node...
function oss_list_node_contents_parse (line 388) | void oss_list_node_contents_parse(aos_pool_t *p, mxml_node_t *root, cons...
function oss_list_buckets_contents_parse (line 399) | void oss_list_buckets_contents_parse(aos_pool_t *p, mxml_node_t *root, c...
function oss_list_buckets_parse_from_body (line 405) | int oss_list_buckets_parse_from_body(aos_pool_t *p, aos_list_t *bc,
function oss_get_bucket_info_parse_from_body (line 443) | int oss_get_bucket_info_parse_from_body(aos_pool_t *p, aos_list_t *bc,
function oss_get_bucket_stat_parse_from_body (line 499) | int oss_get_bucket_stat_parse_from_body(aos_pool_t *p, aos_list_t *bc,
function oss_get_bucket_website_parse_from_body (line 529) | int oss_get_bucket_website_parse_from_body(aos_pool_t *p, aos_list_t *bc,
function parse_referer_str (line 554) | void parse_referer_str(aos_pool_t *p, mxml_node_t *xml_node, aos_list_t ...
function oss_get_bucket_referer_config_parse_from_body (line 566) | int oss_get_bucket_referer_config_parse_from_body(aos_pool_t *p, aos_lis...
function parse_sub_ctors_rule (line 592) | void parse_sub_ctors_rule(aos_pool_t *p, mxml_node_t *xml_node, aos_list...
function oss_cors_rule_content_parse (line 603) | void oss_cors_rule_content_parse(aos_pool_t *p, mxml_node_t *xml_node, a...
function oss_get_bucket_cors_parse_from_body (line 635) | int oss_get_bucket_cors_parse_from_body(aos_pool_t *p, aos_list_t *bc,
function oss_upload_id_parse_from_body (line 651) | int oss_upload_id_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_str...
function oss_list_parts_contents_parse (line 670) | void oss_list_parts_contents_parse(aos_pool_t *p, mxml_node_t *root, con...
function oss_list_parts_content_parse (line 685) | void oss_list_parts_content_parse(aos_pool_t *p, mxml_node_t *xml_node, ...
function oss_list_parts_parse_from_body (line 723) | int oss_list_parts_parse_from_body(aos_pool_t *p, aos_list_t *bc,
function oss_list_multipart_uploads_contents_parse (line 751) | void oss_list_multipart_uploads_contents_parse(aos_pool_t *p, mxml_node_...
function oss_list_multipart_uploads_content_parse (line 766) | void oss_list_multipart_uploads_content_parse(aos_pool_t *p, mxml_node_t...
function oss_list_multipart_uploads_parse_from_body (line 797) | int oss_list_multipart_uploads_parse_from_body(aos_pool_t *p, aos_list_t...
function build_complete_multipart_upload_body (line 864) | void build_complete_multipart_upload_body(aos_pool_t *p, aos_list_t *par...
function build_bucket_logging_body (line 909) | void build_bucket_logging_body(aos_pool_t *p, oss_logging_config_content...
function build_lifecycle_body (line 988) | void build_lifecycle_body(aos_pool_t *p, aos_list_t *lifecycle_rule_list...
function build_referer_config_body (line 1032) | void build_referer_config_body(aos_pool_t *p, oss_referer_config_t *refe...
function build_cors_rule_body (line 1099) | void build_cors_rule_body(aos_pool_t *p, aos_list_t *rule_list, aos_list...
function build_website_config_body (line 1142) | void build_website_config_body(aos_pool_t *p, oss_website_config_t *webs...
function build_bucket_storage_class (line 1185) | void build_bucket_storage_class(aos_pool_t *p, oss_storage_class_type_e ...
function build_bucket_storage_capacity_body (line 1227) | void build_bucket_storage_capacity_body(aos_pool_t *p, long storage_capa...
function oss_lifecycle_rules_parse_from_body (line 1240) | int oss_lifecycle_rules_parse_from_body(aos_pool_t *p, aos_list_t *bc, a...
function oss_lifecycle_rule_contents_parse (line 1255) | void oss_lifecycle_rule_contents_parse(aos_pool_t *p, mxml_node_t *root,...
function oss_lifecycle_rule_content_parse (line 1270) | void oss_lifecycle_rule_content_parse(aos_pool_t *p, mxml_node_t * xml_n...
function oss_lifecycle_rule_date_parse (line 1319) | void oss_lifecycle_rule_date_parse(aos_pool_t *p, mxml_node_t * xml_node,
function oss_lifecycle_rule_expire_parse (line 1343) | void oss_lifecycle_rule_expire_parse(aos_pool_t *p, mxml_node_t * xml_node,
function oss_lifecycle_rule_tag_parse (line 1374) | void oss_lifecycle_rule_tag_parse(aos_pool_t *p, mxml_node_t * xml_node,
function oss_delete_objects_contents_parse (line 1397) | void oss_delete_objects_contents_parse(aos_pool_t *p, mxml_node_t *root,...
function oss_object_key_parse (line 1411) | void oss_object_key_parse(aos_pool_t *p, mxml_node_t * xml_node,
function oss_delete_objects_parse_from_body (line 1429) | int oss_delete_objects_parse_from_body(aos_pool_t *p, aos_list_t *bc, ao...
function oss_publish_url_parse (line 1444) | void oss_publish_url_parse(aos_pool_t *p, mxml_node_t *node, oss_live_ch...
function oss_play_url_parse (line 1456) | void oss_play_url_parse(aos_pool_t *p, mxml_node_t *node, oss_live_chann...
function oss_publish_urls_contents_parse (line 1468) | void oss_publish_urls_contents_parse(aos_pool_t *p, mxml_node_t *root, c...
function oss_play_urls_contents_parse (line 1482) | void oss_play_urls_contents_parse(aos_pool_t *p, mxml_node_t *root, cons...
function oss_create_live_channel_content_parse (line 1496) | void oss_create_live_channel_content_parse(aos_pool_t *p, mxml_node_t *r...
function oss_create_live_channel_parse_from_body (line 1514) | int oss_create_live_channel_parse_from_body(aos_pool_t *p, aos_list_t *bc,
function build_create_live_channel_body (line 1587) | void build_create_live_channel_body(aos_pool_t *p, oss_live_channel_conf...
function oss_live_channel_info_target_content_parse (line 1599) | void oss_live_channel_info_target_content_parse(aos_pool_t *p, mxml_node...
function oss_live_channel_info_content_parse (line 1637) | void oss_live_channel_info_content_parse(aos_pool_t *p, mxml_node_t *roo...
function oss_live_channel_info_parse_from_body (line 1671) | int oss_live_channel_info_parse_from_body(aos_pool_t *p, aos_list_t *bc,...
function oss_live_channel_stat_video_content_parse (line 1686) | void oss_live_channel_stat_video_content_parse(aos_pool_t *p, mxml_node_...
function oss_live_channel_stat_audio_content_parse (line 1732) | void oss_live_channel_stat_audio_content_parse(aos_pool_t *p, mxml_node_...
function oss_live_channel_stat_content_parse (line 1762) | void oss_live_channel_stat_content_parse(aos_pool_t *p, mxml_node_t *roo...
function oss_live_channel_stat_parse_from_body (line 1807) | int oss_live_channel_stat_parse_from_body(aos_pool_t *p, aos_list_t *bc,...
function oss_list_live_channel_content_parse (line 1822) | void oss_list_live_channel_content_parse(aos_pool_t *p, mxml_node_t *xml...
function oss_list_live_channel_contents_parse (line 1873) | void oss_list_live_channel_contents_parse(aos_pool_t *p, mxml_node_t *ro...
function oss_list_live_channel_parse_from_body (line 1888) | int oss_list_live_channel_parse_from_body(aos_pool_t *p, aos_list_t *bc,
function oss_live_channel_history_content_parse (line 1915) | void oss_live_channel_history_content_parse(aos_pool_t *p, mxml_node_t *...
function oss_live_channel_history_contents_parse (line 1946) | void oss_live_channel_history_contents_parse(aos_pool_t *p, mxml_node_t ...
function oss_live_channel_history_parse_from_body (line 1961) | int oss_live_channel_history_parse_from_body(aos_pool_t *p, aos_list_t *...
function build_delete_objects_body (line 2009) | void build_delete_objects_body(aos_pool_t *p, aos_list_t *object_list, i...
function mxml_node_t (line 2021) | mxml_node_t *set_xmlnode_value_str(mxml_node_t *parent, const char *name...
function mxml_node_t (line 2030) | mxml_node_t *set_xmlnode_value_int(mxml_node_t *parent, const char *name...
function mxml_node_t (line 2039) | mxml_node_t *set_xmlnode_value_int64(mxml_node_t *parent, const char *na...
function mxml_node_t (line 2048) | mxml_node_t *set_xmlnode_value_uint64(mxml_node_t *parent, const char *n...
function get_xmlnode_value_str (line 2057) | int get_xmlnode_value_str(aos_pool_t *p, mxml_node_t *xml_node, const ch...
function get_xmlnode_value_int (line 2068) | int get_xmlnode_value_int(aos_pool_t *p, mxml_node_t *xml_node, const ch...
function get_xmlnode_value_int64 (line 2079) | int get_xmlnode_value_int64(aos_pool_t *p, mxml_node_t *xml_node, const ...
function get_xmlnode_value_uint64 (line 2090) | int get_xmlnode_value_uint64(aos_pool_t *p, mxml_node_t *xml_node, const...
function oss_checkpoint_parse_from_body (line 2184) | int oss_checkpoint_parse_from_body(aos_pool_t *p, const char *xml_body, ...
function oss_build_select_object_body (line 2435) | void oss_build_select_object_body(aos_pool_t *p,
function oss_build_create_select_object_meta_body (line 2531) | void oss_build_create_select_object_meta_body(aos_pool_t *p,
function build_object_tagging_body (line 2579) | void build_object_tagging_body(aos_pool_t *p, aos_list_t *tag_list, aos_...
function oss_get_tagging_parse_from_body (line 2589) | int oss_get_tagging_parse_from_body(aos_pool_t *p, aos_list_t *bc, aos_l...
function oss_build_restore_object_body (line 2628) | void oss_build_restore_object_body(aos_pool_t *p, oss_tier_type_e tier, ...
FILE: oss_c_sdk_sample/main.c
function main (line 26) | int main(int argc, char *argv[])
FILE: oss_c_sdk_sample/oss_append_object_sample.c
function append_object_from_buffer (line 11) | void append_object_from_buffer()
function append_object_from_file (line 69) | void append_object_from_file()
function append_object_sample (line 122) | void append_object_sample()
FILE: oss_c_sdk_sample/oss_callback_sample.c
function put_object_from_buffer_with_callback (line 11) | void put_object_from_buffer_with_callback()
function multipart_from_buffer_with_callback (line 84) | void multipart_from_buffer_with_callback()
function callback_sample (line 218) | void callback_sample()
FILE: oss_c_sdk_sample/oss_crc_sample.c
function append_object_from_buffer_with_crc (line 11) | void append_object_from_buffer_with_crc()
function append_object_from_file_with_crc (line 64) | void append_object_from_file_with_crc()
function disable_crc (line 117) | void disable_crc()
function crc_sample (line 172) | void crc_sample()
FILE: oss_c_sdk_sample/oss_delete_object_sample.c
function delete_object (line 11) | void delete_object()
function delete_objects (line 38) | void delete_objects()
function delete_object_sample (line 80) | void delete_object_sample()
FILE: oss_c_sdk_sample/oss_get_object_acl_sample.c
function get_object_acl (line 11) | void get_object_acl(){
function get_object_acl_sample (line 38) | void get_object_acl_sample(){
FILE: oss_c_sdk_sample/oss_get_object_meta_sample.c
function get_object_meta (line 8) | void get_object_meta()
function get_object_meta_sample (line 43) | void get_object_meta_sample()
FILE: oss_c_sdk_sample/oss_get_object_sample.c
function get_object_to_buffer (line 11) | void get_object_to_buffer()
function get_object_to_local_file (line 64) | void get_object_to_local_file()
function get_object_to_buffer_with_range (line 97) | void get_object_to_buffer_with_range()
function get_object_to_local_file_with_range (line 154) | void get_object_to_local_file_with_range()
function get_object_by_signed_url (line 191) | void get_object_by_signed_url()
function get_oss_dir_to_local_dir (line 248) | void get_oss_dir_to_local_dir()
function get_object_sample (line 324) | void get_object_sample()
FILE: oss_c_sdk_sample/oss_head_object_sample.c
function head_object (line 11) | void head_object()
function get_object_meta (line 50) | static void get_object_meta()
function head_object_sample (line 91) | void head_object_sample()
FILE: oss_c_sdk_sample/oss_image_sample.c
function image_resize (line 20) | void image_resize()
function image_crop (line 55) | void image_crop()
function image_rotate (line 90) | void image_rotate()
function image_sharpen (line 125) | void image_sharpen()
function image_watermark (line 160) | void image_watermark()
function image_format (line 195) | void image_format() {
function image_info (line 229) | void image_info()
function image_tones (line 284) | void image_tones()
function put_example_image (line 340) | void put_example_image()
function put_sample_image (line 376) | void put_sample_image()
function image_sample (line 407) | void image_sample()
FILE: oss_c_sdk_sample/oss_list_object_sample.c
function list_object (line 11) | void list_object()
function list_all_objects (line 52) | void list_all_objects()
function list_objects_by_delimiter (line 107) | void list_objects_by_delimiter()
function list_object_sample (line 170) | void list_object_sample()
FILE: oss_c_sdk_sample/oss_multipart_upload_sample.c
function multipart_upload_file_from_buffer (line 11) | void multipart_upload_file_from_buffer()
function multipart_upload_file_from_file (line 117) | void multipart_upload_file_from_file()
function abort_multipart_upload (line 214) | void abort_multipart_upload()
function multipart_object_sample (line 258) | void multipart_object_sample()
FILE: oss_c_sdk_sample/oss_progress_sample.c
function put_and_get_from_buffer_with_progress (line 11) | void put_and_get_from_buffer_with_progress()
function put_and_get_from_file_with_progress (line 72) | void put_and_get_from_file_with_progress()
function append_object_with_progress (line 125) | void append_object_with_progress()
function multipart_upload_from_buffer_with_progress (line 194) | void multipart_upload_from_buffer_with_progress()
function multipart_upload_from_file_with_progress (line 281) | void multipart_upload_from_file_with_progress()
function progress_sample (line 359) | void progress_sample()
FILE: oss_c_sdk_sample/oss_put_object_acl_sample.c
function put_object_acl (line 11) | void put_object_acl(){
function put_object_acl_sample (line 38) | void put_object_acl_sample(){
FILE: oss_c_sdk_sample/oss_put_object_sample.c
function put_object_from_buffer (line 11) | void put_object_from_buffer()
function put_object_from_buffer_with_md5 (line 49) | void put_object_from_buffer_with_md5()
function put_object_from_file (line 101) | void put_object_from_file()
function put_object_by_signed_url (line 136) | void put_object_by_signed_url()
function create_dir (line 193) | void create_dir()
function put_object_to_dir (line 225) | void put_object_to_dir()
function put_object_sample (line 264) | void put_object_sample()
FILE: oss_c_sdk_sample/oss_resumable_sample.c
function resumable_upload_with_multi_threads (line 11) | void resumable_upload_with_multi_threads()
function resumable_upload_with_resumable (line 48) | void resumable_upload_with_resumable()
function resumable_upload_sample (line 85) | void resumable_upload_sample()
function resumable_download_with_multi_threads (line 91) | void resumable_download_with_multi_threads()
function resumable_download_with_resumable (line 126) | void resumable_download_with_resumable()
function resumable_download_sample (line 162) | void resumable_download_sample()
FILE: oss_c_sdk_sample/oss_sample_util.c
function make_rand_string (line 7) | void make_rand_string(aos_pool_t *p, int len, aos_string_t *data)
function aos_buf_t (line 19) | aos_buf_t *make_random_buf(aos_pool_t *p, int len)
function make_random_body (line 38) | void make_random_body(aos_pool_t *p, int count, aos_list_t *bc)
function init_sample_config (line 52) | void init_sample_config(oss_config_t *config, int is_cname)
function init_sample_request_options (line 60) | void init_sample_request_options(oss_request_options_t *options, int is_...
function get_file_size (line 67) | int64_t get_file_size(const char *file_path)
function percentage (line 81) | void percentage(int64_t consumed_bytes, int64_t total_bytes)
FILE: oss_c_sdk_sample/oss_select_object_sample.c
function select_object_to_buffer (line 11) | void select_object_to_buffer()
function select_object_to_file (line 49) | void select_object_to_file()
function create_select_object_meta (line 87) | void create_select_object_meta()
function select_object_sample (line 122) | void select_object_sample()
FILE: oss_c_sdk_test/CuTest.c
function CuStringInit (line 59) | void CuStringInit(CuString* str)
function CuString (line 67) | CuString* CuStringNew(void)
function CuStringFree (line 77) | void CuStringFree(CuString *str)
function CuStringResize (line 83) | void CuStringResize(CuString* str, int newSize)
function CuStringAppend (line 89) | void CuStringAppend(CuString* str, const char* text)
function CuStringAppendChar (line 104) | void CuStringAppendChar(CuString* str, char ch)
function CuStringAppendFormat (line 112) | void CuStringAppendFormat(CuString* str, const char* format, ...)
function CuStringInsert (line 122) | void CuStringInsert(CuString* str, const char* text, int pos)
function CuTestInit (line 138) | void CuTestInit(CuTest* t, const char* name, TestFunction function)
function CuTest (line 151) | CuTest* CuTestNew(const char* name, TestFunction function)
function CuTestFree (line 158) | void CuTestFree(CuTest* tc)
function CuTestRun (line 164) | void CuTestRun(CuTest* tc)
function CuFailInternal (line 181) | static void CuFailInternal(CuTest* tc, const char* file, int line, CuStr...
function CuFail_Line (line 193) | void CuFail_Line(CuTest* tc, const char* file, int line, const char* mes...
function CuAssert_Line (line 207) | void CuAssert_Line(CuTest* tc, const char* file, int line, const char* m...
function CuAssertStrnEquals_LineMsg (line 213) | void CuAssertStrnEquals_LineMsg(CuTest* tc, const char* file, int line, ...
function CuAssertStrEquals_LineMsg (line 240) | void CuAssertStrEquals_LineMsg(CuTest* tc, const char* file, int line, c...
function CuAssertIntEquals_LineMsg (line 264) | void CuAssertIntEquals_LineMsg(CuTest* tc, const char* file, int line, c...
function CuAssertDblEquals_LineMsg (line 273) | void CuAssertDblEquals_LineMsg(CuTest* tc, const char* file, int line, c...
function CuAssertPtrEquals_LineMsg (line 282) | void CuAssertPtrEquals_LineMsg(CuTest* tc, const char* file, int line, c...
function CuSuiteInit (line 296) | void CuSuiteInit(CuSuite* testSuite)
function CuSuite (line 304) | CuSuite* CuSuiteNew(void)
function CuSuiteFree (line 311) | void CuSuiteFree(CuSuite *testSuite)
function CuSuiteFreeDeep (line 316) | void CuSuiteFreeDeep(CuSuite *testSuite)
function CuSuiteAdd (line 327) | void CuSuiteAdd(CuSuite* testSuite, CuTest *testCase)
function CuSuiteAddSuite (line 341) | void CuSuiteAddSuite(CuSuite* testSuite, CuSuite* testSuite2)
function CuSuiteRun (line 351) | void CuSuiteRun(CuSuite* testSuite)
function CuSuiteSummary (line 362) | void CuSuiteSummary(CuSuite* testSuite, CuString* summary)
function CuSuiteDetails (line 373) | void CuSuiteDetails(CuSuite* testSuite, CuString* details)
function CuSuiteSetSetupTeardownCallbacks (line 409) | void CuSuiteSetSetupTeardownCallbacks(CuSuite* testSuite, TestCallback s...
FILE: oss_c_sdk_test/CuTest.h
type CuString (line 60) | typedef struct
type CuTest (line 79) | typedef struct CuTest CuTest;
type CuTest (line 85) | struct CuTest
type CuSuite (line 149) | typedef struct
FILE: oss_c_sdk_test/cjson.c
function cJSON_strcasecmp (line 42) | static int cJSON_strcasecmp(const char *s1,const char *s2)
function cJSON_InitHooks (line 63) | void cJSON_InitHooks(cJSON_Hooks* hooks)
function cJSON (line 76) | static cJSON *cJSON_New_Item(void)
function cJSON_Delete (line 84) | void cJSON_Delete(cJSON *c)
function pow2gt (line 120) | static int pow2gt (int x) { --x; x|=x>>1; x|=x>>2; x|=x>>4; x|=x>>8; x|=...
type printbuffer (line 122) | typedef struct {char *buffer; int length; int offset; } printbuffer;
function update (line 141) | static int update(printbuffer *p)
function parse_hex4 (line 181) | static unsigned parse_hex4(const char *str)
function cJSON (line 330) | cJSON *cJSON_ParseWithOpts(const char *value,const char **return_parse_e...
function cJSON (line 346) | cJSON *cJSON_Parse(const char *value) {return cJSON_ParseWithOpts(value,...
function cJSON_GetArraySize (line 667) | int cJSON_GetArraySize(cJSON *array) {cJSON *c=array->child;int...
function cJSON (line 668) | cJSON *cJSON_GetArrayItem(cJSON *array,int item) {cJSON *c=array?arra...
function cJSON (line 669) | cJSON *cJSON_GetObjectItem(cJSON *object,const char *string) {cJSON *c=o...
function cJSON_HasObjectItem (line 670) | int cJSON_HasObjectItem(cJSON *object,const char *string) {return cJSON...
function suffix_object (line 673) | static void suffix_object(cJSON *prev,cJSON *item) {prev->next=item;item...
function cJSON (line 675) | static cJSON *create_reference(cJSON *item) {cJSON *ref=cJSON_New_Item()...
function cJSON_AddItemToArray (line 678) | void cJSON_AddItemToArray(cJSON *array, cJSON *item) {cJSON *c=ar...
function cJSON_AddItemToObject (line 679) | void cJSON_AddItemToObject(cJSON *object,const char *string,cJSON *ite...
function cJSON_AddItemToObjectCS (line 680) | void cJSON_AddItemToObjectCS(cJSON *object,const char *string,cJSON *i...
function cJSON_AddItemReferenceToArray (line 681) | void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item) {cJSO...
function cJSON_AddItemReferenceToObject (line 682) | void cJSON_AddItemReferenceToObject(cJSON *object,const char *string,cJS...
function cJSON (line 684) | cJSON *cJSON_DetachItemFromArray(cJSON *array,int which) {cJSON *c=arr...
function cJSON_DeleteItemFromArray (line 686) | void cJSON_DeleteItemFromArray(cJSON *array,int which) {cJSON_Delete...
function cJSON (line 687) | cJSON *cJSON_DetachItemFromObject(cJSON *object,const char *string) {int...
function cJSON_DeleteItemFromObject (line 688) | void cJSON_DeleteItemFromObject(cJSON *object,const char *string) {cJS...
function cJSON_InsertItemInArray (line 691) | void cJSON_InsertItemInArray(cJSON *array,int which,cJSON *newitem) {...
function cJSON_ReplaceItemInArray (line 693) | void cJSON_ReplaceItemInArray(cJSON *array,int which,cJSON *newitem) ...
function cJSON_ReplaceItemInObject (line 696) | void cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON ...
function cJSON (line 699) | cJSON *cJSON_CreateNull(void) {cJSON *item=cJSON_New_Item();if(item)...
function cJSON (line 700) | cJSON *cJSON_CreateTrue(void) {cJSON *item=cJSON_New_Item();if(item)...
function cJSON (line 701) | cJSON *cJSON_CreateFalse(void) {cJSON *item=cJSON_New_Item();if(item...
function cJSON (line 702) | cJSON *cJSON_CreateBool(int b) {cJSON *item=cJSON_New_Item();if(item...
function cJSON (line 703) | cJSON *cJSON_CreateNumber(double num) {cJSON *item=cJSON_New_Item();if...
function cJSON (line 704) | cJSON *cJSON_CreateString(const char *string) {cJSON *item=cJSON_New_Ite...
function cJSON (line 705) | cJSON *cJSON_CreateArray(void) {cJSON *item=cJSON_New_Item();if(item...
function cJSON (line 706) | cJSON *cJSON_CreateObject(void) {cJSON *item=cJSON_New_Item();if(ite...
function cJSON (line 709) | cJSON *cJSON_CreateIntArray(const int *numbers,int count) {int i;cJSON ...
function cJSON (line 710) | cJSON *cJSON_CreateFloatArray(const float *numbers,int count) {int i;cJS...
function cJSON (line 711) | cJSON *cJSON_CreateDoubleArray(const double *numbers,int count) {int i;c...
function cJSON (line 712) | cJSON *cJSON_CreateStringArray(const char **strings,int count) {int i;cJ...
function cJSON (line 715) | cJSON *cJSON_Duplicate(cJSON *item,int recurse)
function cJSON_Minify (line 742) | void cJSON_Minify(char *json)
FILE: oss_c_sdk_test/cjson.h
type cJSON (line 44) | typedef struct cJSON {
type cJSON_Hooks (line 57) | typedef struct cJSON_Hooks {
FILE: oss_c_sdk_test/cjson_utils.c
function cJSONUtils_strcasecmp (line 10) | static int cJSONUtils_strcasecmp(const char *s1,const char *s2)
function cJSONUtils_Pstrcasecmp (line 18) | static int cJSONUtils_Pstrcasecmp(const char *a,const char *e)
function cJSONUtils_PointerEncodedstrlen (line 29) | static int cJSONUtils_PointerEncodedstrlen(const char *s) {int l=0;for (...
function cJSONUtils_PointerEncodedstrcpy (line 31) | static void cJSONUtils_PointerEncodedstrcpy(char *d,const char *s)
function cJSON (line 75) | cJSON *cJSONUtils_GetPointer(cJSON *object,const char *pointer)
function cJSONUtils_InplaceDecodePointerString (line 96) | static void cJSONUtils_InplaceDecodePointerString(char *string)
function cJSON (line 103) | static cJSON *cJSONUtils_PatchDetach(cJSON *object,const char *path)
function cJSONUtils_Compare (line 118) | static int cJSONUtils_Compare(cJSON *a,cJSON *b)
function cJSONUtils_ApplyPatch (line 145) | static int cJSONUtils_ApplyPatch(cJSON *object,cJSON *patch)
function cJSONUtils_ApplyPatches (line 212) | int cJSONUtils_ApplyPatches(cJSON *object,cJSON *patches)
function cJSONUtils_GeneratePatch (line 225) | static void cJSONUtils_GeneratePatch(cJSON *patches,const char *op,const...
function cJSONUtils_AddPatchToArray (line 241) | void cJSONUtils_AddPatchToArray(cJSON *array,const char *op,const char *...
function cJSONUtils_CompareToPatch (line 243) | static void cJSONUtils_CompareToPatch(cJSON *patches,const char *path,cJ...
function cJSON (line 301) | cJSON* cJSONUtils_GeneratePatches(cJSON *from,cJSON *to)
function cJSON (line 309) | static cJSON *cJSONUtils_SortList(cJSON *list)
function cJSONUtils_SortObject (line 347) | void cJSONUtils_SortObject(cJSON *object) {object->child=cJSONUtils_Sort...
function cJSON (line 349) | cJSON* cJSONUtils_MergePatch(cJSON *target, cJSON *patch)
function cJSON (line 368) | cJSON *cJSONUtils_GenerateMergePatch(cJSON *from,cJSON *to)
FILE: oss_c_sdk_test/oss_test_util.c
function make_rand_string (line 9) | void make_rand_string(aos_pool_t *p, int len, aos_string_t *data)
function aos_buf_t (line 21) | aos_buf_t *make_random_buf(aos_pool_t *p, int len)
function make_random_body (line 40) | void make_random_body(aos_pool_t *p, int count, aos_list_t *bc)
function make_random_file (line 54) | int make_random_file(aos_pool_t *p, const char *filename, int len)
function fill_test_file (line 75) | int fill_test_file(aos_pool_t *p, const char *filename, const char *cont...
function init_test_config (line 94) | void init_test_config(oss_config_t *config, int is_cname)
function init_test_request_options (line 104) | void init_test_request_options(oss_request_options_t *options, int is_cn...
function aos_status_t (line 113) | aos_status_t * create_test_bucket(const oss_request_options_t *options,
function aos_status_t (line 127) | aos_status_t * create_test_bucket_with_storage_class(const oss_request_o...
function aos_status_t (line 142) | aos_status_t *create_test_object(const oss_request_options_t *options,
function aos_status_t (line 165) | aos_status_t *create_test_object_from_file(const oss_request_options_t *...
function aos_status_t (line 185) | aos_status_t *delete_test_object(const oss_request_options_t *options,
function aos_status_t (line 199) | aos_status_t *delete_test_object_by_prefix(const oss_request_options_t *...
function clean_bucket (line 247) | void clean_bucket(const oss_request_options_t *options, const char* buck...
function clean_bucket_by_prefix (line 316) | void clean_bucket_by_prefix(const char* prefix)
function aos_status_t (line 348) | aos_status_t *init_test_multipart_upload(const oss_request_options_t *op...
function aos_status_t (line 368) | aos_status_t *abort_test_multipart_upload(const oss_request_options_t *o...
function aos_status_t (line 385) | aos_status_t *create_test_live_channel(const oss_request_options_t *opti...
function aos_status_t (line 407) | aos_status_t *delete_test_live_channel(const oss_request_options_t *opti...
function aos_status_t (line 419) | aos_status_t *get_image_info(const oss_request_options_t *options,
function get_file_size (line 501) | unsigned long get_file_size(const char *file_path)
function progress_callback (line 536) | void progress_callback(int64_t consumed_bytes, int64_t total_bytes)
function percentage (line 541) | void percentage(int64_t consumed_bytes, int64_t total_bytes)
function set_test_bucket_prefix (line 603) | void set_test_bucket_prefix(const char* prefix)
FILE: oss_c_sdk_test/oss_test_util.h
function OSS_CPP_START (line 11) | OSS_CPP_START
FILE: oss_c_sdk_test/test_all.c
type testlist (line 27) | struct testlist {
function has_cfg_info (line 53) | int has_cfg_info()
function load_cfg_from_env (line 58) | void load_cfg_from_env()
function load_cfg_from_file (line 91) | void load_cfg_from_file()
function init_test_env (line 147) | int init_test_env()
function deinit_test_env (line 162) | void deinit_test_env()
function run_all_tests (line 167) | int run_all_tests(int argc, char *argv[])
function main (line 260) | int main(int argc, char *argv[])
FILE: oss_c_sdk_test/test_aos.c
function test_aos_setup (line 20) | void test_aos_setup(CuTest *tc)
function test_get_xml_doc_with_empty_aos_list (line 28) | void test_get_xml_doc_with_empty_aos_list(CuTest *tc)
function test_aos_list_movelist_with_empty_list (line 46) | void test_aos_list_movelist_with_empty_list(CuTest *tc) {
function test_starts_with_failed (line 62) | void test_starts_with_failed(CuTest *tc) {
function test_is_valid_ip (line 73) | void test_is_valid_ip(CuTest *tc) {
function test_oss_config_resolve (line 91) | void test_oss_config_resolve(CuTest *tc) {
function test_oss_request_options_create_with_null_pool (line 135) | void test_oss_request_options_create_with_null_pool(CuTest *tc) {
function test_oss_get_service_uri (line 145) | void test_oss_get_service_uri(CuTest *tc) {
function test_oss_get_rtmp_uri (line 171) | void test_oss_get_rtmp_uri(CuTest *tc) {
function test_oss_write_request_body_from_file (line 203) | void test_oss_write_request_body_from_file(CuTest *tc) {
function test_oss_write_request_body_from_upload_file (line 220) | void test_oss_write_request_body_from_upload_file(CuTest *tc) {
function test_oss_init_read_response_body_to_file (line 239) | void test_oss_init_read_response_body_to_file(CuTest *tc) {
function test_oss_create_bucket_info (line 256) | void test_oss_create_bucket_info(CuTest *tc) {
function test_oss_get_part_size (line 267) | void test_oss_get_part_size(CuTest *tc) {
function test_part_sort_cmp (line 277) | void test_part_sort_cmp(CuTest *tc) {
function test_set_content_type (line 289) | void test_set_content_type(CuTest *tc) {
function test_oss_check_crc_consistent (line 299) | void test_oss_check_crc_consistent(CuTest *tc) {
function test_oss_get_object_uri_with_cname (line 313) | void test_oss_get_object_uri_with_cname(CuTest *tc) {
function test_oss_get_object_uri_with_ip (line 339) | void test_oss_get_object_uri_with_ip(CuTest *tc) {
function test_oss_get_bucket_uri_with_ip (line 365) | void test_oss_get_bucket_uri_with_ip(CuTest *tc) {
function test_oss_get_bucket_uri_with_cname (line 390) | void test_oss_get_bucket_uri_with_cname(CuTest *tc) {
function test_oss_temp_file_rename (line 415) | void test_oss_temp_file_rename(CuTest *tc) {
function test_oss_init_select_object_read_response_body (line 439) | void test_oss_init_select_object_read_response_body(CuTest *tc) {
function test_oss_check_select_object_status (line 459) | void test_oss_check_select_object_status(CuTest *tc) {
function test_oss_check_create_select_object_meta_status (line 468) | void test_oss_check_create_select_object_meta_status(CuTest *tc) {
function test_oss_init_create_select_object_meta_read_response_body (line 477) | void test_oss_init_create_select_object_meta_read_response_body(CuTest *...
function test_aos_log_format_default (line 493) | void test_aos_log_format_default(CuTest *tc) {
function test_aos_log_print_default_with_null_file (line 502) | void test_aos_log_print_default_with_null_file(CuTest *tc) {
function test_aos_curl_code_to_status (line 528) | void test_aos_curl_code_to_status(CuTest *tc) {
function test_aos_unquote_str (line 562) | void test_aos_unquote_str(CuTest *tc) {
function test_aos_ends_with (line 585) | void test_aos_ends_with(CuTest *tc) {
function test_aos_string_is_empty (line 613) | void test_aos_string_is_empty(CuTest *tc) {
function test_aos_url_encode_failed (line 655) | void test_aos_url_encode_failed(CuTest *tc) {
function test_aos_url_encode_with_blank_char (line 668) | void test_aos_url_encode_with_blank_char(CuTest *tc) {
function test_aos_url_encode_ex_with_blank_char (line 684) | void test_aos_url_encode_ex_with_blank_char(CuTest *tc) {
function test_aos_url_decode_with_percent (line 704) | void test_aos_url_decode_with_percent(CuTest *tc) {
function test_aos_url_decode_with_add (line 723) | void test_aos_url_decode_with_add(CuTest *tc) {
function test_aos_url_decode_failed (line 739) | void test_aos_url_decode_failed(CuTest *tc) {
function test_aos_should_retry (line 759) | void test_aos_should_retry(CuTest *tc) {
function test_aos_status_parse_from_body_fail (line 799) | void test_aos_status_parse_from_body_fail(CuTest *tc) {
function test_aos_strtoll (line 849) | void test_aos_strtoll(CuTest *tc)
function test_aos_strtoull (line 908) | void test_aos_strtoull(CuTest *tc)
function test_aos_base64_encode (line 961) | void test_aos_base64_encode(CuTest *tc) {
function test_oss_get_file_info (line 991) | void test_oss_get_file_info(CuTest *tc) {
function test_aos_open_file_for_read (line 1021) | void test_aos_open_file_for_read(CuTest *tc) {
function test_aos_create_buf_fail (line 1041) | void test_aos_create_buf_fail(CuTest *tc) {
function test_aos_open_file_for_read_fail (line 1052) | void test_aos_open_file_for_read_fail(CuTest *tc) {
function test_aos_open_file_for_range_read_fail (line 1072) | void test_aos_open_file_for_range_read_fail(CuTest *tc) {
function test_aos_open_file_for_write_fail (line 1095) | void test_aos_open_file_for_write_fail(CuTest *tc) {
function test_aos_open_file_for_write_notrunc_fail (line 1115) | void test_aos_open_file_for_write_notrunc_fail(CuTest *tc) {
function test_aos_buf_append_string_fail (line 1138) | void test_aos_buf_append_string_fail(CuTest *tc) {
function test_aos_request_get_release (line 1149) | void test_aos_request_get_release(CuTest *tc) {
function test_aos_http_controller_create (line 1165) | void test_aos_http_controller_create(CuTest *tc) {
function test_aos_read_http_body_file_fail (line 1182) | void test_aos_read_http_body_file_fail(CuTest *tc) {
function test_aos_write_http_body_file_fail (line 1219) | void test_aos_write_http_body_file_fail(CuTest *tc) {
function test_aos_parse_xml_body_fail (line 1254) | void test_aos_parse_xml_body_fail(CuTest *tc) {
function test_aos_http_method_to_string (line 1275) | void test_aos_http_method_to_string(CuTest *tc) {
function fstack_func1_pt (line 1283) | static void fstack_func1_pt(void *a)
function fstack_func2_pt (line 1286) | static void fstack_func2_pt()
function fstack_func3_pt (line 1289) | static int fstack_func3_pt(void *a)
function fstack_func4_pt (line 1293) | static int fstack_func4_pt()
function test_aos_fstack (line 1298) | void test_aos_fstack(CuTest *tc) {
function test_oss_create_api_result_content (line 1343) | void test_oss_create_api_result_content(CuTest *tc) {
function test_oss_get_string_to_sign_negative (line 1356) | static void test_oss_get_string_to_sign_negative(CuTest *tc) {
function test_oss_sign_request_negative (line 1409) | static void test_oss_sign_request_negative(CuTest *tc) {
function test_get_oss_request_signature_negative (line 1430) | static void test_get_oss_request_signature_negative(CuTest *tc) {
function test_oss_get_signed_url_negative (line 1457) | static void test_oss_get_signed_url_negative(CuTest *tc) {
function test_oss_get_rtmp_signed_url_negative (line 1504) | static void test_oss_get_rtmp_signed_url_negative(CuTest *tc) {
function test_oss_is_valid_bucket_name (line 1540) | static void test_oss_is_valid_bucket_name(CuTest *tc) {
function test_oss_is_valid_object_name (line 1565) | static void test_oss_is_valid_object_name(CuTest *tc) {
function test_oss_preprocess_endpoint (line 1610) | static void test_oss_preprocess_endpoint(CuTest *tc) {
function test_oss_get_host_from_authority (line 1671) | static void test_oss_get_host_from_authority(CuTest *tc) {
function test_oss_fill_read_response_header (line 1721) | void test_oss_fill_read_response_header(CuTest *tc) {
function test_oss_is_valid_host (line 1728) | static void test_oss_is_valid_host(CuTest *tc) {
function CuSuite (line 1769) | CuSuite *test_aos()
FILE: oss_c_sdk_test/test_oss_bucket.c
function test_bucket_setup (line 13) | void test_bucket_setup(CuTest *tc)
function test_bucket_cleanup (line 73) | void test_bucket_cleanup(CuTest *tc)
function test_create_bucket (line 112) | void test_create_bucket(CuTest *tc)
function test_create_bucket_with_storage_class (line 140) | void test_create_bucket_with_storage_class(CuTest *tc)
function test_delete_bucket (line 187) | void test_delete_bucket(CuTest *tc)
function test_put_bucket_acl (line 216) | void test_put_bucket_acl(CuTest *tc)
function test_put_bucket_acl_invalid_acl (line 240) | void test_put_bucket_acl_invalid_acl(CuTest *tc)
function test_get_bucket_acl (line 264) | void test_get_bucket_acl(CuTest *tc)
function test_get_bucket_location (line 293) | void test_get_bucket_location(CuTest *tc)
function test_get_bucket_info (line 324) | void test_get_bucket_info(CuTest *tc)
function test_get_bucket_stat (line 361) | void test_get_bucket_stat(CuTest *tc)
function test_head_bucket (line 392) | void test_head_bucket(CuTest *tc)
function test_get_bucket_storage_capacity (line 419) | void test_get_bucket_storage_capacity(CuTest *tc)
function test_put_bucket_storage_capacity (line 448) | void test_put_bucket_storage_capacity(CuTest *tc)
function test_put_bucket_logging (line 495) | void test_put_bucket_logging(CuTest *tc)
function test_get_bucket_logging (line 524) | void test_get_bucket_logging(CuTest *tc)
function test_delete_bucket_logging (line 559) | void test_delete_bucket_logging(CuTest *tc)
function test_list_object (line 596) | void test_list_object(CuTest *tc)
function test_list_buckets (line 657) | void test_list_buckets(CuTest *tc)
function test_list_buckets_with_invalid_prefix (line 689) | void test_list_buckets_with_invalid_prefix(CuTest *tc)
function test_list_buckets_with_iterator (line 714) | void test_list_buckets_with_iterator(CuTest *tc)
function test_list_object_with_delimiter (line 795) | void test_list_object_with_delimiter(CuTest *tc)
function test_lifecycle (line 838) | void test_lifecycle(CuTest *tc)
function test_put_bucket_website (line 1041) | void test_put_bucket_website(CuTest *tc)
function test_get_bucket_website (line 1075) | void test_get_bucket_website(CuTest *tc)
function test_delete_bucket_website (line 1105) | void test_delete_bucket_website(CuTest *tc)
function test_put_bucket_referer (line 1127) | void test_put_bucket_referer(CuTest *tc)
function test_get_bucket_referer (line 1163) | void test_get_bucket_referer(CuTest *tc)
function test_put_bucket_cors (line 1204) | void test_put_bucket_cors(CuTest *tc)
function test_get_bucket_cors (line 1266) | void test_get_bucket_cors(CuTest *tc)
function test_delete_bucket_cors (line 1327) | void test_delete_bucket_cors(CuTest *tc)
function test_delete_objects_quiet (line 1349) | void test_delete_objects_quiet(CuTest *tc)
function test_delete_objects_not_quiet (line 1396) | void test_delete_objects_not_quiet(CuTest *tc)
function test_delete_objects_by_prefix (line 1441) | void test_delete_objects_by_prefix(CuTest *tc)
function test_oss_head_bucket (line 1483) | void test_oss_head_bucket(CuTest *tc)
function test_bucket_invalid_parameter (line 1510) | void test_bucket_invalid_parameter(CuTest *tc)
function CuSuite (line 1650) | CuSuite *test_oss_bucket()
FILE: oss_c_sdk_test/test_oss_callback.c
function test_callback_setup (line 13) | void test_callback_setup(CuTest *tc)
function test_callback_cleanup (line 33) | void test_callback_cleanup(CuTest *tc)
function test_callback_put_object_from_buffer (line 60) | void test_callback_put_object_from_buffer(CuTest *tc)
function test_callback_multipart_from_buffer (line 152) | void test_callback_multipart_from_buffer(CuTest *tc)
function CuSuite (line 260) | CuSuite *test_oss_callback()
FILE: oss_c_sdk_test/test_oss_crc.c
function test_crc_setup (line 14) | void test_crc_setup(CuTest *tc)
function test_crc_cleanup (line 34) | void test_crc_cleanup(CuTest *tc)
function test_crc_append_object_from_buffer (line 63) | void test_crc_append_object_from_buffer(CuTest *tc)
function test_crc_append_object_from_file (line 117) | void test_crc_append_object_from_file(CuTest *tc)
function test_crc_disable_crc (line 169) | void test_crc_disable_crc(CuTest *tc)
function crc64_combine_test (line 221) | static void crc64_combine_test(CuTest *tc, void *vector, size_t len, uin...
function test_crc_combine (line 236) | void test_crc_combine(CuTest *tc)
function test_crc_negative (line 253) | void test_crc_negative(CuTest *tc)
function test_crc_big_endian (line 292) | void test_crc_big_endian(CuTest *tc)
function CuSuite (line 313) | CuSuite *test_oss_crc()
FILE: oss_c_sdk_test/test_oss_https.c
function test_https_setup (line 17) | void test_https_setup(CuTest *tc)
function test_https_cleanup (line 43) | void test_https_cleanup(CuTest *tc)
function init_test_https_request_options (line 68) | void init_test_https_request_options(oss_request_options_t *options, int...
function test_https_put_object_from_buffer (line 84) | void test_https_put_object_from_buffer(CuTest *tc)
function test_https_list_object (line 136) | void test_https_list_object(CuTest *tc)
function test_https_list_object_negative (line 169) | void test_https_list_object_negative(CuTest *tc)
function CuSuite (line 198) | CuSuite *test_oss_https()
FILE: oss_c_sdk_test/test_oss_image.c
function test_image_setup (line 22) | void test_image_setup(CuTest *tc)
function test_image_cleanup (line 45) | void test_image_cleanup(CuTest *tc)
function test_resize_image (line 70) | void test_resize_image(CuTest *tc) {
function test_crop_image (line 121) | void test_crop_image(CuTest *tc) {
function test_rotate_image (line 172) | void test_rotate_image(CuTest *tc) {
function test_sharpen_image (line 223) | void test_sharpen_image(CuTest *tc) {
function test_watermark_image (line 274) | void test_watermark_image(CuTest *tc) {
function test_format_image (line 324) | void test_format_image(CuTest *tc) {
function put_example_image (line 375) | void put_example_image(CuTest *tc)
function CuSuite (line 412) | CuSuite *test_oss_image()
FILE: oss_c_sdk_test/test_oss_live.c
function test_live_setup (line 16) | void test_live_setup(CuTest *tc)
function test_live_cleanup (line 37) | void test_live_cleanup(CuTest *tc)
function test_create_live_channel_default (line 57) | void test_create_live_channel_default(CuTest *tc)
function test_create_live_channel (line 144) | void test_create_live_channel(CuTest *tc)
function test_get_live_channel_stat (line 224) | void test_get_live_channel_stat(CuTest *tc)
function test_put_live_channel_status (line 270) | void test_put_live_channel_status(CuTest *tc)
function test_delete_live_channel (line 327) | void test_delete_live_channel(CuTest *tc)
function test_list_live_channel (line 376) | void test_list_live_channel(CuTest *tc)
function test_get_live_channel_history (line 542) | void test_get_live_channel_history(CuTest *tc)
function test_gen_vod_play_list (line 595) | void test_gen_vod_play_list(CuTest *tc)
function test_gen_rtmp_signed_url (line 640) | void test_gen_rtmp_signed_url(CuTest *tc)
function test_live_channel_misc_functions (line 685) | void test_live_channel_misc_functions(CuTest *tc)
function test_live_invalid_parameter (line 698) | void test_live_invalid_parameter(CuTest *tc)
function CuSuite (line 757) | CuSuite *test_oss_live()
FILE: oss_c_sdk_test/test_oss_multipart.c
function test_multipart_setup (line 16) | void test_multipart_setup(CuTest *tc)
function test_multipart_cleanup (line 37) | void test_multipart_cleanup(CuTest *tc)
function test_init_abort_multipart_upload (line 73) | void test_init_abort_multipart_upload(CuTest *tc)
function test_list_multipart_upload (line 100) | void test_list_multipart_upload(CuTest *tc)
function test_multipart_upload (line 156) | void test_multipart_upload(CuTest *tc)
function test_multipart_upload_from_file (line 267) | void test_multipart_upload_from_file(CuTest *tc)
function test_upload_part_copy (line 364) | void test_upload_part_copy(CuTest *tc)
function test_upload_part_copy_with_special_char (line 509) | void test_upload_part_copy_with_special_char(CuTest *tc)
function test_upload_file_failed_without_uploadid (line 638) | void test_upload_file_failed_without_uploadid(CuTest *tc)
function test_upload_file (line 673) | void test_upload_file(CuTest *tc)
function test_upload_file_from_recover (line 703) | void test_upload_file_from_recover(CuTest *tc)
function test_upload_file_from_recover_failed (line 737) | void test_upload_file_from_recover_failed(CuTest *tc)
function test_list_upload_part_with_empty (line 777) | void test_list_upload_part_with_empty(CuTest *tc)
function test_oss_get_sorted_uploaded_part (line 842) | void test_oss_get_sorted_uploaded_part(CuTest *tc)
function test_oss_get_sorted_uploaded_part_with_empty (line 911) | void test_oss_get_sorted_uploaded_part_with_empty(CuTest *tc)
function test_multipart_invalid_parameter (line 954) | void test_multipart_invalid_parameter(CuTest *tc)
function CuSuite (line 1028) | CuSuite *test_oss_multipart()
FILE: oss_c_sdk_test/test_oss_object.c
function test_object_setup (line 15) | void test_object_setup(CuTest *tc)
function test_object_cleanup (line 40) | void test_object_cleanup(CuTest *tc)
function test_put_object_from_buffer (line 87) | void test_put_object_from_buffer(CuTest *tc)
function test_put_object_from_buffer_with_default_content_type (line 131) | void test_put_object_from_buffer_with_default_content_type(CuTest *tc)
function test_put_object_from_buffer_with_specified (line 175) | void test_put_object_from_buffer_with_specified(CuTest *tc)
function test_put_object_from_file (line 217) | void test_put_object_from_file(CuTest *tc)
function test_put_object_with_large_length_header (line 278) | void test_put_object_with_large_length_header(CuTest *tc)
function test_put_object_from_file_with_content_type (line 314) | void test_put_object_from_file_with_content_type(CuTest *tc)
function test_put_symlink_for_obj (line 361) | void test_put_symlink_for_obj(CuTest *tc)
function test_get_symlink_for_obj (line 403) | void test_get_symlink_for_obj(CuTest *tc)
function test_restore_obj (line 458) | void test_restore_obj(CuTest *tc)
function test_restore_object_with_tier (line 557) | void test_restore_object_with_tier(CuTest *tc)
function test_get_object_to_buffer (line 645) | void test_get_object_to_buffer(CuTest *tc)
function test_get_object_to_buffer_with_range (line 700) | void test_get_object_to_buffer_with_range(CuTest *tc)
function test_get_object_to_file (line 754) | void test_get_object_to_file(CuTest *tc)
function test_head_object_with_not_exist (line 805) | void test_head_object_with_not_exist(CuTest *tc)
function test_head_object (line 837) | void test_head_object(CuTest *tc)
function test_get_object_meta_not_exist (line 870) | void test_get_object_meta_not_exist(CuTest *tc){
function test_get_object_meta (line 898) | void test_get_object_meta(CuTest *tc){
function test_get_object_acl_not_exist (line 923) | void test_get_object_acl_not_exist(CuTest *tc){
function test_get_object_acl_object_empty (line 950) | void test_get_object_acl_object_empty(CuTest *tc){
function test_get_object_acl_object_null (line 976) | void test_get_object_acl_object_null(CuTest *tc){
function test_get_object_acl (line 999) | void test_get_object_acl(CuTest *tc){
function test_put_object_acl_invalid_acl (line 1025) | void test_put_object_acl_invalid_acl(CuTest *tc){
function test_put_object_acl_object_empty (line 1052) | void test_put_object_acl_object_empty(CuTest *tc){
function test_put_object_acl_object_null (line 1078) | void test_put_object_acl_object_null(CuTest *tc){
function test_put_object_acl (line 1101) | void test_put_object_acl(CuTest *tc){
function test_delete_object (line 1127) | void test_delete_object(CuTest *tc)
function test_copy_object (line 1154) | void test_copy_object(CuTest *tc)
function test_copy_object_with_source_url_encode (line 1204) | void test_copy_object_with_source_url_encode(CuTest *tc)
function test_copy_object_negative (line 1271) | void test_copy_object_negative(CuTest *tc)
function test_object_by_url (line 1308) | void test_object_by_url(CuTest *tc)
function test_append_object_from_buffer (line 1473) | void test_append_object_from_buffer(CuTest *tc)
function test_append_object_from_file (line 1524) | void test_append_object_from_file(CuTest *tc)
function test_do_append_object_from_file (line 1571) | void test_do_append_object_from_file(CuTest *tc)
function test_get_not_exist_object_to_file (line 1618) | void test_get_not_exist_object_to_file(CuTest *tc)
function test_put_object_from_buffer_with_invalid_endpoint (line 1651) | void test_put_object_from_buffer_with_invalid_endpoint(CuTest *tc)
function test_object_invalid_parameter (line 1676) | void test_object_invalid_parameter(CuTest *tc)
function test_get_object_to_buffer_with_maxbuffersize (line 1931) | void test_get_object_to_buffer_with_maxbuffersize(CuTest *tc)
function test_get_object_to_buffer_use_invalid_sts (line 1974) | void test_get_object_to_buffer_use_invalid_sts(CuTest *tc)
function test_object_with_invalid_endpoint (line 2008) | void test_object_with_invalid_endpoint(CuTest *tc)
function test_object_verify_strict (line 2071) | void test_object_verify_strict(CuTest* tc)
function CuSuite (line 2129) | CuSuite *test_oss_object()
FILE: oss_c_sdk_test/test_oss_object_tagging.c
function test_object_tagging_setup (line 15) | void test_object_tagging_setup(CuTest *tc)
function test_object_tagging_cleanup (line 38) | void test_object_tagging_cleanup(CuTest *tc)
function test_object_tagging_basic (line 82) | void test_object_tagging_basic(CuTest *tc)
function test_object_tagging_tag_list (line 235) | void test_object_tagging_tag_list(CuTest *tc)
function test_object_tagging_put_object (line 320) | void test_object_tagging_put_object(CuTest *tc)
function test_object_tagging_append_object (line 397) | void test_object_tagging_append_object(CuTest *tc)
function test_object_tagging_put_symlink (line 474) | void test_object_tagging_put_symlink(CuTest *tc)
function test_object_tagging_copy_object (line 545) | void test_object_tagging_copy_object(CuTest *tc)
function test_object_tagging_multipart_upload (line 668) | void test_object_tagging_multipart_upload(CuTest *tc)
function test_object_tagging_resumale_upload (line 815) | void test_object_tagging_resumale_upload(CuTest *tc)
function test_lifecycle_tag (line 890) | void test_lifecycle_tag(CuTest *tc)
function test_object_tagging_invalid_parameter (line 1098) | void test_object_tagging_invalid_parameter(CuTest *tc)
function CuSuite (line 1138) | CuSuite *test_oss_object_tagging()
FILE: oss_c_sdk_test/test_oss_progress.c
function test_progress_setup (line 13) | void test_progress_setup(CuTest *tc)
function test_progress_cleanup (line 33) | void test_progress_cleanup(CuTest *tc)
function test_progress_put_and_get_from_buffer (line 60) | void test_progress_put_and_get_from_buffer(CuTest *tc)
function test_progress_put_and_get_from_file (line 116) | void test_progress_put_and_get_from_file(CuTest *tc)
function test_progress_put_and_get_empty_body (line 163) | void test_progress_put_and_get_empty_body(CuTest *tc)
function test_progress_append_object (line 217) | void test_progress_append_object(CuTest *tc)
function test_progress_multipart_from_buffer (line 281) | void test_progress_multipart_from_buffer(CuTest *tc)
function test_progress_multipart_from_file (line 348) | void test_progress_multipart_from_file(CuTest *tc)
function CuSuite (line 420) | CuSuite *test_oss_progress()
FILE: oss_c_sdk_test/test_oss_proxy.c
function test_proxy_setup (line 16) | void test_proxy_setup(CuTest *tc)
function test_proxy_cleanup (line 38) | void test_proxy_cleanup(CuTest *tc)
function init_test_proxy_request_options (line 63) | void init_test_proxy_request_options(oss_request_options_t *options, int...
function test_proxy_put_object_from_buffer (line 78) | void test_proxy_put_object_from_buffer(CuTest *tc)
function test_proxy_list_object (line 127) | void test_proxy_list_object(CuTest *tc)
function test_proxy_resumable_upload (line 158) | void test_proxy_resumable_upload(CuTest *tc)
function CuSuite (line 206) | CuSuite *test_oss_proxy()
FILE: oss_c_sdk_test/test_oss_resumable.c
function test_resumable_setup (line 16) | void test_resumable_setup(CuTest *tc)
function test_resumable_cleanup (line 39) | void test_resumable_cleanup(CuTest *tc)
function aos_curl_http_transport_perform_random_failure (line 87) | static int aos_curl_http_transport_perform_random_failure(aos_http_trans...
function aos_curl_http_transport_perform_bad_crc64 (line 99) | static int aos_curl_http_transport_perform_bad_crc64(aos_http_transport_...
function test_resumable_oss_get_thread_num (line 109) | void test_resumable_oss_get_thread_num(CuTest *tc)
function test_resumable_oss_get_checkpoint_path (line 138) | void test_resumable_oss_get_checkpoint_path(CuTest *tc)
function test_resumable_oss_get_file_info (line 205) | void test_resumable_oss_get_file_info(CuTest *tc)
function test_resumable_oss_does_file_exist (line 247) | void test_resumable_oss_does_file_exist(CuTest *tc)
function test_resumable_oss_dump_checkpoint (line 280) | void test_resumable_oss_dump_checkpoint(CuTest *tc)
function test_resumable_oss_load_checkpoint (line 326) | void test_resumable_oss_load_checkpoint(CuTest *tc)
function test_resumable_oss_is_upload_checkpoint_valid (line 389) | void test_resumable_oss_is_upload_checkpoint_valid(CuTest *tc)
function test_resumable_checkpoint_xml (line 427) | void test_resumable_checkpoint_xml(CuTest *tc)
function test_resumable_upload_without_checkpoint (line 525) | void test_resumable_upload_without_checkpoint(CuTest *tc)
function test_resumable_upload_partsize (line 573) | void test_resumable_upload_partsize(CuTest *tc)
function test_resumable_upload_threads (line 646) | void test_resumable_upload_threads(CuTest *tc)
function test_resumable_upload_with_checkpoint (line 744) | void test_resumable_upload_with_checkpoint(CuTest *tc)
function test_resumable_upload_with_checkpoint_format_invalid (line 792) | void test_resumable_upload_with_checkpoint_format_invalid(CuTest *tc)
function test_resumable_upload_with_checkpoint_path_invalid (line 845) | void test_resumable_upload_with_checkpoint_path_invalid(CuTest *tc)
function test_resumable_upload_with_file_size_unavailable (line 881) | void test_resumable_upload_with_file_size_unavailable(CuTest *tc)
function test_resumable_upload_with_uploadid_unavailable (line 959) | void test_resumable_upload_with_uploadid_unavailable(CuTest *tc)
function test_resumable_upload_with_uploadid_available (line 1014) | void test_resumable_upload_with_uploadid_available(CuTest *tc)
function test_resumable_upload_with_file_path_invalid (line 1107) | void test_resumable_upload_with_file_path_invalid(CuTest *tc)
function test_resumable_upload_callback_without_checkpoint (line 1142) | void test_resumable_upload_callback_without_checkpoint(CuTest *tc)
function test_resumable_upload_progress_without_checkpoint (line 1230) | void test_resumable_upload_progress_without_checkpoint(CuTest *tc)
function test_resumable_upload_callback_with_checkpoint (line 1278) | void test_resumable_upload_callback_with_checkpoint(CuTest *tc)
function test_resumable_upload_progress_with_checkpoint (line 1365) | void test_resumable_upload_progress_with_checkpoint(CuTest *tc)
function test_resumable_upload_content_type (line 1413) | void test_resumable_upload_content_type(CuTest *tc)
function test_resumable_download_without_checkpoint (line 1465) | void test_resumable_download_without_checkpoint(CuTest *tc)
function test_resumable_download_with_checkpoint (line 1505) | void test_resumable_download_with_checkpoint(CuTest *tc)
function test_resumable_download_without_checkpoint_target_invalid (line 1546) | void test_resumable_download_without_checkpoint_target_invalid(CuTest *tc)
function test_resumable_download_with_checkpoint_target_invalid (line 1579) | void test_resumable_download_with_checkpoint_target_invalid(CuTest *tc)
function test_resumable_download_partsize (line 1613) | void test_resumable_download_partsize(CuTest *tc)
function test_resumable_download_small_partsize (line 1653) | void test_resumable_download_small_partsize(CuTest *tc)
function test_resumable_download_threads (line 1694) | void test_resumable_download_threads(CuTest *tc)
function test_resumable_download_with_checkpoint_format_invalid (line 1734) | void test_resumable_download_with_checkpoint_format_invalid(CuTest *tc)
function test_resumable_download_with_checkpoint_info_invalid (line 1783) | void test_resumable_download_with_checkpoint_info_invalid(CuTest *tc)
function test_resumable_download_with_checkpoint_info_valid (line 1847) | void test_resumable_download_with_checkpoint_info_valid(CuTest *tc)
function test_resumable_download_with_checkpoint_path_invalid (line 1911) | void test_resumable_download_with_checkpoint_path_invalid(CuTest *tc)
function test_resumable_download_with_tmpfile_not_found (line 1945) | void test_resumable_download_with_tmpfile_not_found(CuTest *tc)
function test_resumable_download_with_tmpfile_invalid (line 2003) | void test_resumable_download_with_tmpfile_invalid(CuTest *tc)
function test_resumable_download_without_checkpoint_object_not_found (line 2068) | void test_resumable_download_without_checkpoint_object_not_found(CuTest ...
function test_resumable_download_with_checkpoint_object_not_found (line 2102) | void test_resumable_download_with_checkpoint_object_not_found(CuTest *tc)
function test_resumable_download_progress_without_checkpoint (line 2137) | void test_resumable_download_progress_without_checkpoint(CuTest *tc)
function test_resumable_download_progress_with_checkpoint (line 2177) | void test_resumable_download_progress_with_checkpoint(CuTest *tc)
function test_resumable_download_without_checkpoint_random_failure (line 2218) | void test_resumable_download_without_checkpoint_random_failure(CuTest *tc)
function test_resumable_download_with_checkpoint_random_failure (line 2283) | void test_resumable_download_with_checkpoint_random_failure(CuTest *tc)
function test_resumable_download_with_checkpoint_crc64_mismatch (line 2348) | void test_resumable_download_with_checkpoint_crc64_mismatch(CuTest *tc)
function test_oss_get_thread_num_negative (line 2392) | static void test_oss_get_thread_num_negative(CuTest *tc)
function test_oss_get_upload_checkpoint_path_negative (line 2401) | static void test_oss_get_upload_checkpoint_path_negative(CuTest *tc)
function test_oss_get_download_checkpoint_path_negative (line 2410) | static void test_oss_get_download_checkpoint_path_negative(CuTest *tc)
function test_oss_is_upload_checkpoint_valid_negative (line 2419) | static void test_oss_is_upload_checkpoint_valid_negative(CuTest *tc)
function test_oss_is_download_checkpoint_valid_negative (line 2451) | static void test_oss_is_download_checkpoint_valid_negative(CuTest *tc)
function test_oss_dump_checkpoint_negative (line 2497) | static void test_oss_dump_checkpoint_negative(CuTest *tc)
function test_oss_resumable_upload_file_without_cp_negative (line 2506) | static void test_oss_resumable_upload_file_without_cp_negative(CuTest *tc)
function test_oss_resumable_upload_file_with_cp_negative (line 2541) | static void test_oss_resumable_upload_file_with_cp_negative(CuTest *tc)
function test_resumable_invalid_parameter (line 2578) | void test_resumable_invalid_parameter(CuTest *tc)
function CuSuite (line 2617) | CuSuite *test_oss_resumable()
FILE: oss_c_sdk_test/test_oss_select_object.c
function test_select_object_setup (line 17) | static void test_select_object_setup(CuTest *tc)
function test_select_object_cleanup (line 42) | static void test_select_object_cleanup(CuTest *tc)
function test_select_object_csv_data (line 64) | void test_select_object_csv_data(CuTest *tc)
function test_select_object_with_output_header (line 136) | void test_select_object_with_output_header(CuTest *tc)
function test_select_object_without_output_header (line 175) | void test_select_object_without_output_header(CuTest *tc)
function test_select_object_with_keep_columns (line 213) | void test_select_object_with_keep_columns(CuTest *tc)
function test_select_object_without_keep_columns (line 251) | void test_select_object_without_keep_columns(CuTest *tc)
function test_select_object_with_output_raw (line 289) | void test_select_object_with_output_raw(CuTest *tc)
function test_select_object_without_output_raw (line 327) | void test_select_object_without_output_raw(CuTest *tc)
function test_select_object_with_skip_partial_data_true (line 365) | void test_select_object_with_skip_partial_data_true(CuTest *tc)
function test_select_object_with_skip_partial_data_false (line 400) | void test_select_object_with_skip_partial_data_false(CuTest *tc)
function test_select_object_with_crc (line 438) | void test_select_object_with_crc(CuTest *tc)
function test_select_object_without_crc (line 472) | void test_select_object_without_crc(CuTest *tc)
function test_select_object_with_output_delimiters (line 507) | void test_select_object_with_output_delimiters(CuTest *tc)
function test_select_object_with_line_range (line 546) | void test_select_object_with_line_range(CuTest *tc)
function test_select_object_with_input_comment_character (line 589) | void test_select_object_with_input_comment_character(CuTest *tc)
function test_select_object_with_input_quote_character (line 627) | void test_select_object_with_input_quote_character(CuTest *tc)
function test_select_object_with_input_delimiters (line 674) | void test_select_object_with_input_delimiters(CuTest *tc)
function test_select_object_with_gzip_data (line 713) | void test_select_object_with_gzip_data(CuTest *tc)
function test_select_object_with_gzip_data_to_file (line 775) | void test_select_object_with_gzip_data_to_file(CuTest *tc)
function test_select_object_big_csv_data (line 845) | void test_select_object_big_csv_data(CuTest *tc)
function test_select_object_big_csv_data_to_file (line 902) | void test_select_object_big_csv_data_to_file(CuTest *tc)
function test_select_object_create_meta_delimiters (line 959) | void test_select_object_create_meta_delimiters(CuTest *tc)
function test_select_object_create_meta_quote_character (line 1034) | void test_select_object_create_meta_quote_character(CuTest *tc)
function test_select_object_invalid (line 1079) | void test_select_object_invalid(CuTest *tc)
function test_select_object_create_meta_invalid (line 1113) | void test_select_object_create_meta_invalid(CuTest *tc)
function test_select_object_invalid_parameter (line 1144) | void test_select_object_invalid_parameter(CuTest *tc)
function test_select_object_with_long_sql_expression (line 1183) | void test_select_object_with_long_sql_expression(CuTest *tc)
function CuSuite (line 1222) | CuSuite *test_oss_select_object()
FILE: oss_c_sdk_test/test_oss_sign.c
function test_sign_setup (line 13) | void test_sign_setup(CuTest *tc)
function test_sign_cleanup (line 17) | void test_sign_cleanup(CuTest *tc)
function test_sign_v4_object_full (line 21) | static void test_sign_v4_object_full(CuTest* tc)
function test_sign_v4_object_without_query (line 85) | static void test_sign_v4_object_without_query(CuTest* tc)
function test_sign_v4_object_cloudbox_id_full (line 134) | static void test_sign_v4_object_cloudbox_id_full(CuTest* tc)
function test_sign_v4_with_gmt_datefomat (line 197) | static void test_sign_v4_with_gmt_datefomat(CuTest* tc)
function test_sign_v4_presign (line 259) | static void test_sign_v4_presign(CuTest* tc)
function CuSuite (line 264) | CuSuite *test_oss_sign()
FILE: oss_c_sdk_test/test_oss_xml.c
function test_oss_xml_setup (line 13) | static void test_oss_xml_setup(CuTest *tc)
function test_oss_xml_cleanup (line 17) | static void test_oss_xml_cleanup(CuTest *tc)
function test_get_xmldoc_negative (line 21) | static void test_get_xmldoc_negative(CuTest *tc)
function test_oss_acl_parse_from_body_negative (line 43) | static void test_oss_acl_parse_from_body_negative(CuTest *tc)
function test_oss_location_parse_from_body_negative (line 75) | static void test_oss_location_parse_from_body_negative(CuTest *tc)
function test_oss_storage_capacity_parse_from_body_negative (line 107) | static void test_oss_storage_capacity_parse_from_body_negative(CuTest *tc)
function test_oss_logging_parse_from_body_negative (line 138) | static void test_oss_logging_parse_from_body_negative(CuTest *tc)
function test_oss_list_objects_owner_parse_negative (line 181) | static void test_oss_list_objects_owner_parse_negative(CuTest *tc)
function test_oss_list_objects_content_parse_negative (line 213) | static void test_oss_list_objects_content_parse_negative(CuTest *tc)
function test_oss_list_objects_prefix_parse_negative (line 243) | static void test_oss_list_objects_prefix_parse_negative(CuTest *tc)
function test_oss_list_objects_parse_from_body_negative (line 271) | static void test_oss_list_objects_parse_from_body_negative(CuTest *tc)
function test_oss_list_buckets_parse_from_body_negative (line 338) | static void test_oss_list_buckets_parse_from_body_negative(CuTest *tc)
function test_oss_get_bucket_info_parse_from_body_negative (line 406) | static void test_oss_get_bucket_info_parse_from_body_negative(CuTest *tc)
function test_oss_get_bucket_info_parse_from_body_pasitive (line 437) | static void test_oss_get_bucket_info_parse_from_body_pasitive(CuTest *tc)
function test_oss_get_bucket_stat_parse_from_body_negative (line 515) | static void test_oss_get_bucket_stat_parse_from_body_negative(CuTest *tc)
function test_oss_get_bucket_website_parse_from_body_negative (line 546) | static void test_oss_get_bucket_website_parse_from_body_negative(CuTest ...
function test_oss_get_bucket_referer_config_parse_from_body_negative (line 577) | static void test_oss_get_bucket_referer_config_parse_from_body_negative(...
function test_oss_cors_rule_content_parse_negative (line 627) | static void test_oss_cors_rule_content_parse_negative(CuTest *tc)
function test_oss_get_bucket_cors_parse_from_body_negative (line 658) | static void test_oss_get_bucket_cors_parse_from_body_negative(CuTest *tc)
function test_oss_list_parts_content_parse_negative (line 715) | static void test_oss_list_parts_content_parse_negative(CuTest *tc)
function test_oss_list_parts_parse_from_body_negative (line 743) | static void test_oss_list_parts_parse_from_body_negative(CuTest *tc)
function test_oss_list_multipart_uploads_content_parse_negative (line 765) | static void test_oss_list_multipart_uploads_content_parse_negative(CuTes...
function test_oss_list_multipart_uploads_parse_from_body_negative (line 793) | static void test_oss_list_multipart_uploads_parse_from_body_negative(CuT...
function test_oss_upload_id_parse_from_body_negative (line 830) | static void test_oss_upload_id_parse_from_body_negative(CuTest *tc)
function test_oss_lifecycle_rule_content_parse_negative (line 862) | static void test_oss_lifecycle_rule_content_parse_negative(CuTest *tc)
function test_oss_live_channel_info_parse_from_body_negative (line 890) | static void test_oss_live_channel_info_parse_from_body_negative(CuTest *tc)
function test_oss_live_channel_stat_video_content_parse (line 941) | static void test_oss_live_channel_stat_video_content_parse(CuTest *tc)
function test_oss_live_channel_stat_audio_content_parse (line 994) | static void test_oss_live_channel_stat_audio_content_parse(CuTest *tc)
function test_oss_live_channel_stat_parse_from_body_negative (line 1043) | static void test_oss_live_channel_stat_parse_from_body_negative(CuTest *tc)
function test_oss_list_live_channel_parse_from_body_negative (line 1117) | static void test_oss_list_live_channel_parse_from_body_negative(CuTest *tc)
function test_oss_live_channel_history_content_parse (line 1193) | static void test_oss_live_channel_history_content_parse(CuTest *tc)
function test_oss_live_channel_history_parse_from_body (line 1240) | static void test_oss_live_channel_history_parse_from_body(CuTest *tc)
function test_oss_create_live_channel_parse_from_body (line 1304) | static void test_oss_create_live_channel_parse_from_body(CuTest *tc)
function test_oss_get_tagging_parse_from_body_negative (line 1334) | static void test_oss_get_tagging_parse_from_body_negative(CuTest *tc)
function test_get_xmlnode_value (line 1377) | static void test_get_xmlnode_value(CuTest *tc)
function test_oss_lifecycle_rules_parse_from_body_negative (line 1404) | static void test_oss_lifecycle_rules_parse_from_body_negative(CuTest *tc)
function test_oss_lifecycle_rule_tag_parse_negative (line 1437) | static void test_oss_lifecycle_rule_tag_parse_negative(CuTest *tc)
function test_oss_delete_objects_parse_from_body_negative (line 1465) | static void test_oss_delete_objects_parse_from_body_negative(CuTest *tc)
function test_build_bucket_logging_body_negative (line 1523) | static void test_build_bucket_logging_body_negative(CuTest *tc)
function test_build_bucket_storage_class_negative (line 1541) | static void test_build_bucket_storage_class_negative(CuTest *tc)
function test_oss_publish_url_parse (line 1561) | static void test_oss_publish_url_parse(CuTest *tc)
function test_oss_play_url_parse (line 1573) | static void test_oss_play_url_parse(CuTest *tc)
function test_oss_build_select_object_body (line 1585) | static void test_oss_build_select_object_body(CuTest *tc)
function test_oss_build_create_select_object_meta_body (line 1601) | static void test_oss_build_create_select_object_meta_body(CuTest *tc)
function test_oss_build_restore_object_body (line 1611) | static void test_oss_build_restore_object_body(CuTest *tc)
function CuSuite (line 1672) | CuSuite *test_oss_xml()
FILE: third_party/include/apr/apr.h
type apr_byte_t (line 361) | typedef unsigned char apr_byte_t;
type apr_int16_t (line 363) | typedef short apr_int16_t;
type apr_uint16_t (line 364) | typedef unsigned short apr_uint16_t;
type apr_int32_t (line 366) | typedef int apr_int32_t;
type apr_uint32_t (line 367) | typedef unsigned int apr_uint32_t;
type __int64 (line 369) | typedef __int64 apr_int64_t;
type apr_uint64_t (line 370) | typedef unsigned __int64 apr_uint64_t;
type apr_size_t (line 372) | typedef size_t apr_size_t;
type apr_ssize_t (line 374) | typedef ptrdiff_t apr_ssize_t;
type apr_ssize_t (line 376) | typedef int apr_ssize_t;
type __int64 (line 379) | typedef __int64 apr_off_t;
type apr_off_t (line 381) | typedef int apr_off_t;
type apr_socklen_t (line 383) | typedef int apr_socklen_t;
type apr_uint64_t (line 384) | typedef apr_uint64_t apr_ino_t;
type apr_uint64_t (line 393) | typedef apr_uint64_t apr_uintptr_t;
type apr_uint32_t (line 395) | typedef apr_uint32_t apr_uintptr_t;
type apr_wait_t (line 587) | typedef int apr_wait_t;
type pid_t (line 606) | typedef int pid_t;
type uid_t (line 608) | typedef int uid_t;
type gid_t (line 609) | typedef int gid_t;
FILE: third_party/include/apr/apr_allocator.h
type apr_allocator_t (line 41) | typedef struct apr_allocator_t apr_allocator_t;
type apr_memnode_t (line 43) | typedef struct apr_memnode_t apr_memnode_t;
type apr_memnode_t (line 54) | struct apr_memnode_t {
FILE: third_party/include/apr/apr_dso.h
type apr_dso_handle_t (line 44) | typedef struct apr_dso_handle_t apr_dso_handle_t;
FILE: third_party/include/apr/apr_errno.h
type apr_status_t (line 44) | typedef int apr_status_t;
FILE: third_party/include/apr/apr_file_info.h
type apr_filetype_e (line 62) | typedef enum {
type apr_dir_t (line 121) | typedef struct apr_dir_t apr_dir_t;
type apr_int32_t (line 125) | typedef apr_int32_t apr_fileperms_t;
type apr_uint32_t (line 130) | typedef apr_uint32_t apr_dev_t;
type dev_t (line 135) | typedef dev_t apr_dev_t;
type apr_finfo_t (line 143) | typedef struct apr_finfo_t apr_finfo_t;
type apr_finfo_t (line 174) | struct apr_finfo_t {
FILE: third_party/include/apr/apr_file_io.h
type apr_uint32_t (line 180) | typedef apr_uint32_t apr_fileattrs_t;
type apr_seek_where_t (line 183) | typedef int apr_seek_where_t;
type apr_file_t (line 188) | typedef struct apr_file_t apr_file_t;
type iovec (line 486) | struct iovec
type iovec (line 553) | struct iovec
FILE: third_party/include/apr/apr_general.h
type apr_signum_t (line 68) | typedef int apr_signum_t;
FILE: third_party/include/apr/apr_getopt.h
type apr_getopt_t (line 45) | typedef struct apr_getopt_t apr_getopt_t;
type apr_getopt_t (line 50) | struct apr_getopt_t {
type apr_getopt_option_t (line 78) | typedef struct apr_getopt_option_t apr_getopt_option_t;
type apr_getopt_option_t (line 83) | struct apr_getopt_option_t {
FILE: third_party/include/apr/apr_global_mutex.h
type apr_global_mutex_t (line 46) | typedef struct apr_global_mutex_t apr_global_mutex_t;
FILE: third_party/include/apr/apr_hash.h
type apr_hash_t (line 52) | typedef struct apr_hash_t apr_hash_t;
type apr_hash_index_t (line 57) | typedef struct apr_hash_index_t apr_hash_index_t;
FILE: third_party/include/apr/apr_lib.h
type apr_vformatter_buff_t (line 59) | typedef struct apr_vformatter_buff_t apr_vformatter_buff_t;
type apr_vformatter_buff_t (line 64) | struct apr_vformatter_buff_t {
FILE: third_party/include/apr/apr_mmap.h
type apr_mmap_t (line 51) | typedef struct apr_mmap_t apr_mmap_t;
type apr_mmap_t (line 62) | struct apr_mmap_t {
FILE: third_party/include/apr/apr_network_io.h
type apr_shutdown_how_e (line 108) | typedef enum {
type in_addr (line 122) | struct in_addr {
type apr_interface_e (line 172) | typedef enum {
type apr_socket_t (line 193) | typedef struct apr_socket_t apr_socket_t;
type apr_hdtr_t (line 197) | typedef struct apr_hdtr_t apr_hdtr_t;
type apr_in_addr_t (line 199) | typedef struct in_addr apr_in_addr_t;
type apr_ipsubnet_t (line 201) | typedef struct apr_ipsubnet_t apr_ipsubnet_t;
type apr_uint16_t (line 204) | typedef apr_uint16_t apr_port_t;
type apr_sockaddr_t (line 209) | typedef struct apr_sockaddr_t apr_sockaddr_t;
type apr_sockaddr_t (line 213) | struct apr_sockaddr_t {
type apr_hdtr_t (line 263) | struct apr_hdtr_t {
type iovec (line 520) | struct iovec
FILE: third_party/include/apr/apr_poll.h
type apr_pollset_method_e (line 80) | typedef enum {
type apr_datatype_e (line 91) | typedef enum {
type apr_descriptor (line 99) | typedef union {
type apr_pollfd_t (line 105) | typedef struct apr_pollfd_t apr_pollfd_t;
type apr_pollfd_t (line 108) | struct apr_pollfd_t {
type apr_pollset_t (line 123) | typedef struct apr_pollset_t apr_pollset_t;
type apr_pollcb_t (line 317) | typedef struct apr_pollcb_t apr_pollcb_t;
type apr_status_t (line 389) | typedef apr_status_t (*apr_pollcb_cb_t)(void *baton, apr_pollfd_t *descr...
FILE: third_party/include/apr/apr_pools.h
type apr_pool_t (line 60) | typedef struct apr_pool_t apr_pool_t;
FILE: third_party/include/apr/apr_portable.h
type HANDLE (line 62) | typedef HANDLE apr_os_file_t;
type HANDLE (line 63) | typedef HANDLE apr_os_dir_t;
type SOCKET (line 64) | typedef SOCKET apr_os_sock_t;
type HANDLE (line 65) | typedef HANDLE apr_os_proc_mutex_t;
type HANDLE (line 66) | typedef HANDLE apr_os_thread_t;
type HANDLE (line 67) | typedef HANDLE apr_os_proc_t;
type DWORD (line 68) | typedef DWORD apr_os_threadkey_t;
type FILETIME (line 69) | typedef FILETIME apr_os_imp_time_t;
type SYSTEMTIME (line 70) | typedef SYSTEMTIME apr_os_exp_time_t;
type HANDLE (line 71) | typedef HANDLE apr_os_dso_handle_t;
type HANDLE (line 72) | typedef HANDLE apr_os_shm_t;
type HFILE (line 75) | typedef HFILE apr_os_file_t;
type HDIR (line 76) | typedef HDIR apr_os_dir_t;
type apr_os_sock_t (line 77) | typedef int apr_os_sock_t;
type HMTX (line 78) | typedef HMTX apr_os_proc_mutex_t;
type TID (line 79) | typedef TID apr_os_thread_t;
type PID (line 80) | typedef PID apr_os_proc_t;
type PULONG (line 81) | typedef PULONG apr_os_threadkey_t;
type apr_os_imp_time_t (line 82) | typedef struct timeval apr_os_imp_time_t;
type apr_os_exp_time_t (line 83) | typedef struct tm apr_os_exp_time_t;
type HMODULE (line 84) | typedef HMODULE apr_os_dso_handle_t;
type apr_os_proc_mutex_t (line 91) | struct apr_os_proc_mutex_t {
type apr_os_file_t (line 96) | typedef int apr_os_file_t;
type DIR (line 97) | typedef DIR apr_os_dir_t;
type apr_os_sock_t (line 98) | typedef int apr_os_sock_t;
type apr_os_proc_mutex_t (line 99) | typedef struct apr_os_proc_mutex_t apr_os_proc_mutex_t;
type thread_id (line 100) | typedef thread_id apr_os_thread_t;
type thread_id (line 101) | typedef thread_id apr_os_proc_t;
type apr_os_threadkey_t (line 102) | typedef int apr_os_threadkey_t;
type apr_os_imp_time_t (line 103) | typedef struct timeval apr_os_imp_time_t;
type apr_os_exp_time_t (line 104) | typedef struct tm apr_os_exp_time_t;
type image_id (line 105) | typedef image_id apr_os_dso_handle_t;
type apr_os_file_t (line 109) | typedef int apr_os_file_t;
type DIR (line 110) | typedef DIR apr_os_dir_t;
type apr_os_sock_t (line 111) | typedef int apr_os_sock_t;
type NXMutex_t (line 112) | typedef NXMutex_t apr_os_proc_mutex_t;
type NXThreadId_t (line 113) | typedef NXThreadId_t apr_os_thread_t;
type apr_os_proc_t (line 114) | typedef long apr_os_proc_t;
type NXKey_t (line 115) | typedef NXKey_t apr_os_threadkey_t;
type apr_os_imp_time_t (line 116) | typedef struct timeval apr_os_imp_time_t;
type apr_os_exp_time_t (line 117) | typedef struct tm apr_os_exp_time_t;
type apr_os_proc_mutex_t (line 127) | struct apr_os_proc_mutex_t {
type apr_os_file_t (line 145) | typedef int apr_os_file_t;
type DIR (line 146) | typedef DIR apr_os_dir_t;
type apr_os_sock_t (line 147) | typedef int apr_os_sock_t;
type apr_os_proc_mutex_t (line 148) | typedef struct apr_os_proc_mutex_t apr_os_proc_mutex_t;
type pthread_t (line 152) | typedef pthread_t apr_os_thread_t;
type pthread_key_t (line 153) | typedef pthread_key_t apr_os_threadkey_t;
type pid_t (line 156) | typedef pid_t apr_os_proc_t;
type apr_os_imp_time_t (line 157) | typedef struct timeval apr_os_imp_time_t;
type apr_os_exp_time_t (line 158) | typedef struct tm apr_os_exp_time_t;
type shl_t (line 164) | typedef shl_t apr_os_dso_handle_t;
type NSModule (line 167) | typedef NSModule apr_os_dso_handle_t;
type apr_os_sock_info_t (line 183) | struct apr_os_sock_info_t {
type apr_os_sock_info_t (line 192) | typedef struct apr_os_sock_info_t apr_os_sock_info_t;
type apr_os_global_mutex_t (line 203) | struct apr_os_global_mutex_t {
type apr_os_global_mutex_t (line 210) | typedef struct apr_os_global_mutex_t apr_os_global_mutex_t;
FILE: third_party/include/apr/apr_proc_mutex.h
type apr_lockmech_e (line 44) | typedef enum {
type apr_proc_mutex_t (line 54) | typedef struct apr_proc_mutex_t apr_proc_mutex_t;
FILE: third_party/include/apr/apr_random.h
type apr_crypto_hash_t (line 38) | typedef struct apr_crypto_hash_t apr_crypto_hash_t;
type apr_crypto_hash_t (line 48) | struct apr_crypto_hash_t {
type apr_random_t (line 63) | typedef struct apr_random_t apr_random_t;
FILE: third_party/include/apr/apr_shm.h
type apr_shm_t (line 43) | typedef struct apr_shm_t apr_shm_t;
FILE: third_party/include/apr/apr_skiplist.h
type apr_skiplist (line 56) | struct apr_skiplist
type apr_skiplist (line 58) | typedef struct apr_skiplist apr_skiplist;
type apr_skiplistnode (line 65) | struct apr_skiplistnode
type apr_skiplistnode (line 67) | typedef struct apr_skiplistnode apr_skiplistnode;
FILE: third_party/include/apr/apr_strings.h
type iovec (line 161) | struct iovec
FILE: third_party/include/apr/apr_tables.h
type apr_table_t (line 56) | typedef struct apr_table_t apr_table_t;
type apr_array_header_t (line 59) | typedef struct apr_array_header_t apr_array_header_t;
type apr_array_header_t (line 62) | struct apr_array_header_t {
type apr_table_entry_t (line 78) | typedef struct apr_table_entry_t apr_table_entry_t;
type apr_table_entry_t (line 81) | struct apr_table_entry_t {
FILE: third_party/include/apr/apr_thread_cond.h
type apr_thread_cond_t (line 44) | typedef struct apr_thread_cond_t apr_thread_cond_t;
FILE: third_party/include/apr/apr_thread_mutex.h
type apr_thread_mutex_t (line 41) | typedef struct apr_thread_mutex_t apr_thread_mutex_t;
FILE: third_party/include/apr/apr_thread_proc.h
type apr_cmdtype_e (line 45) | typedef enum {
type apr_wait_how_e (line 55) | typedef enum {
type apr_exit_why_e (line 65) | typedef enum {
type apr_proc_t (line 133) | typedef struct apr_proc_t {
type apr_thread_t (line 177) | typedef struct apr_thread_t apr_thread_t;
type apr_threadattr_t (line 180) | typedef struct apr_threadattr_t apr_threadattr_t;
type apr_procattr_t (line 183) | typedef struct apr_procattr_t apr_procattr_t;
type apr_thread_once_t (line 186) | typedef struct apr_thread_once_t apr_thread_once_t;
type apr_threadkey_t (line 189) | typedef struct apr_threadkey_t apr_threadkey_t;
type apr_other_child_rec_t (line 192) | typedef struct apr_other_child_rec_t apr_other_child_rec_t;
type apr_kill_conditions_e (line 199) | typedef enum {
type apr_procattr_t (line 434) | struct apr_procattr_t
type apr_procattr_t (line 451) | struct apr_procattr_t
type apr_procattr_t (line 468) | struct apr_procattr_t
type rlimit (line 519) | struct rlimit
FILE: third_party/include/apr/apr_thread_rwlock.h
type apr_thread_rwlock_t (line 42) | typedef struct apr_thread_rwlock_t apr_thread_rwlock_t;
FILE: third_party/include/apr/apr_time.h
type apr_int64_t (line 46) | typedef apr_int64_t apr_time_t;
type apr_int64_t (line 56) | typedef apr_int64_t apr_interval_time_t;
type apr_int32_t (line 58) | typedef apr_int32_t apr_short_interval_time_t;
type apr_time_exp_t (line 91) | typedef struct apr_time_exp_t apr_time_exp_t;
type apr_time_exp_t (line 98) | struct apr_time_exp_t {
FILE: third_party/include/apr/apr_user.h
type PSID (line 43) | typedef PSID apr_uid_t;
type uid_t (line 45) | typedef uid_t apr_uid_t;
type PSID (line 52) | typedef PSID apr_gid_t;
type gid_t (line 54) | typedef gid_t apr_gid_t;
FILE: third_party/include/apr/apr_version.h
type apr_version_t (line 140) | typedef struct {
FILE: third_party/include/apr/apr_want.h
type iovec (line 94) | struct iovec
FILE: third_party/include/apr/arch/aix/apr_arch_dso.h
type apr_dso_handle_t (line 33) | struct apr_dso_handle_t {
FILE: third_party/include/apr/arch/beos/apr_arch_dso.h
type apr_dso_handle_t (line 31) | struct apr_dso_handle_t {
FILE: third_party/include/apr/arch/beos/apr_arch_proc_mutex.h
type apr_proc_mutex_t (line 27) | struct apr_proc_mutex_t {
FILE: third_party/include/apr/arch/beos/apr_arch_thread_cond.h
type waiter_t (line 29) | struct waiter_t {
type apr_thread_cond_t (line 34) | struct apr_thread_cond_t {
FILE: third_party/include/apr/arch/beos/apr_arch_thread_mutex.h
type apr_thread_mutex_t (line 28) | struct apr_thread_mutex_t {
FILE: third_party/include/apr/arch/beos/apr_arch_thread_rwlock.h
type apr_thread_rwlock_t (line 28) | struct apr_thread_rwlock_t {
FILE: third_party/include/apr/arch/beos/apr_arch_threadproc.h
type apr_thread_t (line 42) | struct apr_thread_t {
type apr_threadattr_t (line 50) | struct apr_threadattr_t {
type apr_threadkey_t (line 57) | struct apr_threadkey_t {
type beos_private_data (line 62) | struct beos_private_data {
type beos_key (line 68) | struct beos_key {
type apr_procattr_t (line 76) | struct apr_procattr_t {
type apr_thread_once_t (line 89) | struct apr_thread_once_t {
FILE: third_party/include/apr/arch/netware/apr_arch_dso.h
type sym_list (line 28) | typedef struct sym_list sym_list;
type sym_list (line 30) | struct sym_list {
type apr_dso_handle_t (line 35) | struct apr_dso_handle_t {
FILE: third_party/include/apr/arch/netware/apr_arch_file_io.h
type struct_stat (line 95) | typedef struct stat struct_stat;
type apr_file_t (line 97) | struct apr_file_t {
type apr_dir_t (line 124) | struct apr_dir_t {
type apr_stat_entry_t (line 131) | typedef struct apr_stat_entry_t apr_stat_entry_t;
type apr_stat_entry_t (line 133) | struct apr_stat_entry_t {
FILE: third_party/include/apr/arch/netware/apr_arch_global_mutex.h
type apr_global_mutex_t (line 23) | struct apr_global_mutex_t {
FILE: third_party/include/apr/arch/netware/apr_arch_proc_mutex.h
type apr_proc_mutex_t (line 23) | struct apr_proc_mutex_t {
FILE: third_party/include/apr/arch/netware/apr_arch_thread_cond.h
type apr_thread_cond_t (line 23) | struct apr_thread_cond_t {
FILE: third_party/include/apr/arch/netware/apr_arch_thread_mutex.h
type apr_thread_mutex_t (line 23) | struct apr_thread_mutex_t {
FILE: third_party/include/apr/arch/netware/apr_arch_thread_rwlock.h
type apr_thread_rwlock_t (line 23) | struct apr_thread_rwlock_t {
FILE: third_party/include/apr/arch/netware/apr_arch_threadproc.h
type apr_thread_t (line 29) | struct apr_thread_t {
type apr_threadattr_t (line 41) | struct apr_threadattr_t {
type apr_threadkey_t (line 48) | struct apr_threadkey_t {
type apr_procattr_t (line 53) | struct apr_procattr_t {
type apr_thread_once_t (line 67) | struct apr_thread_once_t {
FILE: third_party/include/apr/arch/netware/apr_private.h
type APP_DATA (line 157) | typedef struct app_data {
FILE: third_party/include/apr/arch/os2/apr_arch_dso.h
type apr_dso_handle_t (line 28) | struct apr_dso_handle_t {
FILE: third_party/include/apr/arch/os2/apr_arch_file_io.h
type apr_file_t (line 37) | struct apr_file_t {
type apr_dir_t (line 61) | struct apr_dir_t {
FILE: third_party/include/apr/arch/os2/apr_arch_networkio.h
type sock_userdata_t (line 30) | typedef struct sock_userdata_t sock_userdata_t;
type sock_userdata_t (line 31) | struct sock_userdata_t {
type apr_socket_t (line 37) | struct apr_socket_t {
FILE: third_party/include/apr/arch/os2/apr_arch_os2calls.h
type sockaddr (line 24) | struct sockaddr
type sockaddr (line 25) | struct sockaddr
type sockaddr (line 26) | struct sockaddr
type sockaddr (line 27) | struct sockaddr
type sockaddr (line 28) | struct sockaddr
type iovec (line 37) | struct iovec
type sockaddr (line 38) | struct sockaddr
type sockaddr (line 39) | struct sockaddr
FILE: third_party/include/apr/arch/os2/apr_arch_proc_mutex.h
type apr_proc_mutex_t (line 23) | struct apr_proc_mutex_t {
FILE: third_party/include/apr/arch/os2/apr_arch_thread_cond.h
type apr_thread_cond_t (line 23) | struct apr_thread_cond_t {
FILE: third_party/include/apr/arch/os2/apr_arch_thread_mutex.h
type apr_thread_mutex_t (line 23) | struct apr_thread_mutex_t {
FILE: third_party/include/apr/arch/os2/apr_arch_thread_rwlock.h
type apr_thread_rwlock_t (line 23) | struct apr_thread_rwlock_t {
FILE: third_party/include/apr/arch/os2/apr_arch_threadproc.h
type apr_threadattr_t (line 28) | struct apr_threadattr_t {
type apr_thread_t (line 34) | struct apr_thread_t {
type apr_threadkey_t (line 43) | struct apr_threadkey_t {
type apr_procattr_t (line 48) | struct apr_procattr_t {
type apr_thread_once_t (line 61) | struct apr_thread_once_t {
FILE: third_party/include/apr/arch/os390/apr_arch_dso.h
type apr_dso_handle_t (line 30) | struct apr_dso_handle_t {
FILE: third_party/include/apr/arch/unix/apr_arch_dso.h
type apr_dso_handle_t (line 55) | struct apr_dso_handle_t {
FILE: third_party/include/apr/arch/unix/apr_arch_file_io.h
type apr_file_t (line 93) | struct apr_file_t {
type struct_stat (line 140) | typedef struct stat64 struct_stat;
type struct_stat (line 142) | typedef struct stat struct_stat;
type apr_dir_t (line 151) | struct apr_dir_t {
FILE: third_party/include/apr/arch/unix/apr_arch_global_mutex.h
type apr_global_mutex_t (line 28) | struct apr_global_mutex_t {
FILE: third_party/include/apr/arch/unix/apr_arch_misc.h
type apr_other_child_rec_t (line 52) | struct apr_other_child_rec_t {
FILE: third_party/include/apr/arch/unix/apr_arch_networkio.h
type sock_userdata_t (line 96) | typedef struct sock_userdata_t sock_userdata_t;
type sock_userdata_t (line 97) | struct sock_userdata_t {
type apr_socket_t (line 103) | struct apr_socket_t {
FILE: third_party/include/apr/arch/unix/apr_arch_poll_private.h
type pfd_elem_t (line 103) | typedef struct pfd_elem_t pfd_elem_t;
type pfd_elem_t (line 105) | struct pfd_elem_t {
type apr_pollset_private_t (line 115) | typedef struct apr_pollset_private_t apr_pollset_private_t;
type apr_pollset_provider_t (line 116) | typedef struct apr_pollset_provider_t apr_pollset_provider_t;
type apr_pollcb_provider_t (line 117) | typedef struct apr_pollcb_provider_t apr_pollcb_provider_t;
type apr_pollset_t (line 119) | struct apr_pollset_t
type apr_pollcb_pset (line 132) | typedef union {
type apr_pollcb_t (line 148) | struct apr_pollcb_t {
type apr_pollset_provider_t (line 158) | struct apr_pollset_provider_t {
type apr_pollcb_provider_t (line 167) | struct apr_pollcb_provider_t {
FILE: third_party/include/apr/arch/unix/apr_arch_proc_mutex.h
type apr_proc_mutex_unix_lock_methods_t (line 70) | struct apr_proc_mutex_unix_lock_methods_t {
type apr_proc_mutex_unix_lock_methods_t (line 80) | typedef struct apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_lo...
type semid_ds (line 88) | struct semid_ds
type apr_proc_mutex_t (line 93) | struct apr_proc_mutex_t {
FILE: third_party/include/apr/arch/unix/apr_arch_shm.h
type apr_shm_t (line 61) | struct apr_shm_t {
FILE: third_party/include/apr/arch/unix/apr_arch_thread_cond.h
type apr_thread_cond_t (line 35) | struct apr_thread_cond_t {
FILE: third_party/include/apr/arch/unix/apr_arch_thread_mutex.h
type apr_thread_mutex_t (line 32) | struct apr_thread_mutex_t {
FILE: third_party/include/apr/arch/unix/apr_arch_thread_rwlock.h
type apr_thread_rwlock_t (line 34) | struct apr_thread_rwlock_t {
type apr_thread_rwlock_t (line 41) | struct apr_thread_rwlock_t {
FILE: third_party/include/apr/arch/unix/apr_arch_threadproc.h
type apr_thread_t (line 55) | struct apr_thread_t {
type apr_threadattr_t (line 63) | struct apr_threadattr_t {
type apr_threadkey_t (line 68) | struct apr_threadkey_t {
type apr_thread_once_t (line 73) | struct apr_thread_once_t {
type apr_procattr_t (line 79) | struct apr_procattr_t {
FILE: third_party/include/apr/arch/win32/apr_arch_atime.h
type atime_t (line 26) | struct atime_t {
function APR_INLINE (line 39) | static APR_INLINE void FileTimeToAprTime(apr_time_t *result, FILETIME *i...
function APR_INLINE (line 51) | static APR_INLINE void AprTimeToFileTime(LPFILETIME pft, apr_time_t t)
FILE: third_party/include/apr/arch/win32/apr_arch_dso.h
type apr_dso_handle_t (line 28) | struct apr_dso_handle_t {
FILE: third_party/include/apr/arch/win32/apr_arch_file_io.h
type apr_file_t (line 161) | struct apr_file_t {
type apr_dir_t (line 195) | struct apr_dir_t {
FILE: third_party/include/apr/arch/win32/apr_arch_misc.h
type apr_other_child_rec_t (line 50) | struct apr_other_child_rec_t {
type apr_oslevel_e (line 76) | typedef enum {
function APR_INLINE (line 147) | static APR_INLINE void* apr_malloc_dbg(size_t size, const char* filename,
function APR_INLINE (line 153) | static APR_INLINE void* apr_realloc_dbg(void* userData, size_t newSize,
function APR_INLINE (line 161) | static APR_INLINE void* apr_malloc_dbg(size_t size, const char* filename,
function APR_INLINE (line 167) | static APR_INLINE void* apr_realloc_dbg(void* userData, size_t newSize,
type apr_dlltoken_e (line 175) | typedef enum {
type PBI (line 363) | typedef struct PBI {
type IOSB (line 390) | typedef struct IOSB {
type FSI (line 398) | typedef struct FSI {
type WSAPOLLFD (line 457) | typedef struct pollfd {
FILE: third_party/include/apr/arch/win32/apr_arch_networkio.h
type sock_userdata_t (line 24) | typedef struct sock_userdata_t sock_userdata_t;
type sock_userdata_t (line 25) | struct sock_userdata_t {
type apr_socket_t (line 31) | struct apr_socket_t {
type WSABUF (line 61) | typedef struct _WSABUF {
FILE: third_party/include/apr/arch/win32/apr_arch_proc_mutex.h
type apr_proc_mutex_t (line 22) | struct apr_proc_mutex_t {
FILE: third_party/include/apr/arch/win32/apr_arch_thread_cond.h
type apr_thread_cond_t (line 22) | struct apr_thread_cond_t {
FILE: third_party/include/apr/arch/win32/apr_arch_thread_mutex.h
type thread_mutex_type (line 22) | typedef enum thread_mutex_type {
type apr_thread_mutex_t (line 32) | struct apr_thread_mutex_t {
FILE: third_party/include/apr/arch/win32/apr_arch_thread_rwlock.h
type apr_thread_rwlock_t (line 22) | struct apr_thread_rwlock_t {
FILE: third_party/include/apr/arch/win32/apr_arch_threadproc.h
type apr_thread_t (line 26) | struct apr_thread_t {
type apr_threadattr_t (line 36) | struct apr_threadattr_t {
type apr_threadkey_t (line 42) | struct apr_threadkey_t {
type apr_procattr_t (line 47) | struct apr_procattr_t {
type apr_thread_once_t (line 67) | struct apr_thread_once_t {
FILE: third_party/include/apr/arch/win32/apr_arch_utf8.h
type apr_uint16_t (line 26) | typedef apr_uint16_t apr_wchar_t;
FILE: third_party/include/aprutil/apr_anylock.h
type apr_anylock_t (line 29) | typedef struct apr_anylock_t {
FILE: third_party/include/aprutil/apr_buckets.h
type apr_read_type_e (line 57) | typedef enum {
type apr_bucket_brigade (line 119) | typedef struct apr_bucket_brigade apr_bucket_brigade;
type apr_bucket (line 121) | typedef struct apr_bucket apr_bucket;
type apr_bucket_alloc_t (line 123) | typedef struct apr_bucket_alloc_t apr_bucket_alloc_t;
type apr_bucket_type_t (line 126) | typedef struct apr_bucket_type_t apr_bucket_type_t;
type apr_bucket_type_t (line 131) | struct apr_bucket_type_t {
type apr_bucket (line 224) | struct apr_bucket {
type apr_bucket_brigade (line 258) | struct apr_bucket_brigade {
type apr_status_t (line 282) | typedef apr_status_t (*apr_brigade_flush)(apr_bucket_brigade *bb, void *...
type apr_bucket_refcount (line 524) | typedef struct apr_bucket_refcount apr_bucket_refcount;
type apr_bucket_refcount (line 531) | struct apr_bucket_refcount {
type apr_bucket_heap (line 539) | typedef struct apr_bucket_heap apr_bucket_heap;
type apr_bucket_heap (line 543) | struct apr_bucket_heap {
type apr_bucket_pool (line 557) | typedef struct apr_bucket_pool apr_bucket_pool;
type apr_bucket_pool (line 561) | struct apr_bucket_pool {
type apr_bucket_mmap (line 595) | typedef struct apr_bucket_mmap apr_bucket_mmap;
type apr_bucket_mmap (line 599) | struct apr_bucket_mmap {
type apr_bucket_file (line 608) | typedef struct apr_bucket_file apr_bucket_file;
type apr_bucket_file (line 612) | struct apr_bucket_file {
type apr_bucket_structs (line 628) | typedef union apr_bucket_structs apr_bucket_structs;
type iovec (line 788) | struct iovec
type iovec (line 842) | struct iovec
FILE: third_party/include/aprutil/apr_crypto.h
type apr_crypto_block_key_type_e (line 102) | typedef enum
type apr_crypto_block_key_mode_e (line 111) | typedef enum
type apr_crypto_driver_t (line 120) | typedef struct apr_crypto_driver_t apr_crypto_driver_t;
type apr_crypto_t (line 121) | typedef struct apr_crypto_t apr_crypto_t;
type apr_crypto_config_t (line 122) | typedef struct apr_crypto_config_t apr_crypto_config_t;
type apr_crypto_key_t (line 123) | typedef struct apr_crypto_key_t apr_crypto_key_t;
type apr_crypto_block_t (line 124) | typedef struct apr_crypto_block_t apr_crypto_block_t;
FILE: third_party/include/aprutil/apr_dbd.h
type apr_dbd_type_e (line 55) | typedef enum {
type apr_dbd_driver_t (line 82) | typedef struct apr_dbd_driver_t apr_dbd_driver_t;
type apr_dbd_t (line 83) | typedef struct apr_dbd_t apr_dbd_t;
type apr_dbd_transaction_t (line 84) | typedef struct apr_dbd_transaction_t apr_dbd_transaction_t;
type apr_dbd_results_t (line 85) | typedef struct apr_dbd_results_t apr_dbd_results_t;
type apr_dbd_row_t (line 86) | typedef struct apr_dbd_row_t apr_dbd_row_t;
type apr_dbd_prepared_t (line 87) | typedef struct apr_dbd_prepared_t apr_dbd_prepared_t;
FILE: third_party/include/aprutil/apr_dbm.h
type apr_dbm_t (line 42) | typedef struct apr_dbm_t apr_dbm_t;
type apr_datum_t (line 47) | typedef struct
FILE: third_party/include/aprutil/apr_ldap.h
type apr_ldap_err_t (line 148) | typedef struct apr_ldap_err_t {
FILE: third_party/include/aprutil/apr_ldap_option.h
type apr_ldap_opt_tls_cert_t (line 165) | typedef struct apr_ldap_opt_tls_cert_t apr_ldap_opt_tls_cert_t;
type apr_ldap_opt_tls_cert_t (line 166) | struct apr_ldap_opt_tls_cert_t {
FILE: third_party/include/aprutil/apr_ldap_url.h
type apr_ldap_url_desc_t (line 43) | typedef struct apr_ldap_url_desc_t {
FILE: third_party/include/aprutil/apr_md4.h
type apr_md4_ctx_t (line 64) | typedef struct apr_md4_ctx_t apr_md4_ctx_t;
type apr_md4_ctx_t (line 67) | struct apr_md4_ctx_t {
FILE: third_party/include/aprutil/apr_md5.h
type apr_md5_ctx_t (line 71) | typedef struct apr_md5_ctx_t apr_md5_ctx_t;
type apr_md5_ctx_t (line 74) | struct apr_md5_ctx_t {
FILE: third_party/include/aprutil/apr_memcache.h
type apr_memcache_server_status_t (line 49) | typedef enum
type apr_memcache_conn_t (line 56) | typedef struct apr_memcache_conn_t apr_memcache_conn_t;
type apr_memcache_server_t (line 59) | typedef struct apr_memcache_server_t apr_memcache_server_t;
type apr_memcache_server_t (line 60) | struct apr_memcache_server_t
type apr_uint32_t (line 82) | typedef apr_uint32_t (*apr_memcache_hash_func)(void *baton,
type apr_memcache_t (line 86) | typedef struct apr_memcache_t apr_memcache_t;
type apr_memcache_server_t (line 93) | typedef apr_memcache_server_t* (*apr_memcache_server_func)(void *baton,
type apr_memcache_t (line 98) | struct apr_memcache_t
type apr_memcache_value_t (line 112) | typedef struct
type apr_memcache_stats_t (line 378) | typedef struct
FILE: third_party/include/aprutil/apr_queue.h
type apr_queue_t (line 47) | typedef struct apr_queue_t apr_queue_t;
FILE: third_party/include/aprutil/apr_reslist.h
type apr_reslist_t (line 42) | typedef struct apr_reslist_t apr_reslist_t;
type apr_status_t (line 50) | typedef apr_status_t (*apr_reslist_constructor)(void **resource, void *p...
type apr_status_t (line 59) | typedef apr_status_t (*apr_reslist_destructor)(void *resource, void *par...
FILE: third_party/include/aprutil/apr_rmm.h
type apr_rmm_t (line 40) | typedef struct apr_rmm_t apr_rmm_t;
type apr_size_t (line 43) | typedef apr_size_t apr_rmm_off_t;
FILE: third_party/include/aprutil/apr_sdbm.h
type apr_sdbm_t (line 44) | typedef struct apr_sdbm_t apr_sdbm_t;
type apr_sdbm_datum_t (line 49) | typedef struct {
FILE: third_party/include/aprutil/apr_sha1.h
type apr_sha1_ctx_t (line 51) | typedef struct apr_sha1_ctx_t apr_sha1_ctx_t;
type apr_sha1_ctx_t (line 56) | struct apr_sha1_ctx_t {
FILE: third_party/include/aprutil/apr_strmatch.h
type apr_strmatch_pattern (line 38) | typedef struct apr_strmatch_pattern apr_strmatch_pattern;
type apr_strmatch_pattern (line 43) | struct apr_strmatch_pattern {
FILE: third_party/include/aprutil/apr_thread_pool.h
type apr_thread_pool_t (line 58) | typedef struct apr_thread_pool apr_thread_pool_t;
FILE: third_party/include/aprutil/apr_uri.h
type apr_uri_t (line 80) | typedef struct apr_uri_t apr_uri_t;
type apr_uri_t (line 85) | struct apr_uri_t {
FILE: third_party/include/aprutil/apr_uuid.h
type apr_uuid_t (line 41) | typedef struct {
FILE: third_party/include/aprutil/apr_xlate.h
type apr_xlate_t (line 39) | typedef struct apr_xlate_t apr_xlate_t;
FILE: third_party/include/aprutil/apr_xml.h
type apr_text (line 50) | typedef struct apr_text apr_text;
type apr_text (line 53) | struct apr_text {
type apr_text_header (line 61) | typedef struct apr_text_header apr_text_header;
type apr_text_header (line 64) | struct apr_text_header {
type apr_xml_attr (line 141) | typedef struct apr_xml_attr apr_xml_attr;
type apr_xml_elem (line 143) | typedef struct apr_xml_elem apr_xml_elem;
type apr_xml_doc (line 145) | typedef struct apr_xml_doc apr_xml_doc;
type apr_xml_attr (line 148) | struct apr_xml_attr {
type apr_xml_elem (line 162) | struct apr_xml_elem {
type apr_xml_doc (line 200) | struct apr_xml_doc {
type apr_xml_parser (line 208) | typedef struct apr_xml_parser apr_xml_parser;
FILE: third_party/include/aprutil/apu_errno.h
type apu_err_t (line 161) | typedef struct apu_err_t {
FILE: third_party/include/aprutil/private/apr_crypto_internal.h
type apr_crypto_driver_t (line 30) | struct apr_crypto_driver_t {
FILE: third_party/include/aprutil/private/apr_dbd_internal.h
type apr_dbd_driver_t (line 43) | struct apr_dbd_driver_t {
FILE: third_party/include/aprutil/private/apr_dbm_private.h
type apr_dbm_type_t (line 47) | typedef struct {
type apr_dbm_t (line 93) | struct apr_dbm_t
FILE: third_party/include/aprutil/private/apu_internal.h
type apr__ldap_dso_fntable (line 47) | struct apr__ldap_dso_fntable {
FILE: third_party/include/curl/curl.h
type CURL (line 93) | typedef void CURL;
type SOCKET (line 116) | typedef SOCKET curl_socket_t;
type curl_socket_t (line 119) | typedef int curl_socket_t;
type curl_httppost (line 125) | struct curl_httppost {
type curlfiletype (line 194) | typedef enum {
type curl_fileinfo (line 220) | struct curl_fileinfo {
type curlsocktype (line 303) | typedef enum {
type curl_sockaddr (line 320) | struct curl_sockaddr {
type curl_socket_t (line 330) | typedef curl_socket_t
type curlioerr (line 338) | typedef enum {
type curliocmd (line 345) | typedef enum {
type curlioerr (line 351) | typedef curlioerr (*curl_ioctl_callback)(CURL *handle,
type curl_infotype (line 368) | typedef enum {
type CURLcode (line 393) | typedef enum {
type CURLcode (line 575) | typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length);
type CURLcode (line 577) | typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */
type curl_proxytype (line 582) | typedef enum {
type curl_khkey (line 638) | struct curl_khkey {
type curl_khstat (line 652) | enum curl_khstat {
type curl_khmatch (line 663) | enum curl_khmatch {
type curl_khkey (line 672) | struct curl_khkey
type curl_khkey (line 673) | struct curl_khkey
type curl_khmatch (line 674) | enum curl_khmatch
type curl_usessl (line 678) | typedef enum {
type curl_ftpccc (line 710) | typedef enum {
type curl_ftpauth (line 718) | typedef enum {
type curl_ftpcreatedir (line 726) | typedef enum {
type curl_ftpmethod (line 737) | typedef enum {
type CURLoption (line 805) | typedef enum {
type CURL_NETRC_OPTION (line 1609) | enum CURL_NETRC_OPTION {
type CURL_TLSAUTH (line 1629) | enum CURL_TLSAUTH {
type curl_TimeCond (line 1647) | typedef enum {
type CURLformoption (line 1675) | typedef enum {
type curl_forms (line 1708) | struct curl_forms {
type CURLFORMcode (line 1729) | typedef enum {
type curl_httppost (line 1752) | struct curl_httppost
type curl_httppost (line 1753) | struct curl_httppost
type curl_httppost (line 1777) | struct curl_httppost
type curl_httppost (line 1786) | struct curl_httppost
type curl_slist (line 1898) | struct curl_slist {
type curl_slist (line 1911) | struct curl_slist
type curl_slist (line 1921) | struct curl_slist
type curl_certinfo (line 1936) | struct curl_certinfo {
type CURLINFO (line 1950) | typedef enum {
type curl_closepolicy (line 2003) | typedef enum {
type curl_lock_data (line 2028) | typedef enum {
type curl_lock_access (line 2043) | typedef enum {
type CURLSH (line 2058) | typedef void CURLSH;
type CURLSHcode (line 2060) | typedef enum {
type CURLSHoption (line 2070) | typedef enum {
type CURLversion (line 2089) | typedef enum {
type curl_version_info_data (line 2104) | typedef struct {
FILE: third_party/include/curl/curlbuild.h
type CURL_TYPEOF_CURL_SOCKLEN_T (line 576) | typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
type CURL_TYPEOF_CURL_OFF_T (line 582) | typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
FILE: third_party/include/curl/multi.h
type CURLM (line 55) | typedef void CURLM;
type CURLMcode (line 57) | typedef enum {
type CURLMSG (line 75) | typedef enum {
type CURLMsg (line 82) | struct CURLMsg {
type CURLMsg (line 90) | typedef struct CURLMsg CURLMsg;
type curl_waitfd (line 99) | struct curl_waitfd {
type curl_waitfd (line 158) | struct curl_waitfd
type CURLMoption (line 322) | typedef enum {
FILE: third_party/include/curl/typecheck-gcc.h
type curlioerr (line 475) | typedef curlioerr (_curl_ioctl_callback1)(CURL *, int, void*);
type curlioerr (line 476) | typedef curlioerr (_curl_ioctl_callback2)(CURL *, int, const void*);
type curlioerr (line 477) | typedef curlioerr (_curl_ioctl_callback3)(CURL *, curliocmd, void*);
type curlioerr (line 478) | typedef curlioerr (_curl_ioctl_callback4)(CURL *, curliocmd, const void*);
type curl_socket_t (line 499) | typedef curl_socket_t (_curl_opensocket_callback1)
type curl_socket_t (line 501) | typedef curl_socket_t (_curl_opensocket_callback2)
type curl_socket_t (line 503) | typedef curl_socket_t (_curl_opensocket_callback3)
type curl_socket_t (line 505) | typedef curl_socket_t (_curl_opensocket_callback4)
type CURLcode (line 561) | typedef CURLcode (_curl_ssl_ctx_callback1)(CURL *, void *, void *);
type CURLcode (line 562) | typedef CURLcode (_curl_ssl_ctx_callback2)(CURL *, void *, const void *);
type CURLcode (line 563) | typedef CURLcode (_curl_ssl_ctx_callback3)(CURL *, const void *, void *);
type CURLcode (line 564) | typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const v...
type CURLcode (line 569) | typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *);
type CURLcode (line 570) | typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *);
type CURLcode (line 571) | typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *);
type CURLcode (line 572) | typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX,
type _curl_ssl_ctx_callback1 (line 575) | typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5;
type _curl_ssl_ctx_callback1 (line 576) | typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6;
type _curl_ssl_ctx_callback1 (line 577) | typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7;
type _curl_ssl_ctx_callback1 (line 578) | typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8;
type CURLcode (line 589) | typedef CURLcode (*_curl_conv_callback1)(char *, size_t length);
type CURLcode (line 590) | typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length);
type CURLcode (line 591) | typedef CURLcode (*_curl_conv_callback3)(void *, size_t length);
type CURLcode (line 592) | typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length);
type CURLcode (line 600) | typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int);
type CURLcode (line 601) | typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int);
FILE: third_party/include/mxml/mxml.h
type mxml_sax_event_t (line 75) | typedef enum mxml_sax_event_e /**** SAX event type. ****/
type mxml_type_t (line 85) | typedef enum mxml_type_e /**** The XML node type. ****/
type mxml_attr_t (line 102) | typedef struct mxml_attr_s /**** An XML element attribute value. @priva...
type mxml_element_t (line 108) | typedef struct mxml_element_s /**** An XML element value. @private@ ****/
type mxml_text_t (line 115) | typedef struct mxml_text_s /**** An XML text value. @private@ ****/
type mxml_custom_t (line 121) | typedef struct mxml_custom_s /**** An XML custom value. @private@ ****/
type mxml_value_t (line 127) | typedef union mxml_value_u /**** An XML node value. @private@ ****/
type mxml_node_s (line 137) | struct mxml_node_s /**** An XML node. @private@ ****/
type mxml_node_t (line 150) | typedef struct mxml_node_s mxml_node_t;
type mxml_index_s (line 152) | struct mxml_index_s /**** An XML node index. @private@ ****/
type mxml_index_t (line 161) | typedef struct mxml_index_s mxml_index_t;
type mxml_type_t (line 173) | typedef mxml_type_t (*mxml_load_cb_t)(mxml_node_t *);
Condensed preview — 281 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,142K chars).
[
{
"path": ".github/workflows/linux-clang.yml",
"chars": 731,
"preview": "name: Ubuntu (clang)\n\non:\n push:\n branches: [ master ]\n pull_request:\n branches: [ master ]\n \njobs:\n build:\n"
},
{
"path": ".github/workflows/linux-gcc.yml",
"chars": 768,
"preview": "name: Ubuntu (gcc)\n\non:\n push:\n branches: [ master ]\n pull_request:\n branches: [ master ]\n \njobs:\n ubuntu_gc"
},
{
"path": ".github/workflows/windows.yml",
"chars": 643,
"preview": "name: Windows Server 2022\n\non: \n push:\n branches: [ master ]\n pull_request:\n branches: [ master ]\n \njobs:\n b"
},
{
"path": ".travis.yml",
"chars": 3313,
"preview": "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"
},
{
"path": "CHANGELOG.md",
"chars": 5465,
"preview": "# 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-"
},
{
"path": "CMakeLists.txt",
"chars": 5211,
"preview": "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_HO"
},
{
"path": "LICENSE",
"chars": 1073,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2016 Aliyun\n\nPermission is hereby granted, free of charge, to any person obtaining "
},
{
"path": "README-CN.md",
"chars": 3645,
"preview": "# Aliyun OSS SDK for C\r\n\r\n[](https://badge.fury"
},
{
"path": "README.md",
"chars": 5917,
"preview": "# Alibaba Cloud OSS SDK for C\r\n\r\n[](https://ba"
},
{
"path": "oss_c_sdk/aos_buf.c",
"chars": 4956,
"preview": "#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{"
},
{
"path": "oss_c_sdk/aos_buf.h",
"chars": 1727,
"preview": "#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 "
},
{
"path": "oss_c_sdk/aos_crc64.c",
"chars": 12857,
"preview": "/* 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"
},
{
"path": "oss_c_sdk/aos_crc64.h",
"chars": 375,
"preview": "#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"
},
{
"path": "oss_c_sdk/aos_define.h",
"chars": 4320,
"preview": "#ifndef LIBAOS_DEFINE_H\n#define LIBAOS_DEFINE_H\n\n#include <stdint.h>\n#include <stdlib.h>\n#include <assert.h>\n#include <s"
},
{
"path": "oss_c_sdk/aos_fstack.c",
"chars": 1096,
"preview": "#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, s"
},
{
"path": "oss_c_sdk/aos_fstack.h",
"chars": 767,
"preview": "#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)(vo"
},
{
"path": "oss_c_sdk/aos_http_io.c",
"chars": 10643,
"preview": "#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_i"
},
{
"path": "oss_c_sdk/aos_http_io.h",
"chars": 1929,
"preview": "#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\nao"
},
{
"path": "oss_c_sdk/aos_list.h",
"chars": 3300,
"preview": "#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"
},
{
"path": "oss_c_sdk/aos_log.c",
"chars": 1784,
"preview": "#include \"aos_log.h\"\n#include \"apr_portable.h\"\n\naos_log_print_pt aos_log_print = aos_log_print_default;\naos_log_format_"
},
{
"path": "oss_c_sdk/aos_log.h",
"chars": 3300,
"preview": "#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)(cons"
},
{
"path": "oss_c_sdk/aos_status.c",
"chars": 3709,
"preview": "#include \"aos_log.h\"\n#include \"aos_util.h\"\n#include \"aos_status.h\"\n\nconst char AOS_XML_PARSE_ERROR_CODE[] = \"ParseXmlErr"
},
{
"path": "oss_c_sdk/aos_status.h",
"chars": 2073,
"preview": "#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 s"
},
{
"path": "oss_c_sdk/aos_string.c",
"chars": 1165,
"preview": "#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_i"
},
{
"path": "oss_c_sdk/aos_string.h",
"chars": 1894,
"preview": "#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 "
},
{
"path": "oss_c_sdk/aos_transport.c",
"chars": 16120,
"preview": "#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#"
},
{
"path": "oss_c_sdk/aos_transport.h",
"chars": 4096,
"preview": "#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\ntyp"
},
{
"path": "oss_c_sdk/aos_util.c",
"chars": 26066,
"preview": "#include \"aos_util.h\"\n#include \"aos_log.h\"\n\nstatic const char *g_s_wday[] = {\n \"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fr"
},
{
"path": "oss_c_sdk/aos_util.h",
"chars": 3094,
"preview": "#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#inclu"
},
{
"path": "oss_c_sdk/oss_api.h",
"chars": 74435,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk/oss_auth.c",
"chars": 33771,
"preview": "#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[] = {"
},
{
"path": "oss_c_sdk/oss_auth.h",
"chars": 2305,
"preview": "#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#i"
},
{
"path": "oss_c_sdk/oss_bucket.c",
"chars": 36749,
"preview": "#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"
},
{
"path": "oss_c_sdk/oss_define.c",
"chars": 4289,
"preview": "#include \"oss_define.h\"\n\nconst char OSS_CANNONICALIZED_HEADER_PREFIX[] = \"x-oss-\";\nconst char OSS_CANNONICALIZED_HEADER_"
},
{
"path": "oss_c_sdk/oss_define.h",
"chars": 14255,
"preview": "#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"
},
{
"path": "oss_c_sdk/oss_live.c",
"chars": 12799,
"preview": "#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"
},
{
"path": "oss_c_sdk/oss_multipart.c",
"chars": 23286,
"preview": "#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"
},
{
"path": "oss_c_sdk/oss_object.c",
"chars": 46470,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk/oss_resumable.c",
"chars": 46944,
"preview": "#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"
},
{
"path": "oss_c_sdk/oss_resumable.h",
"chars": 8389,
"preview": "#ifndef LIBOSS_RESUMABLE_H\n#define LIBOSS_RESUMABLE_H\n\n#include \"aos_define.h\"\n#include \"aos_string.h\"\n#include \"aos_sta"
},
{
"path": "oss_c_sdk/oss_util.c",
"chars": 52578,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk/oss_util.h",
"chars": 14403,
"preview": "#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"
},
{
"path": "oss_c_sdk/oss_xml.c",
"chars": 88305,
"preview": "#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 \""
},
{
"path": "oss_c_sdk/oss_xml.h",
"chars": 12433,
"preview": "#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"
},
{
"path": "oss_c_sdk.sln",
"chars": 3124,
"preview": "\r\nMicrosoft Visual Studio Solution File, Format Version 11.00\r\n# Visual Studio 2010\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-"
},
{
"path": "oss_c_sdk_sample/CMakeLists.txt",
"chars": 1514,
"preview": "project (oss_c_sdk_sample)\n\ninclude_directories(${CMAKE_SOURCE_DIR})\n\nset(OSS_SAMPLE_SOURCE_FILES oss_sample_util.c oss_"
},
{
"path": "oss_c_sdk_sample/main.c",
"chars": 1237,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_sample/oss_append_object_sample.c",
"chars": 3999,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_sample/oss_callback_sample.c",
"chars": 7158,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_sample/oss_config.c",
"chars": 436,
"preview": "#include \"oss_config.h\"\n\nconst char OSS_ENDPOINT[] = \"<your endpoint>\";\nconst char ACCESS_KEY_ID[] = \"<your access key i"
},
{
"path": "oss_c_sdk_sample/oss_config.h",
"chars": 366,
"preview": "#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_ENDPO"
},
{
"path": "oss_c_sdk_sample/oss_crc_sample.c",
"chars": 5390,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_sample/oss_delete_object_sample.c",
"chars": 2254,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_sample/oss_get_object_acl_sample.c",
"chars": 986,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_sample/oss_get_object_meta_sample.c",
"chars": 1348,
"preview": "#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"
},
{
"path": "oss_c_sdk_sample/oss_get_object_sample.c",
"chars": 9831,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_sample/oss_head_object_sample.c",
"chars": 2641,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_sample/oss_image_sample.c",
"chars": 11978,
"preview": "#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#i"
},
{
"path": "oss_c_sdk_sample/oss_list_object_sample.c",
"chars": 5452,
"preview": "#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#i"
},
{
"path": "oss_c_sdk_sample/oss_multipart_upload_sample.c",
"chars": 8643,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_sample/oss_progress_sample.c",
"chars": 11553,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_sample/oss_put_object_acl_sample.c",
"chars": 997,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_sample/oss_put_object_sample.c",
"chars": 7663,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_sample/oss_resumable_sample.c",
"chars": 4776,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_sample/oss_sample_util.c",
"chars": 2018,
"preview": "#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\nvoi"
},
{
"path": "oss_c_sdk_sample/oss_sample_util.h",
"chars": 629,
"preview": "#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_tran"
},
{
"path": "oss_c_sdk_sample/oss_select_object_sample.c",
"chars": 3303,
"preview": "#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#includ"
},
{
"path": "oss_c_sdk_test/CMakeLists.txt",
"chars": 1799,
"preview": "project (oss_c_sdk_test)\n\ninclude_directories(${CMAKE_SOURCE_DIR})\n\nconfigure_file (\n \"${PROJECT_SOURCE_DIR}/test.h.in\""
},
{
"path": "oss_c_sdk_test/CuTest-README.txt",
"chars": 7485,
"preview": "Originally obtained from \"http://cutest.sourceforge.net/\" version 1.4.\n\nHOW TO USE\n\nYou can use CuTest to create unit te"
},
{
"path": "oss_c_sdk_test/CuTest.c",
"chars": 11274,
"preview": "/* \n * Copyright (c) 2003 Asim Jalis\n * \n * This software is provided 'as-is', without any express or implied\n * warra"
},
{
"path": "oss_c_sdk_test/CuTest.h",
"chars": 6533,
"preview": "/* \n * Copyright (c) 2003 Asim Jalis\n * \n * This software is provided 'as-is', without any express or implied\n * warra"
},
{
"path": "oss_c_sdk_test/ca-certificates.crt",
"chars": 259740,
"preview": "-----BEGIN CERTIFICATE-----\r\nMIIFtTCCA52gAwIBAgIIYY3HhjsBggUwDQYJKoZIhvcNAQEFBQAwRDEWMBQGA1UE\r\nAwwNQUNFRElDT00gUm9vdDEMM"
},
{
"path": "oss_c_sdk_test/cjson.c",
"chars": 28736,
"preview": "/*\n Copyright (c) 2009 Dave Gamble\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of"
},
{
"path": "oss_c_sdk_test/cjson.h",
"chars": 7953,
"preview": "/*\n Copyright (c) 2009 Dave Gamble\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n o"
},
{
"path": "oss_c_sdk_test/cjson_utils.c",
"chars": 12563,
"preview": "#include <ctype.h>\n#include <string.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include \"cjson_utils.h\"\n#ifdef WIN32\n#pra"
},
{
"path": "oss_c_sdk_test/cjson_utils.h",
"chars": 1568,
"preview": "#include \"cjson.h\"\n\n/* Implement RFC6901 (https://tools.ietf.org/html/rfc6901) JSON Pointer spec.\t*/\ncJSON *cJSONUtils_G"
},
{
"path": "oss_c_sdk_test/oss_config.c",
"chars": 224,
"preview": "#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"
},
{
"path": "oss_c_sdk_test/oss_config.h",
"chars": 322,
"preview": "#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_OS"
},
{
"path": "oss_c_sdk_test/oss_test_util.c",
"chars": 17738,
"preview": "#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 b"
},
{
"path": "oss_c_sdk_test/oss_test_util.h",
"chars": 3700,
"preview": "#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#i"
},
{
"path": "oss_c_sdk_test/sample_data.csv",
"chars": 77044,
"preview": "Year,StateAbbr,StateDesc,CityName,GeographicLevel,DataSource,Category,UniqueID,Measure,Data_Value_Unit,DataValueTypeID,D"
},
{
"path": "oss_c_sdk_test/test.h.in",
"chars": 40,
"preview": "#define TEST_DIR \"@PROJECT_SOURCE_DIR@\"\n"
},
{
"path": "oss_c_sdk_test/test_all.c",
"chars": 7434,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_aos.c",
"chars": 52731,
"preview": "#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#inc"
},
{
"path": "oss_c_sdk_test/test_oss_bucket.c",
"chars": 61372,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_oss_callback.c",
"chars": 8387,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_oss_crc.c",
"chars": 9752,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_oss_https.c",
"chars": 6543,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_oss_image.c",
"chars": 13287,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_oss_live.c",
"chars": 31769,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_oss_multipart.c",
"chars": 40981,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_oss_object.c",
"chars": 79004,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_oss_object_tagging.c",
"chars": 43003,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_oss_progress.c",
"chars": 14220,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_oss_proxy.c",
"chars": 6774,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_oss_resumable.c",
"chars": 100241,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_oss_select_object.c",
"chars": 49594,
"preview": "#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#inc"
},
{
"path": "oss_c_sdk_test/test_oss_sign.c",
"chars": 9734,
"preview": "#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 "
},
{
"path": "oss_c_sdk_test/test_oss_xml.c",
"chars": 58218,
"preview": "#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 "
},
{
"path": "third_party/include/apr/apr.h",
"chars": 17742,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr.h.in",
"chars": 18763,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr.hnw",
"chars": 12803,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr.hw",
"chars": 17742,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr.hwc",
"chars": 17693,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_allocator.h",
"chars": 5796,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_atomic.h",
"chars": 4130,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_dso.h",
"chars": 2700,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_env.h",
"chars": 2105,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_errno.h",
"chars": 54042,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_escape.h",
"chars": 15657,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_escape_test_char.h",
"chars": 1169,
"preview": "/* this file is automatically generated by gen_test_char, do not edit. \"make include/private/apr_escape_test_char.h\" to "
},
{
"path": "third_party/include/apr/apr_file_info.h",
"chars": 17587,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_file_io.h",
"chars": 41368,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_fnmatch.h",
"chars": 6229,
"preview": "/*\n * Copyright (c) 1992, 1993\n *\tThe Regents of the University of California. All rights reserved.\n *\n * Redistributio"
},
{
"path": "third_party/include/apr/apr_general.h",
"chars": 7235,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_getopt.h",
"chars": 5980,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_global_mutex.h",
"chars": 6293,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_hash.h",
"chars": 10219,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_inherit.h",
"chars": 2139,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_lib.h",
"chars": 8430,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_mmap.h",
"chars": 5133,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_network_io.h",
"chars": 34190,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_poll.h",
"chars": 19682,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_pools.h",
"chars": 31680,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_portable.h",
"chars": 18571,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_proc_mutex.h",
"chars": 6002,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_random.h",
"chars": 5036,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_ring.h",
"chars": 19015,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_shm.h",
"chars": 8628,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_signal.h",
"chars": 2761,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_skiplist.h",
"chars": 9828,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_strings.h",
"chars": 14893,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_support.h",
"chars": 1634,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_tables.h",
"chars": 18977,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_thread_cond.h",
"chars": 5525,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_thread_mutex.h",
"chars": 3836,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_thread_proc.h",
"chars": 35071,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_thread_rwlock.h",
"chars": 4766,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_time.h",
"chars": 7506,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_user.h",
"chars": 5310,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_version.h",
"chars": 5412,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/apr_want.h",
"chars": 2958,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/aix/apr_arch_dso.h",
"chars": 1223,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/apr_private_common.h",
"chars": 1657,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/beos/apr_arch_dso.h",
"chars": 1305,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/beos/apr_arch_proc_mutex.h",
"chars": 1138,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/beos/apr_arch_thread_cond.h",
"chars": 1405,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/beos/apr_arch_thread_mutex.h",
"chars": 1280,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/beos/apr_arch_thread_rwlock.h",
"chars": 1326,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/beos/apr_arch_threadproc.h",
"chars": 2303,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/netware/apr_arch_dso.h",
"chars": 1217,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/netware/apr_arch_file_io.h",
"chars": 4951,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/netware/apr_arch_global_mutex.h",
"chars": 1023,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/netware/apr_arch_internal_time.h",
"chars": 975,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/netware/apr_arch_networkio.h",
"chars": 1186,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/netware/apr_arch_pre_nw.h",
"chars": 1501,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/netware/apr_arch_proc_mutex.h",
"chars": 1013,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/netware/apr_arch_thread_cond.h",
"chars": 1000,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/netware/apr_arch_thread_mutex.h",
"chars": 1007,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/netware/apr_arch_thread_rwlock.h",
"chars": 1014,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/netware/apr_arch_threadproc.h",
"chars": 1921,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/netware/apr_private.h",
"chars": 5192,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/os2/apr_arch_dso.h",
"chars": 1211,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/os2/apr_arch_file_io.h",
"chars": 3003,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/os2/apr_arch_inherit.h",
"chars": 2529,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/os2/apr_arch_networkio.h",
"chars": 2853,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/os2/apr_arch_os2calls.h",
"chars": 2564,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/os2/apr_arch_proc_mutex.h",
"chars": 1029,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/os2/apr_arch_thread_cond.h",
"chars": 982,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/os2/apr_arch_thread_mutex.h",
"chars": 1004,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/os2/apr_arch_thread_rwlock.h",
"chars": 1049,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/os2/apr_arch_threadproc.h",
"chars": 1736,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/os390/apr_arch_dso.h",
"chars": 1248,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_atomic.h",
"chars": 1647,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_dso.h",
"chars": 1508,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_file_io.h",
"chars": 4798,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_global_mutex.h",
"chars": 1239,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_inherit.h",
"chars": 3488,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_internal_time.h",
"chars": 930,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_misc.h",
"chars": 1681,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_networkio.h",
"chars": 3526,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_poll_private.h",
"chars": 4941,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_proc_mutex.h",
"chars": 3058,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_shm.h",
"chars": 2046,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_thread_cond.h",
"chars": 1301,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_thread_mutex.h",
"chars": 1185,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_thread_rwlock.h",
"chars": 1301,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/unix/apr_arch_threadproc.h",
"chars": 2512,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/win32/apr_arch_atime.h",
"chars": 1922,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/win32/apr_arch_dso.h",
"chars": 1084,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/win32/apr_arch_file_io.h",
"chars": 9200,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/win32/apr_arch_inherit.h",
"chars": 6754,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/win32/apr_arch_misc.h",
"chars": 16656,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/win32/apr_arch_networkio.h",
"chars": 2930,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/win32/apr_arch_proc_mutex.h",
"chars": 994,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/win32/apr_arch_thread_cond.h",
"chars": 1099,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/win32/apr_arch_thread_mutex.h",
"chars": 1394,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/win32/apr_arch_thread_rwlock.h",
"chars": 1049,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/win32/apr_arch_threadproc.h",
"chars": 1901,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
},
{
"path": "third_party/include/apr/arch/win32/apr_arch_utf8.h",
"chars": 2506,
"preview": "/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE"
}
]
// ... and 81 more files (download for full content)
About this extraction
This page contains the full source code of the aliyun/aliyun-oss-c-sdk GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 281 files (2.9 MB), approximately 765.5k tokens, and a symbol index with 1588 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.