Userland: Remove dummy IPC methods

They're not used anywhere and are unnecessary boilerplate code. So let's
remove them and update IPCCompiler to allow for empty endpoint
declarations.
This commit is contained in:
Gunnar Beutner 2021-06-23 17:00:38 +02:00 committed by Andreas Kling
parent 62f9377656
commit ac650d2362
Notes: sideshowbarker 2024-07-18 11:36:20 +09:00
11 changed files with 4 additions and 19 deletions

View file

@ -189,11 +189,11 @@ int main(int argc, char** argv)
auto parse_messages = [&] {
for (;;) {
consume_whitespace();
parse_message();
consume_whitespace();
if (lexer.peek() == '}')
break;
parse_message();
consume_whitespace();
}
};
@ -366,7 +366,7 @@ public:
static i32 static_message_id() { return (int)MessageID::@message.pascal_name@; }
virtual const char* message_name() const override { return "@endpoint.name@::@message.pascal_name@"; }
static OwnPtr<@message.pascal_name@> decode(InputMemoryStream& stream, int sockfd)
static OwnPtr<@message.pascal_name@> decode(InputMemoryStream& stream, [[maybe_unused]] int sockfd)
{
IPC::Decoder decoder { stream, sockfd };
)~~~");
@ -629,7 +629,7 @@ public:
static u32 static_magic() { return @endpoint.magic@; }
static OwnPtr<IPC::Message> decode_message(ReadonlyBytes buffer, int sockfd)
static OwnPtr<IPC::Message> decode_message(ReadonlyBytes buffer, [[maybe_unused]] int sockfd)
{
InputMemoryStream stream { buffer };
u32 message_endpoint_magic = 0;

View file

@ -25,8 +25,6 @@ private:
: IPC::ServerConnection<InspectorClientEndpoint, InspectorServerEndpoint>(*this, "/tmp/portal/inspector")
{
}
virtual void dummy() override { }
};
}

View file

@ -43,7 +43,6 @@ private:
: IPC::ServerConnection<LaunchClientEndpoint, LaunchServerEndpoint>(*this, "/tmp/portal/launch")
{
}
virtual void dummy() override { }
};
static LaunchServerConnection& connection()

View file

@ -30,7 +30,6 @@ private:
, m_notification(notification)
{
}
virtual void dummy() override { }
Notification* m_notification;
};

View file

@ -20,10 +20,6 @@ void Client::die()
on_death();
}
void Client::dummy()
{
}
Optional<DecodedImage> Client::decode_image(const ByteBuffer& encoded_data)
{
if (encoded_data.is_empty())

View file

@ -38,8 +38,6 @@ private:
Client();
virtual void die() override;
virtual void dummy() override;
};
}

View file

@ -1,4 +1,3 @@
endpoint ImageDecoderClient
{
dummy() =|
}

View file

@ -1,4 +1,3 @@
endpoint InspectorClient
{
dummy() =|
}

View file

@ -1,4 +1,3 @@
endpoint LaunchClient
{
dummy() =|
}

View file

@ -1,4 +1,3 @@
endpoint LookupClient
{
dummy() =|
}

View file

@ -1,4 +1,3 @@
endpoint NotificationClient
{
dummy() =|
}