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

Azure Storage Client Library for C++ v0.4.0 #14

Merged
1 commit merged into from
Dec 3, 2014
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
3 changes: 3 additions & 0 deletions BreakingChanges.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Azure Storage Client Library for C++
History of Breaking Changes

Breaking Changes in v0.4:
- Upgraded Casablanca dependency to 2.3.0

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.
Expand Down
16 changes: 16 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
Azure Storage Client Library for C++
History of Changes

Changes in v0.4:
- Now supports building on Linux
- Added http_buffer_size request option to control the internal buffer size used in the HTTP layer when downloading data. The default size is 64KB.
- Blob downloads that are interrupted resume automatically from where the download left off when being retried.
- Performance improvement when uploading and downloading blobs.
- Added const version of the operation_context::user_headers() function.
- Fixed incorrect initialization of some members in the cloud_blob_container_properties and retry_info classes.
- Added a default of 24 days for a maximum execution time for an operation
- Changed the exception type if you upload a blob from a seekable stream but the stream is too short for the desired blob length.
- Used to throw azure::storage::storage_exception in some cases, now throws std::invalid_argument always.
- Now checks for this case explicitly before the upload is started.
- Non-seekable streams still throw std::invalid_argument as before.
- Fixed several bugs, including incorrect uses of std::move and compile-time differences between Visual Studio and g++.
- Added client request ID into log lines.
- Upgraded Casablanca dependency to 2.3.0

Changes in v0.3:
- Changed namespace to azure::storage.
- Added support for secondary location access in Azure Storage Emulator.
Expand Down
10 changes: 5 additions & 5 deletions Microsoft.WindowsAzure.Storage.autopkg
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
nuget {
nuspec {
id = wastorage;
version: 0.3.0-preview;
version: 0.4.0-preview;
title: Microsoft 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 Azure storage services including blobs, tables, and queues.";
description: @"This client library enables working with the 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.
Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/";
summary: "A client library for working with Microsoft Azure storage services including blobs, tables, and queues.";
description: @"This client library enables working with the Microsoft 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.
Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/";
releaseNotes: "Preview release";
tags: { Microsoft, Azure, Storage, Table, Blob, Queue, Scalable, windowsazureofficial };
}

dependencies {
packages: {
cpprestsdk/2.0.1
cpprestsdk/2.3.0
};
}

Expand Down
102 changes: 102 additions & 0 deletions Microsoft.WindowsAzure.Storage/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
cmake_minimum_required(VERSION 2.6)
project(azurestorage)

enable_testing()

set(WARNINGS)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

# Platform (not compiler) specific settings
if(IOS)
set(IOS_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../Build_iOS")
set(Boost_FRAMEWORK "-F ${IOS_SOURCE_DIR} -framework boost")
set(Boost_INCLUDE_DIR "${IOS_SOURCE_DIR}/boost.framework/Headers")

set(OPENSSL_FOUND 1)
set(OPENSSL_INCLUDE_DIR "${IOS_SOURCE_DIR}/openssl/include")
set(OPENSSL_LIBRARIES
"${IOS_SOURCE_DIR}/openssl/lib/libcrypto.a"
"${IOS_SOURCE_DIR}/openssl/lib/libssl.a"
)

set(CASABLANCA_INCLUDE_DIRS "${IOS_SOURCE_DIR}/casablanca/include")
set(CASABLANCA_LIBRARIES "${IOS_SOURCE_DIR}/casablanca/lib/libcasablanca.a")

# The cxx_flags must be set here, because the ios-cmake toolchain file unfortunately sets "-headerpad_max_install_names" which is not a valid clang flag.
set(CMAKE_CXX_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden")

set(BUILD_SHARED_LIBS OFF)
elseif(UNIX) # This includes OSX
find_package(Boost REQUIRED COMPONENTS log log_setup random system thread locale regex filesystem)
find_package(Threads REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(LibXML++ REQUIRED)
find_package(UUID REQUIRED)
find_package(Casablanca REQUIRED)

set(UNITTEST_LIBRARY "${CMAKE_SOURCE_DIR}/tests/UnitTest++/libUnitTest++.a")

option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
elseif(WIN32)
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)

add_definitions(-DUNICODE)

if(NOT BUILD_SHARED_LIBS)
# This causes cmake to not link the test libraries separately, but instead hold onto their object files.
set(TEST_LIBRARY_TARGET_TYPE OBJECT)
endif()

set(LIB lib)
else()
message("-- Unsupported Build Platform.")
endif()

# Compiler (not platform) specific settings
if(("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") OR IOS)
message("-- Setting clang options")

set(WARNINGS "-Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls")
set(OSX_SUPPRESSIONS "-Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder")
set(WARNINGS "${WARNINGS} ${OSX_SUPPRESSIONS}")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing")
set(STRICT_CXX_FLAGS ${WARNINGS} "-Werror -pedantic")
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
message("-- Setting gcc options")

set(WARNINGS "-Wall -Wextra -Wunused-parameter -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls -Wunreachable-code")
set(LINUX_SUPPRESSIONS "-Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-unused-function -Wno-char-subscripts -Wno-switch -Wno-unused-but-set-parameter -Wno-unused-value -Wno-unused-local-typedefs -Wno-unused-parameter")

set(WARNINGS "${WARNINGS} ${LINUX_SUPPRESSIONS}")
set(LD_FLAGS "${LD_FLAGS} -Wl,-z,defs")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing")
set(STRICT_CXX_FLAGS ${WARNINGS} "-Werror -pedantic")
add_definitions(-DBOOST_LOG_DYN_LINK)
else()
message("-- Unknown compiler, success is doubtful.")
endif()

# Reconfigure final output directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)

set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes)
set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIRS} ${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${LibXML++_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS})

set(AZURESTORAGE_LIBRARY azurestorage)
set(AZURESTORAGE_LIBRARY_TEST azurestoragetest)
set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${LibXML++_LIBRARIES} ${UUID_LIBRARIES})

include_directories(${AZURESTORAGE_INCLUDE_DIRS})

add_subdirectory(src)
add_subdirectory(tests)
28 changes: 28 additions & 0 deletions Microsoft.WindowsAzure.Storage/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
MODE = $(shell getconf LONG_BIT)

debug:
mkdir -vp build.debug$(MODE)
cd build.debug$(MODE) && CXX=g++-4.8 cmake .. -DCMAKE_BUILD_TYPE=Debug && cmake --build .

release:
mkdir -vp build.release$(MODE)
cd build.release$(MODE) && CXX=g++-4.8 cmake .. -DCMAKE_BUILD_TYPE=Release && cmake --build .

clean:
@[ -e src ] # sanity check directory
@find . -iname *.so -exec rm '{}' \;
@find . -iname *.o -exec rm '{}' \;
@find . -iname *.d -exec rm '{}' \;
@find ../Binaries -iname *.so -exec rm '{}' \;
@find ../Binaries -iname *.txt -exec rm '{}' \;
@find ../Binaries -iname *.d -exec rm '{}' \;
@find ../Binaries -iname SearchFile -exec rm '{}' \;
@find ../Binaries -iname BingRequest -exec rm '{}' \;
@find ../Binaries -iname syncdir -exec rm '{}' \;
@find ../Binaries -iname test_runner -exec rm '{}' \;
@rm -rf build.debug* build.release*


all: debug release

.PHONY: all clean release debug
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\cpprestsdk.2.0.1\build\native\cpprestsdk.props" Condition="Exists('..\packages\cpprestsdk.2.0.1\build\native\cpprestsdk.props')" />
<Import Project="..\packages\cpprestsdk.2.3.0\build\native\cpprestsdk.props" Condition="Exists('..\packages\cpprestsdk.2.3.0\build\native\cpprestsdk.props')" />
<Import Project="..\packages\openssl.1.0.1.25\build\native\openssl.props" Condition="Exists('..\packages\openssl.1.0.1.25\build\native\openssl.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand Down Expand Up @@ -103,7 +104,7 @@
<PreprocessorDefinitions>WASTORAGE_DLL;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<AdditionalOptions>/we4100 /Zm129 %(AdditionalOptions) /bigobj</AdditionalOptions>
<AdditionalOptions>/we4100 /Zm150 %(AdditionalOptions) /bigobj</AdditionalOptions>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalIncludeDirectories>includes</AdditionalIncludeDirectories>
</ClCompile>
Expand All @@ -121,7 +122,7 @@
<PreprocessorDefinitions>WASTORAGE_DLL;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<AdditionalOptions>/we4100 /Zm129 %(AdditionalOptions) /bigobj</AdditionalOptions>
<AdditionalOptions>/we4100 /Zm150 %(AdditionalOptions) /bigobj</AdditionalOptions>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalIncludeDirectories>includes</AdditionalIncludeDirectories>
</ClCompile>
Expand All @@ -142,7 +143,7 @@
<SDLCheck>true</SDLCheck>
<EnablePREfast>false</EnablePREfast>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<AdditionalOptions>/we4100 /Zm122 %(AdditionalOptions) /bigobj</AdditionalOptions>
<AdditionalOptions>/we4100 /Zm150 %(AdditionalOptions) /bigobj</AdditionalOptions>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalIncludeDirectories>includes</AdditionalIncludeDirectories>
</ClCompile>
Expand All @@ -165,7 +166,7 @@
<SDLCheck>true</SDLCheck>
<EnablePREfast>false</EnablePREfast>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<AdditionalOptions>/we4100 /Zm122 %(AdditionalOptions) /bigobj</AdditionalOptions>
<AdditionalOptions>/we4100 /Zm150 %(AdditionalOptions) /bigobj</AdditionalOptions>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalIncludeDirectories>includes</AdditionalIncludeDirectories>
</ClCompile>
Expand Down Expand Up @@ -193,7 +194,7 @@
<ClInclude Include="includes\wascore\blobstreams.h" />
<ClInclude Include="includes\wascore\constants.h" />
<ClInclude Include="includes\wascore\executor.h" />
<ClInclude Include="includes\wascore\hash_windows.h" />
<ClInclude Include="includes\wascore\hashing.h" />
<ClInclude Include="includes\wascore\logging.h" />
<ClInclude Include="includes\wascore\protocol.h" />
<ClInclude Include="includes\wascore\protocol_xml.h" />
Expand All @@ -208,6 +209,7 @@
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\cloud_common.cpp" />
<ClCompile Include="src\authentication.cpp" />
<ClCompile Include="src\basic_types.cpp" />
<ClCompile Include="src\blob_request_factory.cpp" />
Expand All @@ -229,8 +231,8 @@
<ClCompile Include="src\cloud_storage_account.cpp" />
<ClCompile Include="src\cloud_table.cpp" />
<ClCompile Include="src\cloud_table_client.cpp" />
<ClCompile Include="src\hash_windows.cpp" />
<ClCompile Include="src\logging_windows.cpp" />
<ClCompile Include="src\hashing.cpp" />
<ClCompile Include="src\logging.cpp" />
<ClCompile Include="src\mime_multipart_helper.cpp" />
<ClCompile Include="src\operation_context.cpp" />
<ClCompile Include="src\protocol_json.cpp" />
Expand All @@ -254,7 +256,6 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\util_windows.cpp" />
<ClCompile Include="src\xmlhelpers.cpp" />
</ItemGroup>
<ItemGroup>
Expand All @@ -265,7 +266,11 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\cpprestsdk.2.0.1\build\native\cpprestsdk.targets" Condition="Exists('..\packages\cpprestsdk.2.0.1\build\native\cpprestsdk.targets')" />
<Import Project="..\packages\zlib.redist.1.2.8.7\build\native\zlib.redist.targets" Condition="Exists('..\packages\zlib.redist.1.2.8.7\build\native\zlib.redist.targets')" />
<Import Project="..\packages\zlib.1.2.8.7\build\native\zlib.targets" Condition="Exists('..\packages\zlib.1.2.8.7\build\native\zlib.targets')" />
<Import Project="..\packages\openssl.redist.1.0.1.25\build\native\openssl.redist.targets" Condition="Exists('..\packages\openssl.redist.1.0.1.25\build\native\openssl.redist.targets')" />
<Import Project="..\packages\openssl.1.0.1.25\build\native\openssl.targets" Condition="Exists('..\packages\openssl.1.0.1.25\build\native\openssl.targets')" />
<Import Project="..\packages\cpprestsdk.2.3.0\build\native\cpprestsdk.targets" Condition="Exists('..\packages\cpprestsdk.2.3.0\build\native\cpprestsdk.targets')" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
</ImportGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
<ClInclude Include="includes\wascore\executor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="includes\wascore\hash_windows.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="includes\wascore\logging.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down Expand Up @@ -69,9 +66,6 @@
<ClInclude Include="includes\targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClCompile Include="src\queue_request_factory.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClInclude Include="includes\was\auth.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down Expand Up @@ -102,6 +96,9 @@
<ClInclude Include="includes\wascore\protocol_json.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="includes\wascore\hashing.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\async_semaphore.cpp">
Expand Down Expand Up @@ -164,9 +161,6 @@
<ClCompile Include="src\cloud_table_client.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\hash_windows.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\navigation.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -197,9 +191,6 @@
<ClCompile Include="src\table_query.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\util_windows.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\xmlhelpers.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand All @@ -215,9 +206,6 @@
<ClCompile Include="src\basic_types.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\logging_windows.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\operation_context.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand All @@ -230,6 +218,18 @@
<ClCompile Include="src\protocol_json.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\cloud_common.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\queue_request_factory.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\logging.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\hashing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="version.rc">
Expand Down
Loading