Move constants from _detail namespace into private hpp in src. (#6152)
* Move constants from _detail namespace into private hpp in src. * Address PR feedback, rename file to tables_constants.hpp
This commit is contained in:
Родитель
064fcad72f
Коммит
c441880042
|
@ -70,10 +70,11 @@ set(
|
|||
src/private/policies/tenant_bearer_token_policy.hpp
|
||||
src/private/policies/timeout_policy.hpp
|
||||
src/private/serializers.hpp
|
||||
src/private/tables_constants.hpp
|
||||
src/private/url_encode.hpp
|
||||
src/private/xml_wrapper.hpp
|
||||
src/serializers.cpp
|
||||
src/tables_clients.cpp
|
||||
src/table_clients.cpp
|
||||
src/tables_sas_builder.cpp
|
||||
src/xml_wrapper.cpp
|
||||
)
|
||||
|
|
|
@ -36,40 +36,6 @@ namespace Azure { namespace Data { namespace Test {
|
|||
#endif
|
||||
|
||||
namespace Azure { namespace Data { namespace Tables {
|
||||
|
||||
namespace _detail {
|
||||
/**
|
||||
* The package name of the SDK.
|
||||
*/
|
||||
constexpr static const char* TablesServicePackageName = "data-tables";
|
||||
// various strings used in the library
|
||||
constexpr static const char* OriginHeader = "Origin";
|
||||
constexpr static const char* AccessControlRequestMethodHeader = "Access-Control-Request-Method";
|
||||
constexpr static const char* ResrouceTypeService = "service";
|
||||
constexpr static const char* ComponentProperties = "properties";
|
||||
constexpr static const char* ContentTypeXml = "application/xml";
|
||||
constexpr static const char* ContentTypeJson = "application/json";
|
||||
constexpr static const char* ResourceTypeHeader = "restype";
|
||||
constexpr static const char* CompHeader = "comp";
|
||||
constexpr static const char* ContentTypeHeader = "Content-Type";
|
||||
constexpr static const char* ContentLengthHeader = "Content-Length";
|
||||
constexpr static const char* AcceptHeader = "Accept";
|
||||
constexpr static const char* PreferHeader = "Prefer";
|
||||
constexpr static const char* PreferNoContent = "return-no-content";
|
||||
constexpr static const char* AcceptFullMeta = "application/json;odata=fullmetadata";
|
||||
constexpr static const char* IfMatch = "If-Match";
|
||||
constexpr static const char* PartitionKeyFragment = "(PartitionKey='";
|
||||
constexpr static const char* RowKeyFragment = "',RowKey='";
|
||||
constexpr static const char* ClosingFragment = "')";
|
||||
constexpr static const char* Value = "value";
|
||||
constexpr static const char* TableName = "TableName";
|
||||
constexpr static const char* ODataEditLink = "odata.editLink";
|
||||
constexpr static const char* ODataId = "odata.id";
|
||||
constexpr static const char* ODataType = "odata.type";
|
||||
constexpr static const char* ODataMeta = "odata.metadata";
|
||||
constexpr static const char* ODataError = "odata.error";
|
||||
} // namespace _detail
|
||||
|
||||
/**
|
||||
* @brief Optional parameters for constructing a new TableClient.
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Centralize the string constants used by Table Clients.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Azure { namespace Data { namespace Tables { namespace _detail {
|
||||
/**
|
||||
* The package name of the SDK.
|
||||
*/
|
||||
constexpr static const char* TablesServicePackageName = "data-tables";
|
||||
// various strings used in the library
|
||||
constexpr static const char* OriginHeader = "Origin";
|
||||
constexpr static const char* AccessControlRequestMethodHeader = "Access-Control-Request-Method";
|
||||
constexpr static const char* ResrouceTypeService = "service";
|
||||
constexpr static const char* ComponentProperties = "properties";
|
||||
constexpr static const char* ContentTypeXml = "application/xml";
|
||||
constexpr static const char* ContentTypeJson = "application/json";
|
||||
constexpr static const char* ResourceTypeHeader = "restype";
|
||||
constexpr static const char* CompHeader = "comp";
|
||||
constexpr static const char* ContentTypeHeader = "Content-Type";
|
||||
constexpr static const char* ContentLengthHeader = "Content-Length";
|
||||
constexpr static const char* AcceptHeader = "Accept";
|
||||
constexpr static const char* PreferHeader = "Prefer";
|
||||
constexpr static const char* PreferNoContent = "return-no-content";
|
||||
constexpr static const char* AcceptFullMeta = "application/json;odata=fullmetadata";
|
||||
constexpr static const char* IfMatch = "If-Match";
|
||||
constexpr static const char* PartitionKeyFragment = "(PartitionKey='";
|
||||
constexpr static const char* RowKeyFragment = "',RowKey='";
|
||||
constexpr static const char* ClosingFragment = "')";
|
||||
constexpr static const char* Value = "value";
|
||||
constexpr static const char* TableName = "TableName";
|
||||
constexpr static const char* ODataEditLink = "odata.editLink";
|
||||
constexpr static const char* ODataId = "odata.id";
|
||||
constexpr static const char* ODataType = "odata.type";
|
||||
constexpr static const char* ODataMeta = "odata.metadata";
|
||||
constexpr static const char* ODataError = "odata.error";
|
||||
}}}} // namespace Azure::Data::Tables::_detail
|
|
@ -9,6 +9,7 @@
|
|||
#include "private/policies/tenant_bearer_token_policy.hpp"
|
||||
#include "private/policies/timeout_policy.hpp"
|
||||
#include "private/serializers.hpp"
|
||||
#include "private/tables_constants.hpp"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
Загрузка…
Ссылка в новой задаче