networkingtestandutils/networkingexamples/cgi/Documentation/cgi_intro.txt
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 16:36:59 +0300
changeset 14 b33c3d136b7e
parent 0 af10295192d8
permissions -rw-r--r--
Revision: 201015 Kit: 201015

//
//    readme.txt - introduction to the CGI library
//
// Portions Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//
////////////////////////////////////////////////////////////////
// WS_CGI.DLL
// Deriving a DLL from CExecCGI

CExecCGI is an abstract class, inteded for derivation in a polymorphic interface DLL. This abstract class has some
static functions which are implemented in a static interface DLL. When the polymorphic interface DLL is loaded
any static interface DLL requiered by the polymorphic DLL are also loaded. So you do not have to worry about this.

Mainly, the CGI programmer has only to implement the pure virtual function ExecCGI(). The enviroment variables are
defined as a class (TCgiEnv). The command-line arguments are also implented as a class (CCommandArg). Their values are set by the 
WebServer.

The communication with the webserver is done through two functions: Read and Write.
(*) TInt Read(TDes& aBuffer)

Note: This functions reads data from the WebServer.

Arguments
=========

TDes& aBuffer
-------------
Descriptor into which characters are read. Any existing contents are overwritten. 
On return, its length is set to the number of characters read. The length is set to zero when there are no more
characters to be read.


Return
======

TInt
----
An error code.

(*) TInt Write(TDesC& aBuffer)

Note: This functions sends data to the webserver.

Arguments
=========
Descriptor from which characters are written.

Return
======

TInt
----
An error code.