• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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() const21 int IOppTransferInformation::GetId() const
22 {
23     return id_;
24 }
25 
SetId(int id)26 void IOppTransferInformation::SetId(int id)
27 {
28     id_ = id;
29 }
30 
GetFileName() const31 std::string IOppTransferInformation::GetFileName() const
32 {
33     return fileName_;
34 }
35 
SetFileName(const std::string & fileName)36 void IOppTransferInformation::SetFileName(const std::string &fileName)
37 {
38     fileName_ = fileName;
39 }
40 
GetFilePath() const41 std::string IOppTransferInformation::GetFilePath() const
42 {
43     return filePath_;
44 }
45 
SetFilePath(const std::string & filePath)46 void IOppTransferInformation::SetFilePath(const std::string &filePath)
47 {
48     filePath_ = filePath;
49 }
50 
GetFileType() const51 std::string IOppTransferInformation::GetFileType() const
52 {
53     return fileType_;
54 }
55 
SetFileType(const std::string & fileType)56 void IOppTransferInformation::SetFileType(const std::string &fileType)
57 {
58     fileType_ = fileType;
59 }
60 
GetDeviceName() const61 std::string IOppTransferInformation::GetDeviceName() const
62 {
63     return deviceName_;
64 }
65 
SetDeviceName(const std::string & deviceName)66 void IOppTransferInformation::SetDeviceName(const std::string &deviceName)
67 {
68     deviceName_ = deviceName;
69 }
70 
GetDeviceAddress() const71 std::string IOppTransferInformation::GetDeviceAddress() const
72 {
73     return deviceAddress_;
74 }
75 
SetDeviceAddress(const std::string & deviceAddress)76 void IOppTransferInformation::SetDeviceAddress(const std::string &deviceAddress)
77 {
78     deviceAddress_ = deviceAddress;
79 }
80 
GetDirection() const81 int IOppTransferInformation::GetDirection() const
82 {
83     return direction_;
84 }
85 
SetDirection(int direction)86 void IOppTransferInformation::SetDirection(int direction)
87 {
88     direction_ = direction;
89 }
90 
GetFileFd() const91 int IOppTransferInformation::GetFileFd() const
92 {
93     return fileFd_;
94 }
95 
SetFileFd(int fileFd)96 void IOppTransferInformation::SetFileFd(int fileFd)
97 {
98     fileFd_ = fileFd;
99 }
100 
GetStatus() const101 int IOppTransferInformation::GetStatus() const
102 {
103     return status_;
104 }
105 
SetStatus(int status)106 void IOppTransferInformation::SetStatus(int status)
107 {
108     status_ = status;
109 }
110 
GetResult() const111 int IOppTransferInformation::GetResult() const
112 {
113     return result_;
114 }
115 
SetResult(int result)116 void IOppTransferInformation::SetResult(int result)
117 {
118     result_ = result;
119 }
120 
GetTimeStamp() const121 uint64_t IOppTransferInformation::GetTimeStamp() const
122 {
123     return timeStamp_;
124 }
125 
SetTimeStamp(uint64_t timeStamp)126 void IOppTransferInformation::SetTimeStamp(uint64_t timeStamp)
127 {
128     timeStamp_ = timeStamp;
129 }
130 
GetCurrentBytes() const131 uint64_t IOppTransferInformation::GetCurrentBytes() const
132 {
133     return currentBytes_;
134 }
135 
SetCurrentBytes(uint64_t currentBytes)136 void IOppTransferInformation::SetCurrentBytes(uint64_t currentBytes)
137 {
138     currentBytes_ = currentBytes;
139 }
140 
GetTotalBytes() const141 uint64_t IOppTransferInformation::GetTotalBytes() const
142 {
143     return totalBytes_;
144 }
145 
SetTotalBytes(uint64_t totalBytes)146 void IOppTransferInformation::SetTotalBytes(uint64_t totalBytes)
147 {
148     totalBytes_ = totalBytes;
149 }
150 
GetOperationNum() const151 int IOppTransferInformation::GetOperationNum() const
152 {
153     return operationNum_;
154 }
155 
SetOperationNum(int operationNum)156 void IOppTransferInformation::SetOperationNum(int operationNum)
157 {
158     operationNum_ = operationNum;
159 }
160 
GetIsAccept() const161 int IOppTransferInformation::GetIsAccept() const
162 {
163     return isAccept_;
164 }
165 
SetIsAccept(int isAccept)166 void IOppTransferInformation::SetIsAccept(int isAccept)
167 {
168     isAccept_ = isAccept;
169 }
170 
GetCurrentCount() const171 int IOppTransferInformation::GetCurrentCount() const
172 {
173     return currentCount_;
174 }
175 
SetCurrentCount(int currentCount)176 void IOppTransferInformation::SetCurrentCount(int currentCount)
177 {
178     currentCount_ = currentCount;
179 }
180 
GetTotalCount() const181 int IOppTransferInformation::GetTotalCount() const
182 {
183     return totalCount_;
184 }
185 
SetTotalCount(int totalCount)186 void IOppTransferInformation::SetTotalCount(int totalCount)
187 {
188     totalCount_ = totalCount;
189 }
190 
IOppTransferFileHolder(const std::string & filePath,const int64_t & fileSize,const int32_t & fileFd)191 IOppTransferFileHolder::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() const199 std::string IOppTransferFileHolder::GetFilePath() const
200 {
201     return filePath_;
202 }
203 
SetFilePath(const std::string & filePath)204 void IOppTransferFileHolder::SetFilePath(const std::string &filePath)
205 {
206     filePath_ = filePath;
207 }
208 
GetFileSize() const209 int64_t IOppTransferFileHolder::GetFileSize() const
210 {
211     return fileSize_;
212 }
213 
SetFileSize(const int64_t & fileSize)214 void IOppTransferFileHolder::SetFileSize(const int64_t &fileSize)
215 {
216     fileSize_ = fileSize;
217 }
218 
GetFileFd() const219 int32_t IOppTransferFileHolder::GetFileFd() const
220 {
221     return fileFd_;
222 }
223 
SetFileFd(const int32_t & fileFd)224 void IOppTransferFileHolder::SetFileFd(const int32_t &fileFd)
225 {
226     fileFd_ = fileFd;
227 }
228 }  // namespace bluetooth
229 }  // namespace OHOS