Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Azure Storage Client Library for C++
History of Changes

Changes in v2.6:
- Supported parallel download for blobs and files
- Supported installation from Vcpkg

Changes in v2.5:
- Upgraded Casablanca dependency to 2.9.1
- Default Rest API version is 2015-12-11
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Microsoft Azure Storage Client Library for C++"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 2.5.0
PROJECT_NUMBER = 2.6.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.WindowsAzure.Storage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES} ${Boo

# Set version numbers centralized
set (AZURESTORAGE_VERSION_MAJOR 2)
set (AZURESTORAGE_VERSION_MINOR 5)
set (AZURESTORAGE_VERSION_MINOR 6)
set (AZURESTORAGE_VERSION_REVISION 0)

# Add sources per configuration
Expand Down
9 changes: 5 additions & 4 deletions Microsoft.WindowsAzure.Storage/includes/was/blob.h
Original file line number Diff line number Diff line change
Expand Up @@ -1680,20 +1680,20 @@ namespace azure { namespace storage {
}

/// <summary>
/// Gets the number of blocks or pages that may be simultaneously uploaded when uploading a blob that is greater than
/// Gets the number of blocks or pages that may be simultaneously uploaded or downloaded when uploading or downloading a blob that is greater than
/// the value specified by the <see cref="single_blob_upload_threshold_in_bytes" /> property in size.
/// </summary>
/// <returns>The number of parallel block or page upload operations that may proceed.</returns>
/// <returns>The number of parallel block or page upload or download operations that may proceed.</returns>
int parallelism_factor() const
{
return m_parallelism_factor;
}

/// <summary>
/// Sets the number of blocks or pages that may be simultaneously uploaded when uploading a blob that is greater than
/// Sets the number of blocks or pages that may be simultaneously uploaded or downloaded when uploading or downloading a blob that is greater than
/// the value specified by the <see cref="single_blob_upload_threshold_in_bytes" /> property in size.
/// </summary>
/// <param name="value">The number of parallel block or page upload operations that may proceed.</param>
/// <param name="value">The number of parallel block or page upload or download operations that may proceed.</param>
void set_parallelism_factor(int value)
{
utility::assert_in_bounds(_XPLATSTR("value"), value, 0);
Expand Down Expand Up @@ -5074,6 +5074,7 @@ namespace azure { namespace storage {

void init(utility::string_t snapshot_time, storage_credentials credentials);
WASTORAGE_API pplx::task<bool> exists_async(bool primary_only, const blob_request_options& options, operation_context context);
WASTORAGE_API pplx::task<void> download_single_range_to_stream_async(concurrency::streams::ostream target, utility::size64_t offset, utility::size64_t length, const access_condition& condition, const blob_request_options& options, operation_context context, bool update_properties = false);

utility::string_t m_name;
utility::string_t m_snapshot_time;
Expand Down
18 changes: 14 additions & 4 deletions Microsoft.WindowsAzure.Storage/includes/was/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -527,20 +527,20 @@ namespace azure { namespace storage {
}

/// <summary>
/// Gets the number of blocks or pages that may be simultaneously uploaded when uploading a blob that is greater than
/// Gets the number of ranges that may be simultaneously uploaded or downloaded when uploading or downloading a file that is greater than
/// the value specified by the <see cref="single_blob_upload_threshold_in_bytes" /> property in size.
/// </summary>
/// <returns>The number of parallel block or page upload operations that may proceed.</returns>
/// <returns>The number of parallel range upload or download operations that may proceed.</returns>
int parallelism_factor() const
{
return m_parallelism_factor;
}

/// <summary>
/// Sets the number of ranges that may be simultaneously uploaded when uploading a file that is greater than
/// Sets the number of ranges that may be simultaneously uploaded or downloaded when uploading or downloading a file that is greater than
/// the value specified by the <see cref="single_blob_upload_threshold_in_bytes" /> property in size.
/// </summary>
/// <param name="value">The number of parallel range upload operations that may proceed.</param>
/// <param name="value">The number of parallel range upload or download operations that may proceed.</param>
void set_parallelism_factor(int value)
{
m_parallelism_factor = value;
Expand Down Expand Up @@ -2211,6 +2211,15 @@ namespace azure { namespace storage {
return m_length;
}

/// <summary>
/// Gets the size of the file, in bytes.
/// </summary>
/// <returns>The file's size in bytes.</returns>
utility::size64_t size() const
{
return m_length;
}

/// <summary>
/// Gets the file's ETag value.
/// </summary>
Expand Down Expand Up @@ -3913,6 +3922,7 @@ namespace azure { namespace storage {

void init(storage_credentials credentials);
WASTORAGE_API pplx::task<bool> exists_async(bool primary_only, const file_access_condition& condition, const file_request_options& options, operation_context context) const;
WASTORAGE_API pplx::task<void> download_single_range_to_stream_async(concurrency::streams::ostream target, utility::size64_t offset, utility::size64_t length, const file_access_condition& condition, const file_request_options& options, operation_context context, bool update_properties = false, bool validate_last_modify = false) const;

utility::string_t m_name;
cloud_file_directory m_directory;
Expand Down
8 changes: 4 additions & 4 deletions Microsoft.WindowsAzure.Storage/includes/wascore/constants.dat
Original file line number Diff line number Diff line change
Expand Up @@ -309,19 +309,19 @@ DAT(xml_share, _XPLATSTR("Share"))
DAT(xml_shares, _XPLATSTR("Shares"))

#define STR(x) #x
#define VER(x) _XPLATSTR("Azure-Storage/2.4.0 (Native; Windows; MSC_VER " STR(x) ")")
#define VER(x) _XPLATSTR("Azure-Storage/2.6.0 (Native; Windows; MSC_VER " STR(x) ")")
#if defined(_WIN32)
#if defined(_MSC_VER)
#if _MSC_VER == 1800
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/2.4.0 (Native; Windows; MSC_VER 1800 )"))
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/2.6.0 (Native; Windows; MSC_VER 1800 )"))
#else
DAT(header_value_user_agent, VER(_MSC_VER))
#endif
#else
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/2.4.0 (Native; Windows)"))
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/2.6.0 (Native; Windows)"))
#endif
#else
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/2.4.0 (Native)"))
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/2.6.0 (Native)"))
#endif

#endif // _CONSTANTS
Expand Down
3 changes: 3 additions & 0 deletions Microsoft.WindowsAzure.Storage/includes/wascore/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ namespace azure { namespace storage { namespace protocol {

// size constants
const size_t max_block_size = 4 * 1024 * 1024;
const size_t single_block_size = 4 * 1024 * 1024;
const size_t default_buffer_size = 64 * 1024;
const utility::size64_t default_single_blob_upload_threshold = 32 * 1024 * 1024;
const utility::size64_t default_single_blob_download_threshold = 32 * 1024 * 1024;
const utility::size64_t default_single_block_download_threshold = 4 * 1024 * 1024;

// duration constants
const std::chrono::seconds default_retry_interval(3);
Expand Down
2 changes: 2 additions & 0 deletions Microsoft.WindowsAzure.Storage/includes/wascore/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ namespace azure { namespace storage { namespace protocol {
class file_response_parsers
{
public:
static utility::size64_t parse_file_size(const web::http::http_response& response);

static cloud_file_share_properties parse_file_share_properties(const web::http::http_response& response);
static cloud_file_directory_properties parse_file_directory_properties(const web::http::http_response& response);
static cloud_file_properties parse_file_properties(const web::http::http_response& response);
Expand Down
Loading