Dobby 3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
Loading...
Searching...
No Matches
IpcFileDescriptor.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 * IpcFileDescriptor.h
21 *
22 * Created on:
23 * Author:
24 */
25
26#ifndef AI_IPC_IPCFILEDESCRIPTOR_H
27#define AI_IPC_IPCFILEDESCRIPTOR_H
28
29namespace AI_IPC
30{
31
33{
34public:
36 explicit IpcFileDescriptor(int fd);
41
42public:
43 bool operator==(const IpcFileDescriptor& rhs) const;
44
45public:
46 bool isValid() const;
47 int fd() const;
48
49 int dup() const;
50
51 void reset(int fd = -1);
52 void clear();
53
54private:
55 int mFd;
56};
57
58} // namespace AI_IPC
59
60#endif // AI_IPC_IPCFILEDESCRIPTOR_H
Definition IpcFileDescriptor.h:33
bool isValid() const
Definition IpcFileDescriptor.cpp:166
void clear()
Definition IpcFileDescriptor.cpp:233
int fd() const
Definition IpcFileDescriptor.cpp:183
IpcFileDescriptor & operator=(IpcFileDescriptor &&other)
Definition IpcFileDescriptor.cpp:112
void reset(int fd=-1)
Definition IpcFileDescriptor.cpp:212
bool operator==(const IpcFileDescriptor &rhs) const
Definition IpcFileDescriptor.cpp:244
~IpcFileDescriptor()
Definition IpcFileDescriptor.cpp:154
IpcFileDescriptor()
Definition IpcFileDescriptor.cpp:62