[+] IProcessSectionMapView::LockSwap
[+] IProcessSectionMapView::UnlockSwap [*] Fix critical tag under ILogger [*] Added missing includes to experimental APIs
This commit is contained in:
parent
0c494cb99a
commit
b2311a8824
@ -34,3 +34,7 @@
|
||||
#if 1
|
||||
#include "IOExperimental.hpp"
|
||||
#endif
|
||||
|
||||
#include "Protocol/Protocol.hpp"
|
||||
|
||||
#include "TLS/TLS.hpp"
|
@ -12,10 +12,10 @@ namespace Aurora::IO::TLS
|
||||
struct ICertificateChain
|
||||
{
|
||||
virtual AuUInt32 GetCertificateCount() = 0;
|
||||
virtual AuSPtr<AuMemoryViewRead> GetCertificate(AuUInt32 idx) = 0;
|
||||
virtual AuSPtr<Memory::MemoryViewRead> GetCertificate(AuUInt32 idx) = 0;
|
||||
virtual Crypto::X509::DecodedCertificate GetCertificateDetails(AuUInt32 idx) = 0;
|
||||
};
|
||||
|
||||
AUKN_SYM AuSPtr<ICertificateChain> ChainFromOne(const AuMemoryViewRead &read);
|
||||
AUKN_SYM AuSPtr<ICertificateChain> ChainFromMany(const AuList<AuMemoryViewRead> &read);
|
||||
AUKN_SYM AuSPtr<ICertificateChain> ChainFromOne(const Memory::MemoryViewRead &read);
|
||||
AUKN_SYM AuSPtr<ICertificateChain> ChainFromMany(const AuList<Memory::MemoryViewRead> &read);
|
||||
}
|
@ -26,7 +26,7 @@ namespace Aurora::IO::TLS
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
AuByteBuffer serverTransportId {};
|
||||
Memory::ByteBuffer serverTransportId {};
|
||||
|
||||
int iServerCookies { 0 };
|
||||
|
||||
@ -117,7 +117,7 @@ namespace Aurora::IO::TLS
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
AuNet::ETransportProtocol transportProtocol { AuNet::ETransportProtocol::eProtocolTCP };
|
||||
Net::ETransportProtocol transportProtocol { Net::ETransportProtocol::eProtocolTCP };
|
||||
|
||||
/**
|
||||
* @brief
|
||||
|
@ -11,8 +11,8 @@ namespace Aurora::IO::TLS
|
||||
{
|
||||
struct TLSPrivateKeyPair
|
||||
{
|
||||
AuList<AuByteBuffer> certificateChain;
|
||||
AuByteBuffer privateKey;
|
||||
AuList<Memory::ByteBuffer> certificateChain;
|
||||
Memory::ByteBuffer privateKey;
|
||||
AuString sPassword;
|
||||
};
|
||||
}
|
@ -90,7 +90,7 @@ namespace Aurora::Logging
|
||||
template<typename ... T>
|
||||
inline void LogCritical(const AuString &line, T&& ... args)
|
||||
{
|
||||
WriteLinef(static_cast<AuUInt8>(ELogLevel::eCritical), EAnsiColor::eBoldRed, "Warn", line, AuForward<T>(args)...);
|
||||
WriteLinef(static_cast<AuUInt8>(ELogLevel::eCritical), EAnsiColor::eBoldRed, "Critical", line, AuForward<T>(args)...);
|
||||
}
|
||||
|
||||
template<typename ... T>
|
||||
|
@ -20,5 +20,8 @@ namespace Aurora::Process
|
||||
|
||||
virtual AuUInt8 *GetBasePointer() = 0;
|
||||
virtual AuUInt8 *GetPointer(AuUInt offset) = 0;
|
||||
|
||||
virtual bool LockSwap() = 0;
|
||||
virtual bool UnlockSwap() = 0;
|
||||
};
|
||||
}
|
@ -73,4 +73,24 @@ namespace Aurora::Process
|
||||
{
|
||||
return this->uAddress ? AuReinterpretCast<AuUInt8 *>(this->uAddress) + offset : 0;
|
||||
}
|
||||
|
||||
bool ProcessSectionFileMapView::LockSwap()
|
||||
{
|
||||
if (!this->uAddress)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return AuMemory::SwapLock::Lock({ { this->uAddress, this->uLength} });
|
||||
}
|
||||
|
||||
bool ProcessSectionFileMapView::UnlockSwap()
|
||||
{
|
||||
if (!this->uAddress)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return AuMemory::SwapLock::Unlock({ { this->uAddress, this->uLength} });
|
||||
}
|
||||
}
|
@ -16,9 +16,9 @@ namespace Aurora::Process
|
||||
virtual ~ProcessSectionFileMapView();
|
||||
ProcessSectionFileMapView(AuUInt uAddress, HANDLE hFileSection);
|
||||
|
||||
virtual void Unmap() override;
|
||||
void Unmap() override;
|
||||
|
||||
virtual bool Flush(AuUInt offset, AuUInt length) override;
|
||||
bool Flush(AuUInt offset, AuUInt length) override;
|
||||
|
||||
AuUInt GetBaseAddress() override;
|
||||
AuUInt GetAddress(AuUInt offset) override;
|
||||
@ -26,6 +26,9 @@ namespace Aurora::Process
|
||||
AuUInt8 *GetBasePointer() override;
|
||||
AuUInt8 *GetPointer(AuUInt offset) override;
|
||||
|
||||
bool LockSwap() override;
|
||||
bool UnlockSwap() override;
|
||||
|
||||
ProcessSectionView *pProcessGlobalHint {};
|
||||
AuSPtr<IProcessSectionView> pSharedSectionHint {};
|
||||
AuUInt uOffset {};
|
||||
|
@ -87,4 +87,24 @@ namespace Aurora::Process
|
||||
{
|
||||
return this->uAddress ? AuReinterpretCast<AuUInt8 *>(this->uAddress) + offset : 0;
|
||||
}
|
||||
|
||||
bool ProcessSectionFileMapView::LockSwap()
|
||||
{
|
||||
if (!this->uAddress)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return AuMemory::SwapLock::Lock({ { this->uAddress, this->uLength} });
|
||||
}
|
||||
|
||||
bool ProcessSectionFileMapView::UnlockSwap()
|
||||
{
|
||||
if (!this->uAddress)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return AuMemory::SwapLock::Unlock({ { this->uAddress, this->uLength} });
|
||||
}
|
||||
}
|
@ -16,9 +16,9 @@ namespace Aurora::Process
|
||||
ProcessSectionFileMapView(AuUInt uAddress, AuUInt uLength, bool bShouldUnmap, int optFd = -1);
|
||||
virtual ~ProcessSectionFileMapView();
|
||||
|
||||
virtual void Unmap() override;
|
||||
void Unmap() override;
|
||||
|
||||
virtual bool Flush(AuUInt offset, AuUInt length) override;
|
||||
bool Flush(AuUInt offset, AuUInt length) override;
|
||||
|
||||
AuUInt GetBaseAddress() override;
|
||||
AuUInt GetAddress(AuUInt offset) override;
|
||||
@ -28,6 +28,9 @@ namespace Aurora::Process
|
||||
|
||||
AuSPtr<IProcessSectionView> pSharedSectionHint {};
|
||||
|
||||
bool LockSwap() override;
|
||||
bool UnlockSwap() override;
|
||||
|
||||
private:
|
||||
AuUInt uAddress {};
|
||||
AuUInt uLength_ {};
|
||||
|
@ -153,6 +153,7 @@ namespace Aurora::Process
|
||||
}
|
||||
|
||||
pNewObject->pProcessGlobalHint = this;
|
||||
pNewObject->uLength = uLength;
|
||||
|
||||
return pNewObject;
|
||||
}
|
||||
@ -246,6 +247,7 @@ namespace Aurora::Process
|
||||
}
|
||||
|
||||
pNewObject->pProcessGlobalHint = this;
|
||||
pNewObject->uLength = uLength;
|
||||
|
||||
return pNewObject;
|
||||
}
|
||||
@ -348,6 +350,7 @@ namespace Aurora::Process
|
||||
}
|
||||
|
||||
pNewObject->pProcessGlobalHint = this;
|
||||
pNewObject->uLength = uLength;
|
||||
|
||||
return pNewObject;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user