email/pop3andsmtpmtm/servermtmutils/inc/IMSKSCR.H
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 15 Jul 2010 18:34:37 +0300
branchRCL_3
changeset 24 696bfeff199e
parent 0 72b543305e3a
permissions -rw-r--r--
Revision: 201025 Kit: 2010127

// Copyright (c) 1998-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:
//

#if !defined(__IMSKSCR_H__)
#define __IMSKSCR_H__

#if !defined(__E32BASE_H__)
#include <e32base.h>
#endif

#if !defined(__F32FILE_H__)
#include <f32file.h>
#endif

// Enable Scripting in Debug Builds only
#ifdef _DEBUG
#define __IMSK_SCRIPTING
#endif


const TInt KFileSegLength=1000;

class CImTextServerScript : public CActive
/**
@internalComponent
@released
*/
	{
public:
	static CImTextServerScript *NewL(TInt aPortNum);
	~CImTextServerScript();
	
	void RetrieveResponse(TDes8& theBuffer, TRequestStatus& aStatus);
	void RunL();
	void DoCancel();

private:
	CImTextServerScript();
	void ConstructL(TInt aPortNum);

private:
	RFile							iFile;
	RFs								iFs;
	TBuf8<KFileSegLength>			iData;
	TBuf8<KFileSegLength>			iNextFileSeg;
	TRequestStatus*					iReportStatus;

//
//  MRG 30-11-98.
//  For SMTP bug fix SW1-656, need to return 8 bit data to
//  the client, TFileText makes a 16 bit read!
//
#ifndef _UNICODE
	TFileText	iScriptFileText;        //  Use TFileText for 8 bit read
#else
    TInt ReadLine();                         //  Read one line of ASCII in Unicode build..
#endif

	};

#endif