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

Commit e92d517

Browse files
committed
Azure Storage Client Library for C++ v0.3.0
1 parent 37e44a6 commit e92d517

File tree

233 files changed

+10936
-28037
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+10936
-28037
lines changed

.gitattributes

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain
64+
65+
# Allow diff of UTF-16 text files.
66+
*.rc diff

.gitignore

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ bld/
1616
[Bb]in/
1717
[Oo]bj/
1818

19-
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
20-
!packages/*/build/
21-
2219
# MSTest test Results
2320
[Tt]est[Rr]esult*/
2421
[Bb]uild[Ll]og.*
@@ -118,10 +115,11 @@ publish/
118115
*.azurePubxml
119116

120117
# NuGet Packages Directory
121-
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
122-
#packages/
123-
## TODO: If the tool you use requires repositories.config, also uncomment the next line
124-
#!packages/repositories.config
118+
packages/
119+
!packages/repositories.config
120+
121+
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
122+
#!packages/*/build/
125123

126124
# Windows Azure Build Output
127125
csx/

.nuget/NuGet.Config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<solution>
4+
<add key="disableSourceControlIntegration" value="true" />
5+
</solution>
6+
</configuration>

.nuget/NuGet.exe

1.58 MB
Binary file not shown.

.nuget/NuGet.targets

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
5+
6+
<!-- Enable the restore command to run before builds -->
7+
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
8+
9+
<!-- Property that enables building a package from a project -->
10+
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
11+
12+
<!-- Determines if package restore consent is required to restore packages -->
13+
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
14+
15+
<!-- Download NuGet.exe if it does not already exist -->
16+
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
17+
</PropertyGroup>
18+
19+
<ItemGroup Condition=" '$(PackageSources)' == '' ">
20+
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
21+
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
22+
<!--
23+
<PackageSource Include="https://www.nuget.org/api/v2/" />
24+
<PackageSource Include="https://my-nuget-source/nuget/" />
25+
-->
26+
</ItemGroup>
27+
28+
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
29+
<!-- Windows specific commands -->
30+
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
31+
</PropertyGroup>
32+
33+
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
34+
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
35+
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
36+
</PropertyGroup>
37+
38+
<PropertyGroup>
39+
<PackagesProjectConfig Condition=" '$(OS)' == 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>
40+
<PackagesProjectConfig Condition=" '$(OS)' != 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config</PackagesProjectConfig>
41+
</PropertyGroup>
42+
43+
<PropertyGroup>
44+
<PackagesConfig Condition="Exists('$(MSBuildProjectDirectory)\packages.config')">$(MSBuildProjectDirectory)\packages.config</PackagesConfig>
45+
<PackagesConfig Condition="Exists('$(PackagesProjectConfig)')">$(PackagesProjectConfig)</PackagesConfig>
46+
</PropertyGroup>
47+
48+
<PropertyGroup>
49+
<!-- NuGet command -->
50+
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
51+
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
52+
53+
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
54+
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
55+
56+
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
57+
58+
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
59+
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
60+
61+
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
62+
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
63+
64+
<!-- Commands -->
65+
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
66+
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
67+
68+
<!-- We need to ensure packages are restored prior to assembly resolve -->
69+
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
70+
RestorePackages;
71+
$(BuildDependsOn);
72+
</BuildDependsOn>
73+
74+
<!-- Make the build depend on restore packages -->
75+
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
76+
$(BuildDependsOn);
77+
BuildPackage;
78+
</BuildDependsOn>
79+
</PropertyGroup>
80+
81+
<Target Name="CheckPrerequisites">
82+
<!-- Raise an error if we're unable to locate nuget.exe -->
83+
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
84+
<!--
85+
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
86+
This effectively acts as a lock that makes sure that the download operation will only happen once and all
87+
parallel builds will have to wait for it to complete.
88+
-->
89+
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
90+
</Target>
91+
92+
<Target Name="_DownloadNuGet">
93+
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
94+
</Target>
95+
96+
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
97+
<Exec Command="$(RestoreCommand)"
98+
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
99+
100+
<Exec Command="$(RestoreCommand)"
101+
LogStandardErrorAsError="true"
102+
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
103+
</Target>
104+
105+
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
106+
<Exec Command="$(BuildCommand)"
107+
Condition=" '$(OS)' != 'Windows_NT' " />
108+
109+
<Exec Command="$(BuildCommand)"
110+
LogStandardErrorAsError="true"
111+
Condition=" '$(OS)' == 'Windows_NT' " />
112+
</Target>
113+
114+
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
115+
<ParameterGroup>
116+
<OutputFilename ParameterType="System.String" Required="true" />
117+
</ParameterGroup>
118+
<Task>
119+
<Reference Include="System.Core" />
120+
<Using Namespace="System" />
121+
<Using Namespace="System.IO" />
122+
<Using Namespace="System.Net" />
123+
<Using Namespace="Microsoft.Build.Framework" />
124+
<Using Namespace="Microsoft.Build.Utilities" />
125+
<Code Type="Fragment" Language="cs">
126+
<![CDATA[
127+
try {
128+
OutputFilename = Path.GetFullPath(OutputFilename);
129+
130+
Log.LogMessage("Downloading latest version of NuGet.exe...");
131+
WebClient webClient = new WebClient();
132+
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
133+
134+
return true;
135+
}
136+
catch (Exception ex) {
137+
Log.LogErrorFromException(ex);
138+
return false;
139+
}
140+
]]>
141+
</Code>
142+
</Task>
143+
</UsingTask>
144+
</Project>

BreakingChanges.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Azure Storage Client Library for C++
2+
History of Breaking Changes
3+
4+
Breaking changes in v0.3:
5+
- Changed namespace to azure::storage.
6+
- The SAS token returned by the get_shared_access_signature functions does not include a question mark (?) prefix.
7+
- The storage_credentials class stores SAS tokens without a question mark (?) prefix.
8+
- Added check to prevent uploading metadata values that are empty or consist entirely of whitespace.
9+
- Removed the constness from the return values of binary_value, datetime_value, guid_value, and string_value functions in entity_property class.
10+
- Removed the constness from the return values of filter_string and select_columns functions in table_query class.
11+
- Changed many functions to accept pass-by-reference arguments or return references as a performance improvement.
12+
- Made some constructors explicit to avoid implicit conversions. This affects these classes:
13+
canonicalizer, shared_key_blob_queue_canonicalizer, shared_key_lite_blob_queue_canonicalizer, shared_key_table_canonicalizer, shared_key_lite_table_canonicalizer,
14+
sas_authentication_handler, shared_key_authentication_handler, continuation_token, retry_info, retry_policy, cloud_queue_message, cloud_queue_client,
15+
basic_common_retry_policy, cloud_client
16+
17+
Breaking changes in v0.2:
18+
- Removed blob_continuation_token typedef (use continuation_token instead).
19+
- Renamed table_entity_property class to entity_property.
20+
- Renamed entity_property_type enum to edm_type.
21+
- Renamed query_payload_format enum to table_payload_format.
22+
23+
Breaking changes in v0.1:
24+
(None)

Changelog.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Azure Storage Client Library for C++
2+
History of Changes
3+
4+
Changes in v0.3:
5+
- Changed namespace to azure::storage.
6+
- Added support for secondary location access in Azure Storage Emulator.
7+
- Added support for downloading service stats for blob, table, and queue services to check geo-replication status.
8+
- Added download_to_file_async function in cloud_blob class.
9+
- Added upload_from_file_async function in cloud_block_blob and cloud_page_blob classes.
10+
- The HTTP status code and extended error information are populated when the table service returns an error.
11+
- The SAS token returned by the get_shared_access_signature functions does not include a question mark (?) prefix.
12+
- The storage_credentials class stores SAS tokens without a question mark (?) prefix.
13+
- Added support for accepting SAS URIs to tables and queues.
14+
- Fixed error where table query filter strings containing special characters were not encoded correctly.
15+
- Fixed intermittent error where authentication fails when trying to update a queue message.
16+
- Fixed a race condition causing invalid handle errors when sending parallel requests right after loading the module.
17+
- The ETag is populated on table entities returned from table retrieve operations.
18+
- Changed retry policies to not retry when HTTP status code 408 is received.
19+
- Added check to prevent uploading metadata values that are empty or consist entirely of whitespace.
20+
- Changed the storage_uri class to permit specifying only a secondary URI.
21+
- No value is set for the server timeout by default, which means the service's default value will be in affect unless the caller specifies a value.
22+
- Added more parameter validation.
23+
- Removed the constness from the return values of binary_value, datetime_value, guid_value, and string_value functions in entity_property class.
24+
- Removed the constness from the return values of filter_string and select_columns functions in table_query class.
25+
- Changed many functions to accept pass-by-value arguments to support move semantics.
26+
- Changed many functions to accept pass-by-reference arguments or return references as a performance improvement.
27+
- Made some constructors explicit to avoid implicit conversions. This affects these classes:
28+
canonicalizer, shared_key_blob_queue_canonicalizer, shared_key_lite_blob_queue_canonicalizer, shared_key_table_canonicalizer, shared_key_lite_table_canonicalizer,
29+
sas_authentication_handler, shared_key_authentication_handler, continuation_token, retry_info, retry_policy, cloud_queue_message, cloud_queue_client,
30+
basic_common_retry_policy, cloud_client
31+
- Major performance improvement when executing many requests in parallel.
32+
- Minor bug fixes and performance improvements.
33+
34+
Changes in v0.2:
35+
- Added sample projects for getting started with the library.
36+
- Removed blob_continuation_token typedef (use continuation_token instead).
37+
- Renamed table_entity_property class to entity_property.
38+
- Renamed entity_property_type enum to edm_type.
39+
- Renamed query_payload_format enum to table_payload_format.
40+
- Minor bug fixes and performance improvements.
41+
42+
Changes in v0.1:
43+
- Initial release of the library including support for blob, table, and queue storage abstractions and providing additional functionality such as retry logic, authentication, logging, and more.

Microsoft.WindowsAzure.Storage.autopkg

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
nuget {
22
nuspec {
33
id = wastorage;
4-
version: 0.2.0-preview;
4+
version: 0.3.0-preview;
55
title: Microsoft Windows Azure Storage Client Library for C++;
66
authors: {Microsoft Corporation};
77
owners: {Microsoft Corporation};
88
licenseUrl: "http://go.microsoft.com/fwlink/?LinkId=235170";
99
projectUrl: "http://go.microsoft.com/fwlink/?LinkId=235168";
1010
iconUrl: "http://go.microsoft.com/fwlink/?LinkID=288890";
1111
summary: "A client library for working with Windows Azure storage services including blobs, tables, and queues.";
12-
description: @"This client library enables working with the Windows Azure storage services
13-
which include the blob service for storing binary and text data, the table service for storing
14-
structured non-relational data, and the queue service for storing messages that may be accessed by a client.
12+
description: @"This client library enables working with the Windows Azure storage services which include the blob service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client.
1513
Windows Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/";
1614
releaseNotes: "Preview release";
1715
tags: { Microsoft, Azure, Storage, Table, Blob, Queue, Scalable, windowsazureofficial };

Microsoft.WindowsAzure.Storage.v120.sln

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 2013
4-
VisualStudioVersion = 12.0.21005.1
4+
VisualStudioVersion = 12.0.30110.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.WindowsAzure.Storage.v120", "Microsoft.WindowsAzure.Storage\Microsoft.WindowsAzure.Storage.v120.vcxproj", "{DCFF75B0-B142-4EC8-992F-3E48F2E3EECE}"
77
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{995340A4-EECE-4AF0-B29F-AD925585C7FC}"
9+
ProjectSection(SolutionItems) = preProject
10+
.nuget\NuGet.Config = .nuget\NuGet.Config
11+
.nuget\NuGet.exe = .nuget\NuGet.exe
12+
.nuget\NuGet.targets = .nuget\NuGet.targets
13+
EndProjectSection
14+
EndProject
815
Global
916
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1017
Debug|Win32 = Debug|Win32

0 commit comments

Comments
 (0)