Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:55:12

0001 /*
0002  * This File is part of Davix, The IO library for HTTP based protocols
0003  * Copyright (C) CERN 2015
0004  * Author: Georgios Bitzes <georgios.bitzes@cern.ch>
0005  *
0006  * This library is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Lesser General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2.1 of the License, or (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014  * Lesser General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Lesser General Public
0017  * License along with this library; if not, write to the Free Software
0018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
0019  *
0020  */
0021 
0022 #ifndef DAVIX_AZURE_UTILS_HPP
0023 #define DAVIX_AZURE_UTILS_HPP
0024 
0025 #include <params/davixrequestparams.hpp>
0026 
0027 namespace Davix {
0028 namespace Azure {
0029 
0030 namespace Resource {
0031 typedef enum {
0032     CONTAINER,
0033     BLOB
0034 } Type;
0035 }
0036 
0037 namespace Permission {
0038 const std::string READ("r");
0039 const std::string CREATE("c");
0040 const std::string WRITE("w");
0041 const std::string LIST("l");
0042 const std::string DELETE("d");
0043 
0044 typedef std::string Type;
0045 }
0046 
0047 std::string extract_azure_filename(const Uri & url);
0048 std::string extract_azure_container(const Uri & url);
0049 std::string extract_azure_account(const Uri & url);
0050 
0051 Uri transformURI(const Uri & original_url, const RequestParams & params, const bool addDelimiter);
0052 
0053 Uri signURI(const AzureSecretKey key, const std::string method, const Uri & url, const time_t signDuration);
0054 
0055 Uri signURI(const AzureSecretKey key, const Azure::Resource::Type resourceType, const Azure::Permission::Type permissions, const Uri & url,
0056             const time_t signDuration);
0057 
0058 } // Azure
0059 } // Davix
0060 
0061 
0062 
0063 #endif // DAVIX_AZURE_UTILS_HPP
0064