1 /* 2 * Copyright 2009-2017 Alibaba Cloud All rights reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #include <alibabacloud/oss/ServiceRequest.h> 18 #include <sstream> 19 20 using namespace AlibabaCloud::OSS; 21 ServiceRequest()22ServiceRequest::ServiceRequest() : 23 flags_(0), 24 path_("/"), 25 responseStreamFactory_([] { return std::make_shared<std::stringstream>(); }) 26 { 27 transferProgress_.Handler = nullptr; 28 transferProgress_.UserData = nullptr; 29 } 30 Path() const31std::string ServiceRequest::Path() const 32 { 33 return path_; 34 } 35 Flags() const36int ServiceRequest::Flags() const 37 { 38 return flags_; 39 } 40 ResponseStreamFactory() const41const IOStreamFactory& ServiceRequest::ResponseStreamFactory() const 42 { 43 return responseStreamFactory_; 44 } 45 setResponseStreamFactory(const IOStreamFactory & factory)46void ServiceRequest::setResponseStreamFactory(const IOStreamFactory& factory) 47 { 48 responseStreamFactory_ = factory; 49 } 50 TransferProgress() const51const AlibabaCloud::OSS::TransferProgress & ServiceRequest::TransferProgress() const 52 { 53 return transferProgress_; 54 } 55 setTransferProgress(const AlibabaCloud::OSS::TransferProgress & arg)56void ServiceRequest::setTransferProgress(const AlibabaCloud::OSS::TransferProgress &arg) 57 { 58 transferProgress_ = arg; 59 } 60 setPath(const std::string & path)61void ServiceRequest::setPath(const std::string & path) 62 { 63 path_ = path; 64 } 65 setFlags(int flags)66void ServiceRequest::setFlags(int flags) 67 { 68 flags_ = flags; 69 } 70