All Products
Search
Document Center

Object Storage Service:OSS SDK for C

Last Updated:Dec 05, 2024

This topic is written based on Object Storage Service (OSS) SDK for C 3.10.0.

Compatibility

Version compatibility of OSS SDK for C:

  • For OSS SDK for C V3.X.X: compatible.

  • For OSS SDK for C V2.X.X:

    • Compatible with Windows.

    • Compatible with Linux API operations but incompatible with the following linked list (aos_list_t) traversal API operations:

      • aos_list_for_each_entry

      • aos_list_for_each_entry_reverse

      • aos_list_for_each_entry_safe

      • aos_list_for_each_entry_safe_reverse

  • For OSS SDK for C V1.0.0: compatible except the following structures and API operations:

    • oss_request_options_t

    • oss_get_object_to_buffer

    • oss_get_object_to_file

    • oss_get_object_to_buffer_by_url

    • oss_get_object_to_file_by_url

    • oss_init_multipart_upload

    • oss_complete_multipart_upload

  • For OSS SDK for C V0.0.X: incompatible.

Sample code

OSS SDK for C provides a variety of sample code files for your reference or use. The following table describes the sample code files provided by OSS SDK for C.

Sample code file

Content

oss_put_object_sample

Upload objects

Manage object ACLs

oss_get_object_sample.c

Download objects

oss_append_object_sample.c

Append upload

oss_multipart_upload_sample.c

Multipart upload

oss_resumable_sample.c

Resumable upload and Resumable download

get_object_meta_sample.c

Manage object metadata

oss_list_object_sample.c

List objects

oss_delete_object_sample.c

Delete objects

oss_callback_sample.c

Upload callbacks

oss_progress_sample.c

Upload progress bar and Download progress bar

oss_crc_sample.c

Perform CRC-64 on object upload and download

oss_image_sample.c

IMG

Note

For more information about the source code of OSS SDK for C, visit GitHub.

References