| 1 | /* |
| 2 | * Abstraction API/layer for the various ways PvPGN can inspect sockets state |
| 3 | * 2003 (C) |
| 4 | * |
| 5 | * Code is based on the ideas found in thttpd project. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License |
| 9 | * as published by the Free Software Foundation; either version 2 |
| 10 | * of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 20 | */ |
| 21 | |
| 22 | #ifndef __PVPGN_FDWBACKEND_INCLUDED__ |
| 23 | #define __PVPGN_FDWBACKEND_INCLUDED__cxx . . $ `src/common/fdwbackend.h:23:9`! |
| 24 | |
| 25 | #include <stdexcept> |
| 26 | #include <string> |
| 27 | |
| 28 | namespace pvpgncxx . . $ pvpgn/ |
| 29 | { |
| 30 | |
| 31 | class FDWBackendcxx . . $ pvpgn/FDWBackend# |
| 32 | { |
| 33 | public: |
| 34 | class InitErrorcxx . . $ pvpgn/FDWBackend#InitError# :public stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error# |
| 35 | { |
| 36 | public: |
| 37 | explicit InitErrorcxx . . $ pvpgn/FDWBackend#InitError#InitError(9c546c94e5fcce4e).(const stdcxx . . $ std/::stringcxx . . $ std/string#& str) |
| 38 | :stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error#(str) {} |
| 39 | ~cxx . . $ pvpgn/FDWBackend#InitError#`~InitError`(ced63f7c635d850d).InitErrorcxx . . $ pvpgn/FDWBackend#InitError#() throw() {} |
| 40 | }; |
| 41 | |
| 42 | explicit FDWBackendcxx . . $ pvpgn/FDWBackend#FDWBackend(d4f767463ce0a6b3).(int nfds_); |
| 43 | virtual ~cxx . . $ pvpgn/FDWBackend#`~FDWBackend`(ced63f7c635d850d).FDWBackendcxx . . $ pvpgn/FDWBackend#() throw(); |
| 44 | |
| 45 | virtual int addcxx . . $ pvpgn/FDWBackend#add(b223e862534b1804).(int idx, unsigned rw) = 0; |
| 46 | virtual int delcxx . . $ pvpgn/FDWBackend#del(7864480464b09eea).(int idx) = 0; |
| 47 | virtual int watchcxx . . $ pvpgn/FDWBackend#watch(a9e4e82268fd7bfa).(long timeout_msecs) = 0; |
| 48 | virtual void handlecxx . . $ pvpgn/FDWBackend#handle(49f6e7a06ebc5aa8).() = 0; |
| 49 | |
| 50 | protected: |
| 51 | int nfdscxx . . $ pvpgn/FDWBackend#nfds.; |
| 52 | }; |
| 53 | |
| 54 | } |
| 55 | |
| 56 | #endif /* __PVPGN_FDWBACKEND_INCLUDED__ */ |