1 | /* |
2 | SPDX-FileCopyrightText: 2017 Chinmoy Ranjan Pradhan <chinmoyrp65@gmail.com> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
5 | */ |
6 | |
7 | #ifndef FDSENDER_H |
8 | #define FDSENDER_H |
9 | |
10 | // std |
11 | #include <string> |
12 | |
13 | class FdSender |
14 | { |
15 | public: |
16 | explicit FdSender(const std::string &path); |
17 | ~FdSender(); |
18 | |
19 | FdSender(const FdSender &) = delete; |
20 | FdSender &operator=(const FdSender &) = delete; |
21 | |
22 | bool sendFileDescriptor(int fd); |
23 | bool isConnected() const; |
24 | |
25 | private: |
26 | int m_socketDes; |
27 | }; |
28 | |
29 | #endif |
30 | |