Skip to content

Commit

Permalink
Azure Storage Client Library for C++ v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MFisherMSFT committed May 15, 2014
1 parent 37e44a6 commit e92d517
Show file tree
Hide file tree
Showing 233 changed files with 10,936 additions and 28,037 deletions.
66 changes: 66 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

# Allow diff of UTF-16 text files.
*.rc diff
12 changes: 5 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ bld/
[Bb]in/
[Oo]bj/

# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
Expand Down Expand Up @@ -118,10 +115,11 @@ publish/
*.azurePubxml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/
## TODO: If the tool you use requires repositories.config, also uncomment the next line
#!packages/repositories.config
packages/
!packages/repositories.config

# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
#!packages/*/build/

# Windows Azure Build Output
csx/
Expand Down
6 changes: 6 additions & 0 deletions .nuget/NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
Binary file added .nuget/NuGet.exe
Binary file not shown.
144 changes: 144 additions & 0 deletions .nuget/NuGet.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>

<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>

<!-- Property that enables building a package from a project -->
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>

<!-- Determines if package restore consent is required to restore packages -->
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>

<!-- Download NuGet.exe if it does not already exist -->
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
</PropertyGroup>

<ItemGroup Condition=" '$(PackageSources)' == '' ">
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
<!-- 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 -->
<!--
<PackageSource Include="https://www.nuget.org/api/v2/" />
<PackageSource Include="https://my-nuget-source/nuget/" />
-->
</ItemGroup>

<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
<!-- Windows specific commands -->
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
</PropertyGroup>

<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
</PropertyGroup>

<PropertyGroup>
<PackagesProjectConfig Condition=" '$(OS)' == 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>
<PackagesProjectConfig Condition=" '$(OS)' != 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config</PackagesProjectConfig>
</PropertyGroup>

<PropertyGroup>
<PackagesConfig Condition="Exists('$(MSBuildProjectDirectory)\packages.config')">$(MSBuildProjectDirectory)\packages.config</PackagesConfig>
<PackagesConfig Condition="Exists('$(PackagesProjectConfig)')">$(PackagesProjectConfig)</PackagesConfig>
</PropertyGroup>

<PropertyGroup>
<!-- NuGet command -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>

<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>

<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>

<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>

<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>

<!-- Commands -->
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>

<!-- We need to ensure packages are restored prior to assembly resolve -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
RestorePackages;
$(BuildDependsOn);
</BuildDependsOn>

<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
$(BuildDependsOn);
BuildPackage;
</BuildDependsOn>
</PropertyGroup>

<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate nuget.exe -->
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
<!--
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
This effectively acts as a lock that makes sure that the download operation will only happen once and all
parallel builds will have to wait for it to complete.
-->
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
</Target>

<Target Name="_DownloadNuGet">
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
</Target>

<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)"
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />

<Exec Command="$(RestoreCommand)"
LogStandardErrorAsError="true"
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
</Target>

<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(BuildCommand)"
Condition=" '$(OS)' != 'Windows_NT' " />

<Exec Command="$(BuildCommand)"
LogStandardErrorAsError="true"
Condition=" '$(OS)' == 'Windows_NT' " />
</Target>

<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<OutputFilename ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Net" />
<Using Namespace="Microsoft.Build.Framework" />
<Using Namespace="Microsoft.Build.Utilities" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try {
OutputFilename = Path.GetFullPath(OutputFilename);
Log.LogMessage("Downloading latest version of NuGet.exe...");
WebClient webClient = new WebClient();
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
return true;
}
catch (Exception ex) {
Log.LogErrorFromException(ex);
return false;
}
]]>
</Code>
</Task>
</UsingTask>
</Project>
24 changes: 24 additions & 0 deletions BreakingChanges.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Azure Storage Client Library for C++
History of Breaking Changes

Breaking changes in v0.3:
- Changed namespace to azure::storage.
- The SAS token returned by the get_shared_access_signature functions does not include a question mark (?) prefix.
- The storage_credentials class stores SAS tokens without a question mark (?) prefix.
- Added check to prevent uploading metadata values that are empty or consist entirely of whitespace.
- Removed the constness from the return values of binary_value, datetime_value, guid_value, and string_value functions in entity_property class.
- Removed the constness from the return values of filter_string and select_columns functions in table_query class.
- Changed many functions to accept pass-by-reference arguments or return references as a performance improvement.
- Made some constructors explicit to avoid implicit conversions. This affects these classes:
canonicalizer, shared_key_blob_queue_canonicalizer, shared_key_lite_blob_queue_canonicalizer, shared_key_table_canonicalizer, shared_key_lite_table_canonicalizer,
sas_authentication_handler, shared_key_authentication_handler, continuation_token, retry_info, retry_policy, cloud_queue_message, cloud_queue_client,
basic_common_retry_policy, cloud_client

Breaking changes in v0.2:
- Removed blob_continuation_token typedef (use continuation_token instead).
- Renamed table_entity_property class to entity_property.
- Renamed entity_property_type enum to edm_type.
- Renamed query_payload_format enum to table_payload_format.

Breaking changes in v0.1:
(None)
43 changes: 43 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Azure Storage Client Library for C++
History of Changes

Changes in v0.3:
- Changed namespace to azure::storage.
- Added support for secondary location access in Azure Storage Emulator.
- Added support for downloading service stats for blob, table, and queue services to check geo-replication status.
- Added download_to_file_async function in cloud_blob class.
- Added upload_from_file_async function in cloud_block_blob and cloud_page_blob classes.
- The HTTP status code and extended error information are populated when the table service returns an error.
- The SAS token returned by the get_shared_access_signature functions does not include a question mark (?) prefix.
- The storage_credentials class stores SAS tokens without a question mark (?) prefix.
- Added support for accepting SAS URIs to tables and queues.
- Fixed error where table query filter strings containing special characters were not encoded correctly.
- Fixed intermittent error where authentication fails when trying to update a queue message.
- Fixed a race condition causing invalid handle errors when sending parallel requests right after loading the module.
- The ETag is populated on table entities returned from table retrieve operations.
- Changed retry policies to not retry when HTTP status code 408 is received.
- Added check to prevent uploading metadata values that are empty or consist entirely of whitespace.
- Changed the storage_uri class to permit specifying only a secondary URI.
- 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.
- Added more parameter validation.
- Removed the constness from the return values of binary_value, datetime_value, guid_value, and string_value functions in entity_property class.
- Removed the constness from the return values of filter_string and select_columns functions in table_query class.
- Changed many functions to accept pass-by-value arguments to support move semantics.
- Changed many functions to accept pass-by-reference arguments or return references as a performance improvement.
- Made some constructors explicit to avoid implicit conversions. This affects these classes:
canonicalizer, shared_key_blob_queue_canonicalizer, shared_key_lite_blob_queue_canonicalizer, shared_key_table_canonicalizer, shared_key_lite_table_canonicalizer,
sas_authentication_handler, shared_key_authentication_handler, continuation_token, retry_info, retry_policy, cloud_queue_message, cloud_queue_client,
basic_common_retry_policy, cloud_client
- Major performance improvement when executing many requests in parallel.
- Minor bug fixes and performance improvements.

Changes in v0.2:
- Added sample projects for getting started with the library.
- Removed blob_continuation_token typedef (use continuation_token instead).
- Renamed table_entity_property class to entity_property.
- Renamed entity_property_type enum to edm_type.
- Renamed query_payload_format enum to table_payload_format.
- Minor bug fixes and performance improvements.

Changes in v0.1:
- 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.
6 changes: 2 additions & 4 deletions Microsoft.WindowsAzure.Storage.autopkg
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
nuget {
nuspec {
id = wastorage;
version: 0.2.0-preview;
version: 0.3.0-preview;
title: Microsoft Windows Azure Storage Client Library for C++;
authors: {Microsoft Corporation};
owners: {Microsoft Corporation};
licenseUrl: "http://go.microsoft.com/fwlink/?LinkId=235170";
projectUrl: "http://go.microsoft.com/fwlink/?LinkId=235168";
iconUrl: "http://go.microsoft.com/fwlink/?LinkID=288890";
summary: "A client library for working with Windows Azure storage services including blobs, tables, and queues.";
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.
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.
Windows Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/";
releaseNotes: "Preview release";
tags: { Microsoft, Azure, Storage, Table, Blob, Queue, Scalable, windowsazureofficial };
Expand Down
9 changes: 8 additions & 1 deletion Microsoft.WindowsAzure.Storage.v120.sln
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@

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

0 comments on commit e92d517

Please sign in to comment.