| 1 | /*************************************************************************** |
|---|
| 2 | * cgiBasicExchange.cc |
|---|
| 3 | * |
|---|
| 4 | * Sat Aug 5 2006 |
|---|
| 5 | * Copyright 2006 Dmytro Milinevskyy |
|---|
| 6 | * milinevskyy@gmail.com |
|---|
| 7 | ****************************************************************************/ |
|---|
| 8 | |
|---|
| 9 | /* |
|---|
| 10 | * This program is free software; you can redistribute it and/or modify |
|---|
| 11 | * it under the terms of the GNU Lesser General Public License version 2.1 as published by |
|---|
| 12 | * the Free Software Foundation; |
|---|
| 13 | * |
|---|
| 14 | * This program is distributed in the hope that it will be useful, |
|---|
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 17 | * GNU Library General Public License for more details. |
|---|
| 18 | * |
|---|
| 19 | * You should have received a copy of the GNU Lesser General Public License |
|---|
| 20 | * along with this program; if not, write to the Free Software |
|---|
| 21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|---|
| 22 | */ |
|---|
| 23 | |
|---|
| 24 | /** |
|---|
| 25 | * vim indentation settings |
|---|
| 26 | * set tabstop=4 |
|---|
| 27 | * set shiftwidth=4 |
|---|
| 28 | */ |
|---|
| 29 | |
|---|
| 30 | #include <libdodo/directives.h> |
|---|
| 31 | |
|---|
| 32 | #include <stdlib.h> |
|---|
| 33 | |
|---|
| 34 | #include <libdodo/cgiBasicExchange.h> |
|---|
| 35 | #include <libdodo/cgiExchange.h> |
|---|
| 36 | #include <libdodo/ioStdio.h> |
|---|
| 37 | |
|---|
| 38 | using namespace dodo::cgi::basic; |
|---|
| 39 | |
|---|
| 40 | exchange::exchange(exchange &e) : io::stream::channel(e.protection), |
|---|
| 41 | dodo::cgi::exchange(e.protection), |
|---|
| 42 | io::pipe(e.protection), |
|---|
| 43 | io::stdio(e.protection) |
|---|
| 44 | { |
|---|
| 45 | } |
|---|
| 46 | |
|---|
| 47 | //------------------------------------------------------------------- |
|---|
| 48 | |
|---|
| 49 | exchange::exchange(short protection) : io::stream::channel(protection), |
|---|
| 50 | dodo::cgi::exchange(protection) |
|---|
| 51 | { |
|---|
| 52 | #ifndef IO_WO_XEXEC |
|---|
| 53 | collectedData.setExecObject(xexec::OBJECT_CGIBASICEXCHANGE); |
|---|
| 54 | #endif |
|---|
| 55 | } |
|---|
| 56 | |
|---|
| 57 | //------------------------------------------------------------------- |
|---|
| 58 | |
|---|
| 59 | exchange::~exchange() |
|---|
| 60 | { |
|---|
| 61 | } |
|---|
| 62 | |
|---|
| 63 | //------------------------------------------------------------------- |
|---|
| 64 | |
|---|
| 65 | char * |
|---|
| 66 | exchange::getenv(const char *buf) |
|---|
| 67 | { |
|---|
| 68 | return ::getenv(buf); |
|---|
| 69 | } |
|---|
| 70 | |
|---|
| 71 | //------------------------------------------------------------------- |
|---|
| 72 | |
|---|