1 /* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "opp_transfer_information.h" 17 #include "string" 18 19 namespace OHOS { 20 namespace bluetooth { GetId() const21int IOppTransferInformation::GetId() const 22 { 23 return id_; 24 } 25 SetId(int id)26void IOppTransferInformation::SetId(int id) 27 { 28 id_ = id; 29 } 30 GetFileName() const31std::string IOppTransferInformation::GetFileName() const 32 { 33 return fileName_; 34 } 35 SetFileName(const std::string & fileName)36void IOppTransferInformation::SetFileName(const std::string &fileName) 37 { 38 fileName_ = fileName; 39 } 40 GetFilePath() const41std::string IOppTransferInformation::GetFilePath() const 42 { 43 return filePath_; 44 } 45 SetFilePath(const std::string & filePath)46void IOppTransferInformation::SetFilePath(const std::string &filePath) 47 { 48 filePath_ = filePath; 49 } 50 GetFileType() const51std::string IOppTransferInformation::GetFileType() const 52 { 53 return fileType_; 54 } 55 SetFileType(const std::string & fileType)56void IOppTransferInformation::SetFileType(const std::string &fileType) 57 { 58 fileType_ = fileType; 59 } 60 GetDeviceName() const61std::string IOppTransferInformation::GetDeviceName() const 62 { 63 return deviceName_; 64 } 65 SetDeviceName(const std::string & deviceName)66void IOppTransferInformation::SetDeviceName(const std::string &deviceName) 67 { 68 deviceName_ = deviceName; 69 } 70 GetDeviceAddress() const71std::string IOppTransferInformation::GetDeviceAddress() const 72 { 73 return deviceAddress_; 74 } 75 SetDeviceAddress(const std::string & deviceAddress)76void IOppTransferInformation::SetDeviceAddress(const std::string &deviceAddress) 77 { 78 deviceAddress_ = deviceAddress; 79 } 80 GetDirection() const81int IOppTransferInformation::GetDirection() const 82 { 83 return direction_; 84 } 85 SetDirection(int direction)86void IOppTransferInformation::SetDirection(int direction) 87 { 88 direction_ = direction; 89 } 90 GetFileFd() const91int IOppTransferInformation::GetFileFd() const 92 { 93 return fileFd_; 94 } 95 SetFileFd(int fileFd)96void IOppTransferInformation::SetFileFd(int fileFd) 97 { 98 fileFd_ = fileFd; 99 } 100 GetStatus() const101int IOppTransferInformation::GetStatus() const 102 { 103 return status_; 104 } 105 SetStatus(int status)106void IOppTransferInformation::SetStatus(int status) 107 { 108 status_ = status; 109 } 110 GetResult() const111int IOppTransferInformation::GetResult() const 112 { 113 return result_; 114 } 115 SetResult(int result)116void IOppTransferInformation::SetResult(int result) 117 { 118 result_ = result; 119 } 120 GetTimeStamp() const121uint64_t IOppTransferInformation::GetTimeStamp() const 122 { 123 return timeStamp_; 124 } 125 SetTimeStamp(uint64_t timeStamp)126void IOppTransferInformation::SetTimeStamp(uint64_t timeStamp) 127 { 128 timeStamp_ = timeStamp; 129 } 130 GetCurrentBytes() const131uint64_t IOppTransferInformation::GetCurrentBytes() const 132 { 133 return currentBytes_; 134 } 135 SetCurrentBytes(uint64_t currentBytes)136void IOppTransferInformation::SetCurrentBytes(uint64_t currentBytes) 137 { 138 currentBytes_ = currentBytes; 139 } 140 GetTotalBytes() const141uint64_t IOppTransferInformation::GetTotalBytes() const 142 { 143 return totalBytes_; 144 } 145 SetTotalBytes(uint64_t totalBytes)146void IOppTransferInformation::SetTotalBytes(uint64_t totalBytes) 147 { 148 totalBytes_ = totalBytes; 149 } 150 GetOperationNum() const151int IOppTransferInformation::GetOperationNum() const 152 { 153 return operationNum_; 154 } 155 SetOperationNum(int operationNum)156void IOppTransferInformation::SetOperationNum(int operationNum) 157 { 158 operationNum_ = operationNum; 159 } 160 GetIsAccept() const161int IOppTransferInformation::GetIsAccept() const 162 { 163 return isAccept_; 164 } 165 SetIsAccept(int isAccept)166void IOppTransferInformation::SetIsAccept(int isAccept) 167 { 168 isAccept_ = isAccept; 169 } 170 GetCurrentCount() const171int IOppTransferInformation::GetCurrentCount() const 172 { 173 return currentCount_; 174 } 175 SetCurrentCount(int currentCount)176void IOppTransferInformation::SetCurrentCount(int currentCount) 177 { 178 currentCount_ = currentCount; 179 } 180 GetTotalCount() const181int IOppTransferInformation::GetTotalCount() const 182 { 183 return totalCount_; 184 } 185 SetTotalCount(int totalCount)186void IOppTransferInformation::SetTotalCount(int totalCount) 187 { 188 totalCount_ = totalCount; 189 } 190 IOppTransferFileHolder(const std::string & filePath,const int64_t & fileSize,const int32_t & fileFd)191IOppTransferFileHolder::IOppTransferFileHolder(const std::string &filePath, 192 const int64_t &fileSize, const int32_t &fileFd) 193 { 194 filePath_ = filePath; 195 fileSize_ = fileSize; 196 fileFd_ = fileFd; 197 } 198 GetFilePath() const199std::string IOppTransferFileHolder::GetFilePath() const 200 { 201 return filePath_; 202 } 203 SetFilePath(const std::string & filePath)204void IOppTransferFileHolder::SetFilePath(const std::string &filePath) 205 { 206 filePath_ = filePath; 207 } 208 GetFileSize() const209int64_t IOppTransferFileHolder::GetFileSize() const 210 { 211 return fileSize_; 212 } 213 SetFileSize(const int64_t & fileSize)214void IOppTransferFileHolder::SetFileSize(const int64_t &fileSize) 215 { 216 fileSize_ = fileSize; 217 } 218 GetFileFd() const219int32_t IOppTransferFileHolder::GetFileFd() const 220 { 221 return fileFd_; 222 } 223 SetFileFd(const int32_t & fileFd)224void IOppTransferFileHolder::SetFileFd(const int32_t &fileFd) 225 { 226 fileFd_ = fileFd; 227 } 228 } // namespace bluetooth 229 } // namespace OHOS