email/pop3andsmtpmtm/servermtmutils/inc/IMSKSCR.H
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #if !defined(__IMSKSCR_H__)
       
    17 #define __IMSKSCR_H__
       
    18 
       
    19 #if !defined(__E32BASE_H__)
       
    20 #include <e32base.h>
       
    21 #endif
       
    22 
       
    23 #if !defined(__F32FILE_H__)
       
    24 #include <f32file.h>
       
    25 #endif
       
    26 
       
    27 // Enable Scripting in Debug Builds only
       
    28 #ifdef _DEBUG
       
    29 #define __IMSK_SCRIPTING
       
    30 #endif
       
    31 
       
    32 
       
    33 const TInt KFileSegLength=1000;
       
    34 
       
    35 class CImTextServerScript : public CActive
       
    36 /**
       
    37 @internalComponent
       
    38 @released
       
    39 */
       
    40 	{
       
    41 public:
       
    42 	static CImTextServerScript *NewL(TInt aPortNum);
       
    43 	~CImTextServerScript();
       
    44 	
       
    45 	void RetrieveResponse(TDes8& theBuffer, TRequestStatus& aStatus);
       
    46 	void RunL();
       
    47 	void DoCancel();
       
    48 
       
    49 private:
       
    50 	CImTextServerScript();
       
    51 	void ConstructL(TInt aPortNum);
       
    52 
       
    53 private:
       
    54 	RFile							iFile;
       
    55 	RFs								iFs;
       
    56 	TBuf8<KFileSegLength>			iData;
       
    57 	TBuf8<KFileSegLength>			iNextFileSeg;
       
    58 	TRequestStatus*					iReportStatus;
       
    59 
       
    60 //
       
    61 //  MRG 30-11-98.
       
    62 //  For SMTP bug fix SW1-656, need to return 8 bit data to
       
    63 //  the client, TFileText makes a 16 bit read!
       
    64 //
       
    65 #ifndef _UNICODE
       
    66 	TFileText	iScriptFileText;        //  Use TFileText for 8 bit read
       
    67 #else
       
    68     TInt ReadLine();                         //  Read one line of ASCII in Unicode build..
       
    69 #endif
       
    70 
       
    71 	};
       
    72 
       
    73 #endif