email/pop3andsmtpmtm/servermtmutils/inc/IMSKSCR.H
author Simon Howkins <simonh@symbian.org>
Mon, 22 Nov 2010 17:05:03 +0000
branchRCL_3
changeset 83 26c290f28dd1
parent 0 72b543305e3a
permissions -rw-r--r--
Removed duplicate instructions for creating some messaging MIFs

// 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