root/lang/c/partty/fdio/multiplexer_common.h @ 3319

Revision 3319, 2.6 kB (checked in by frsyuki, 6 years ago)

lang/c/partty: imported.

Line 
1/*
2 * FDIO
3 *
4 * Copyright (c) 2007 FURUHASHI Sadayuki
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24
25#ifndef FDIO_MULTIPLEXER_COMMON_H__
26#define FDIO_MULTIPLEXER_COMMON_H__ 1
27
28#include "fdio/fdio_common.h"
29#include <errno.h>
30#include <stdexcept>
31
32namespace FDIO {
33
34
35struct MultiplexerException { };
36
37struct MultiplexerInitializeException : public MultiplexerException, SystemCallException {
38        MultiplexerInitializeException(int errno_, const std::string& message) :
39                SystemCallException(errno_, message) {}
40private:
41        MultiplexerInitializeException();
42};
43
44struct MultiplexerAddException : public MultiplexerException, SystemCallException {
45        MultiplexerAddException(int errno_, const std::string& message) :
46                SystemCallException(errno_, message) {}
47private:
48        MultiplexerAddException();
49};
50
51struct MultiplexerRemoveException : public MultiplexerException, SystemCallException {
52        MultiplexerRemoveException(int errno_, const std::string& message) :
53                SystemCallException(errno_, message) {}
54private:
55        MultiplexerRemoveException();
56};
57
58struct MultiplexerReactivateException : public MultiplexerException, SystemCallException {
59        MultiplexerReactivateException(int errno_, const std::string& message) :
60                SystemCallException(errno_, message) {}
61private:
62        MultiplexerReactivateException();
63};
64
65struct MultiplexerWaitException : public MultiplexerException, SystemCallException {
66        MultiplexerWaitException(int errno_, const std::string& message) :
67                SystemCallException(errno_, message) {}
68private:
69        MultiplexerWaitException();
70};
71
72
73}  // namespace FDIO
74
75#endif /* multiplexer_common.h */
Note: See TracBrowser for help on using the browser.