wut  v1.7.0
Wii U Toolchain
KillerNotificationTransferRecordStream.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <nn/result.h>
4 #include <nn/sl/FileStream.h>
5 #include <wut.h>
6 
7 #ifdef __cplusplus
8 
9 namespace nn::sl {
10  namespace details {
12  void *vtable;
14  uint32_t unkn1;
15  WUT_UNKNOWN_BYTES(0x84);
18  WUT_CHECK_OFFSET(KillerNotificationTransferRecordStreamInternal, 0x00, vtable);
19  WUT_CHECK_OFFSET(KillerNotificationTransferRecordStreamInternal, 0x04, fileStream);
20  WUT_CHECK_OFFSET(KillerNotificationTransferRecordStreamInternal, 0x14, unkn1);
21  } // namespace details
22 
24  public:
26  }
27 
28  nn::Result Read(uint32_t *bytesRead, void *buffer, uint32_t readSize) override {
29  auto *base = reinterpret_cast<details::IStreamInternal *>(&mInstance);
30  return base->vtable->ReadFn(base, bytesRead, buffer, readSize);
31  }
32  nn::Result Write(uint32_t *bytesWritten, void *buffer, uint32_t readSize) override {
33  auto *base = reinterpret_cast<details::IStreamInternal *>(&mInstance);
34  return base->vtable->WriteFn(base, bytesWritten, buffer, readSize);
35  }
36  nn::Result GetSize(uint32_t *fileSize) override {
37  auto *base = reinterpret_cast<details::IStreamInternal *>(&mInstance);
38  return base->vtable->GetSizeFn(base, fileSize);
39  }
40  nn::Result Seek(int32_t offset, nn::sl::SeekOrigin seekOrigin) override {
41  auto *base = reinterpret_cast<details::IStreamInternal *>(&mInstance);
42  return base->vtable->SeekFn(base, offset, seekOrigin);
43  }
44 
46 
48  return reinterpret_cast<details::IStreamInternal *>(mInstance);
49  }
50 
51  private:
53  };
54 
56 } // namespace nn::sl
57 
58 #endif
Result value type used by nn libraries.
Definition: result.h:68
nn::Result Read(uint32_t *bytesRead, void *buffer, uint32_t readSize) override
KillerNotificationTransferRecordStream(details::KillerNotificationTransferRecordStreamInternal *instance)
nn::Result Write(uint32_t *bytesWritten, void *buffer, uint32_t readSize) override
~KillerNotificationTransferRecordStream() override=default
nn::Result Seek(int32_t offset, nn::sl::SeekOrigin seekOrigin) override
struct nn::sl::details::KillerNotificationTransferRecordStreamInternal KillerNotificationTransferRecordStreamInternal
IStreamInternalVTable * vtable
nn::sl::details::IStreamBase & GetDefaultKillerNotificationTransferRecordStream()
SeekOrigin
Definition: sl_cpp.h:266