Dobby 3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
Loading...
Searching...
No Matches
AsyncReplySender.h
1/*
2* If not stated otherwise in this file or this component's LICENSE file the
3* following copyright and licenses apply:
4*
5* Copyright 2020 Sky UK
6*
7* Licensed under the Apache License, Version 2.0 (the "License");
8* you may not use this file except in compliance with the License.
9* You may obtain a copy of the License at
10*
11* http://www.apache.org/licenses/LICENSE-2.0
12*
13* Unless required by applicable law or agreed to in writing, software
14* distributed under the License is distributed on an "AS IS" BASIS,
15* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16* See the License for the specific language governing permissions and
17* limitations under the License.
18*/
19/*
20 * AsyncReplySender.h
21 *
22 * Created on: 5 Jun 2015
23 * Author: riyadh
24 */
25
26#ifndef AI_IPC_ASYNCREEPLYSENDER_H
27#define AI_IPC_ASYNCREEPLYSENDER_H
28
29#include "IpcCommon.h"
30
31#include <memory>
32
33#include <dbus/dbus.h>
34
35namespace AI_IPC
36{
37
38class DbusConnection;
39
40
42{
43public:
44
45 AsyncReplySender(const std::weak_ptr<DbusConnection>& dbusConnection, DBusMessage *dbusRequestMsg, DBusMessage *dbusReplyMsg, const VariantList& argList);
46
47 virtual ~AsyncReplySender();
48
49 virtual VariantList getMethodCallArguments() const override;
50
51 virtual bool sendReply(const VariantList& replyArgs) override;
52
53 virtual uid_t getSenderUid() const override;
54
55 virtual std::string getSenderName() const override;
56
57private:
58
59 const std::weak_ptr<DbusConnection> mDbusConnection;
60
61 DBusMessage *mDbusReplyMsg;
62
63 const VariantList mArgList;
64
65 std::string mSenderName;
66};
67
68}
69
70#endif /* AI_IPC_ASYNCREEPLYSENDER_H */
Definition AsyncReplySender.h:42
virtual std::string getSenderName() const override
Gets the unique name of the connection which originated this message.
Definition AsyncReplySender.cpp:106
virtual uid_t getSenderUid() const override
Get Id of the user (unix user Id) who invoked the method.
Definition AsyncReplySender.cpp:115
virtual VariantList getMethodCallArguments() const override
Get method call arguments.
Definition AsyncReplySender.cpp:72
virtual bool sendReply(const VariantList &replyArgs) override
Send reply.
Definition AsyncReplySender.cpp:81
Helper class to send reply of a method call asynchronously.
Definition IpcCommon.h:117