2020-01-18 11:38:21 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 11:38:21 +03:00
|
|
|
*/
|
|
|
|
|
2019-08-03 16:29:40 +03:00
|
|
|
#pragma once
|
|
|
|
|
2019-08-03 20:21:15 +03:00
|
|
|
#include <AK/OwnPtr.h>
|
2020-02-05 21:57:18 +03:00
|
|
|
#include <AK/String.h>
|
2019-08-03 20:21:15 +03:00
|
|
|
|
|
|
|
namespace AK {
|
|
|
|
class BufferStream;
|
|
|
|
}
|
|
|
|
|
2020-02-05 21:57:18 +03:00
|
|
|
namespace IPC {
|
|
|
|
|
|
|
|
class Message;
|
2021-07-05 20:12:37 +03:00
|
|
|
struct MessageBuffer;
|
2019-08-03 16:29:40 +03:00
|
|
|
|
2021-05-03 09:46:40 +03:00
|
|
|
class Stub {
|
2019-08-03 16:29:40 +03:00
|
|
|
public:
|
2021-05-03 09:46:40 +03:00
|
|
|
virtual ~Stub();
|
2019-08-03 16:29:40 +03:00
|
|
|
|
2021-04-25 14:19:53 +03:00
|
|
|
virtual u32 magic() const = 0;
|
2019-08-03 17:18:37 +03:00
|
|
|
virtual String name() const = 0;
|
2021-05-02 05:39:36 +03:00
|
|
|
virtual OwnPtr<MessageBuffer> handle(const Message&) = 0;
|
2019-08-03 16:29:40 +03:00
|
|
|
|
|
|
|
protected:
|
2021-05-03 09:46:40 +03:00
|
|
|
Stub();
|
2019-08-03 16:29:40 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
String m_name;
|
|
|
|
};
|
2020-02-05 21:57:18 +03:00
|
|
|
|
|
|
|
}
|