Main docs: https://pigweed.dev/pw_transfer.
◆ AtomicFileTransferHandler()
pw::transfer::AtomicFileTransferHandler::AtomicFileTransferHandler |
( |
uint32_t |
resource_id, |
|
|
std::string_view |
file_path |
|
) |
| |
|
inline |
- Parameters
-
[in] | resource_id | An ID for the resource that's being transferred. |
[in] | file_path | The target file to update. |
◆ FinalizeRead()
void pw::transfer::AtomicFileTransferHandler::FinalizeRead |
( |
Status |
| ) |
|
|
override |
Handler function that is called by the transfer thread after a read transfer completes.
- Parameters
-
[in] | Status | A pw::Status object provided by the transfer thread indicating whether the transfer succeeded. |
- Precondition
- The read transfer is done before the call to this method.
◆ FinalizeWrite()
Status pw::transfer::AtomicFileTransferHandler::FinalizeWrite |
( |
Status |
| ) |
|
|
override |
Indicates whether the write transfer was successful.
- Precondition
- The write transfer is done.
- Returns
embed:rst:leading-asterisk
*
* .. pw-status-codes::
*
* OK: The transfer data was successfully written.
*
*
◆ PrepareRead()
Status pw::transfer::AtomicFileTransferHandler::PrepareRead |
( |
| ) |
|
|
override |
Prepares AtomicFileTransferHandler
for a read transfer.
- Precondition
- The read transfer has not been initialized before the call to this method.
- Returns
embed:rst:leading-asterisk
*
* .. pw-status-codes::
*
* OK: ``AtomicFileTransferHandler`` is ready for the transfer.
*
*
◆ PrepareWrite()
Status pw::transfer::AtomicFileTransferHandler::PrepareWrite |
( |
| ) |
|
|
override |
Prepares AtomicFileTransferHandler
for a write transfer.
- Precondition
- The write transfer has not been initialized before the call to this method.
- Returns
embed:rst:leading-asterisk
*
* .. pw-status-codes::
*
* OK: ``AtomicFileTransferHandler`` is ready for the transfer.
*
*