mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-13 09:50:36 +00:00
0dc9af5f7e
Also run it across the whole tree to get everything using the One True Style. We don't yet run this in an automated fashion as it's a little slow, but there is a snippet to do so in makeall.sh.
24 lines
634 B
C++
24 lines
634 B
C++
#pragma once
|
|
|
|
#include <AK/RetainPtr.h>
|
|
#include <AK/Retainable.h>
|
|
|
|
class SharedBuffer : public Retainable<SharedBuffer> {
|
|
public:
|
|
static RetainPtr<SharedBuffer> create(pid_t peer, int);
|
|
static RetainPtr<SharedBuffer> create_from_shared_buffer_id(int);
|
|
~SharedBuffer();
|
|
|
|
int shared_buffer_id() const { return m_shared_buffer_id; }
|
|
void seal();
|
|
int size() const { return m_size; }
|
|
void* data() { return m_data; }
|
|
const void* data() const { return m_data; }
|
|
|
|
private:
|
|
SharedBuffer(int shared_buffer_id, int size, void*);
|
|
|
|
int m_shared_buffer_id { -1 };
|
|
int m_size { 0 };
|
|
void* m_data;
|
|
};
|