Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit d817308

Browse files
katmsftvinjiang
authored andcommitted
6.0.0 Documenation change, sample change and vcproj change
1 parent e98c41e commit d817308

File tree

10 files changed

+76
-15
lines changed

10 files changed

+76
-15
lines changed

BreakingChanges.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
Azure Storage Client Library for C++
22
History of Breaking Changes
3+
4+
Breaking Changes in v6.0:
5+
- `azure::storage::blob_request_options` now accept max_execution_time as `std::chrono::milliseconds`. However, previous `std::chrono::seconds` can automatically converted to `std::chrono::milliseconds`. There can be behavioral change since the precision has changed.
6+
- Resolved an issue where the first forward slash in the front of the blob name will always be trimmed. This would cause blobs with name trimmed prior to this release no longer reachable with the same input.
7+
38
Breaking Changes in v5.0:
49
- Dropped Nuget package with name 'wastorage'.
510

Changelog.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Azure Storage Client Library for C++
22
History of Changes
33

4+
Changes in v6.0.0
5+
- Upgraded CPPRest to latest version: 2.10.10.
6+
- Resolved a potential memory leak issue in xml_wrapper.cpp.
7+
- Resolved an issue where getting range would update the blob/file MD5 unexpectedly.
8+
- Added an option in CMake to build azure-storage-cpp using /MT
9+
- Resolved an issue where the first forward slash in the front of the blob name will always be trimmed.
10+
- Supported cancellation token and millisecond level timeout in C++ client library.
11+
412
Changes in v5.2.0
513
- Resolved an issue where listing blobs for blob tier returning faulty result when built with VS2013.
614
- Resolved an issue where listing files or directories returning faulty server encryption status when built with VS2013.

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "Microsoft Azure Storage Client Library for C++"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 5.2.0
41+
PROJECT_NUMBER = 6.0.0
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

Microsoft.WindowsAzure.Storage/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ set(AZURESTORAGE_LIBRARY azurestorage)
149149
set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${UUID_LIBRARIES} ${LibXML2_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
150150

151151
# Set version numbers centralized
152-
set (AZURESTORAGE_VERSION_MAJOR 5)
153-
set (AZURESTORAGE_VERSION_MINOR 2)
152+
set (AZURESTORAGE_VERSION_MAJOR 6)
153+
set (AZURESTORAGE_VERSION_MINOR 0)
154154
set (AZURESTORAGE_VERSION_REVISION 0)
155155

156156
# Set output directories.

Microsoft.WindowsAzure.Storage/Microsoft.WindowsAzure.Storage.v140.vcxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<SDLCheck>true</SDLCheck>
9999
<AdditionalOptions>/we4100 /Zm186 %(AdditionalOptions) /bigobj</AdditionalOptions>
100100
<TreatWarningAsError>true</TreatWarningAsError>
101-
<AdditionalIncludeDirectories>includes</AdditionalIncludeDirectories>
101+
<AdditionalIncludeDirectories>includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
102102
<MultiProcessorCompilation>true</MultiProcessorCompilation>
103103
<MinimalRebuild>false</MinimalRebuild>
104104
</ClCompile>
@@ -202,6 +202,7 @@
202202
<ClInclude Include="resource.h" />
203203
</ItemGroup>
204204
<ItemGroup>
205+
<ClCompile Include="src\executor.cpp" />
205206
<ClCompile Include="src\timer_handler.cpp" />
206207
<ClCompile Include="src\authentication.cpp" />
207208
<ClCompile Include="src\basic_types.cpp" />

Microsoft.WindowsAzure.Storage/includes/wascore/constants.dat

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,21 +338,21 @@ DAT(xml_access_tier_inferred, _XPLATSTR("AccessTierInferred"))
338338
DAT(xml_access_tier_change_time, _XPLATSTR("AccessTierChangeTime"))
339339

340340
#define STR(x) #x
341-
#define VER(x) _XPLATSTR("Azure-Storage/5.2.0 (Native; Windows; MSC_VER " STR(x) ")")
341+
#define VER(x) _XPLATSTR("Azure-Storage/6.0.0 (Native; Windows; MSC_VER " STR(x) ")")
342342
#if defined(_WIN32)
343343
#if defined(_MSC_VER)
344344
#if _MSC_VER >= 1900
345345
DAT(header_value_user_agent, VER(_MSC_VER))
346346
#elif _MSC_VER >= 1800
347-
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/5.2.0 (Native; Windows; MSC_VER 18XX)"))
347+
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/6.0.0 (Native; Windows; MSC_VER 18XX)"))
348348
#else
349-
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/5.2.0 (Native; Windows; MSC_VER < 1800)"))
349+
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/6.0.0 (Native; Windows; MSC_VER < 1800)"))
350350
#endif
351351
#else
352-
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/5.2.0 (Native; Windows)"))
352+
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/6.0.0 (Native; Windows)"))
353353
#endif
354354
#else
355-
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/5.2.0 (Native)"))
355+
DAT(header_value_user_agent, _XPLATSTR("Azure-Storage/6.0.0 (Native)"))
356356
#endif
357357

358358
#endif // _CONSTANTS

Microsoft.WindowsAzure.Storage/samples/BlobsGettingStarted/Application.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,34 @@ namespace azure { namespace storage { namespace samples {
114114
// Download append blob as text
115115
utility::string_t append_text = append_blob.download_text();
116116
ucout << _XPLATSTR("Append Text: ") << append_text << std::endl;
117+
118+
// Cancellation token
119+
pplx::cancellation_token_source source; // This is used to cancel the request.
120+
auto download_text_task = append_blob.download_text_async(azure::storage::access_condition(), azure::storage::blob_request_options(), azure::storage::operation_context(), source.get_token());
121+
source.cancel();// This call will cancel download_text_task
122+
try
123+
{
124+
auto downloaded_text = download_text_task.get();
125+
ucout << _XPLATSTR("Text downloaded successfully unexpectedly, text is: ") << downloaded_text << std::endl;
126+
}
127+
catch (const azure::storage::storage_exception& e)
128+
{
129+
ucout << _XPLATSTR("Operation should be cancelled, the error message is: ") << e.what() << std::endl;
130+
}
131+
132+
// Millisecond level timeout
133+
azure::storage::blob_request_options options;
134+
options.set_maximum_execution_time(std::chrono::milliseconds(1));
135+
try
136+
{
137+
download_text_task = append_blob.download_text_async(azure::storage::access_condition(), options, azure::storage::operation_context());
138+
auto downloaded_text = download_text_task.get();
139+
ucout << _XPLATSTR("Text downloaded successfully unexpectedly, text is: ") << downloaded_text << std::endl;
140+
}
141+
catch (const azure::storage::storage_exception& e)
142+
{
143+
ucout << _XPLATSTR("Operation should be timed-out, the error message is: ") << e.what() << std::endl;
144+
}
117145

118146
// Delete the blob
119147
append_blob.delete_blob();
0 Bytes
Binary file not shown.

README.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Azure Storage Client Library for C++ (5.2.0)
1+
# Azure Storage Client Library for C++ (6.0.0)
22

33
The Azure Storage Client Library for C++ allows you to build applications against Microsoft Azure Storage. For an overview of Azure Storage, see [Introduction to Microsoft Azure Storage](http://azure.microsoft.com/en-us/documentation/articles/storage-introduction/).
44

@@ -53,13 +53,31 @@ git clone https://github.com/Azure/azure-storage-cpp.git
5353
cd azure-storage-cpp
5454
```
5555

56+
To build with source code, there are three ways:
57+
58+
**Via Vcpkg**
59+
You can manage the dependencies with Vcpkg, and use Visual Studio 2015 update 3 or Visual Studio 2017 for development environment. Simply install Casablanca via Vcpkg will setup everything needed.
60+
```
61+
C:\src\vcpkg> .\vcpkg install cpprestsdk
62+
```
63+
64+
**Via NuGet**
65+
Because Casablanca does not release NuGet packages anywhere anymore, Starting from 5.1.0, this repository cannot be built with pre-built Casablanca NuGet packages. However, you can export your own version of Casablanca NuGet packages to install dependencies of this project:
66+
```
67+
C:\src\vcpkg> .\vcpkg install cpprestsdk
68+
C:\src\vcpkg> .\vcpkg export --nuget cpprestsdk --nuget-id=Casablanca --nuget-version=2.10.10
69+
```
70+
71+
**Manage dependencies by yourself**
72+
It is not recommended to manage dependencies by yourself. However, you can still build Casablanca by yourself and specify the include directories and link binaries.
73+
5674
### Via NuGet
5775

5876
To install the binaries for the Azure Storage Client Library for C++, you can export a NuGet package with Vcpkg and put it into your local NuGet feed. For more information about how to export a NuGet package, please see [Binary Export](https://github.com/Microsoft/vcpkg/blob/master/docs/specifications/export-command.md).
5977

6078
Normally, exporting NuGet package is done with the following command:
6179
```
62-
C:\src\vcpkg> .\vcpkg export --nuget azure-storage-cpp --nuget-id=Microsoft.Azure.Storage.CPP --nuget-version=5.1.0
80+
C:\src\vcpkg> .\vcpkg export --nuget azure-storage-cpp --nuget-id=Microsoft.Azure.Storage.CPP --nuget-version=6.0.0
6381
```
6482

6583
### Via Vcpkg
@@ -94,6 +112,7 @@ The validated Casablanca version for each major or recent release on different p
94112
| 5.1.0 | 2.10.6 | 2.10.3 |
95113
| 5.1.1 | 2.10.6 | 2.10.3 |
96114
| 5.2.0 | 2.10.6 | 2.10.3 |
115+
| 6.0.0 | 2.10.10 | 2.10.10 |
97116

98117
## Code Samples
99118

@@ -189,7 +208,7 @@ git clone https://github.com/Microsoft/cpprestsdk.git
189208

190209
- Checkout the version on which Azure Storage Client Library for C++ depends:
191210
```bash
192-
git checkout tags/v2.10.3 -b v2.10.3
211+
git checkout tags/v2.10.10 -b v2.10.10
193212
```
194213

195214
- Build the project in Release mode
@@ -298,7 +317,7 @@ git clone https://github.com/Microsoft/cpprestsdk.git
298317

299318
- Checkout the version on which Azure Storage Client Library for C++ depends:
300319
```bash
301-
git checkout tags/v2.10.3 -b v2.10.3
320+
git checkout tags/v2.10.10 -b v2.10.10
302321
```
303322

304323
- Build the project in Release mode
@@ -413,7 +432,7 @@ git clone https://github.com/Microsoft/cpprestsdk.git
413432

414433
- Checkout the version on which Azure Storage Client Library for C++ depends:
415434
```bash
416-
git checkout tags/v2.10.3 -b v2.10.3
435+
git checkout tags/v2.10.10 -b v2.10.10
417436
```
418437

419438
- Build the project in Release mode

tools/prepare.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ rem Set the toolset
1010
set toolset=%4
1111

1212
rem Get the casablanca version
13-
set casaver=2.10.6
13+
set casaver=2.10.10
1414

1515
rem Build the packages.config file
1616
@echo

0 commit comments

Comments
 (0)