email/pop3andsmtpmtm/servermtmutils/inc/IMCVUTIL.H
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 // IMCVUTIL.H
       
     2 
       
     3 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 // All rights reserved.
       
     5 // This component and the accompanying materials are made available
       
     6 // under the terms of "Eclipse Public License v1.0"
       
     7 // which accompanies this distribution, and is available
       
     8 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 //
       
    10 // Initial Contributors:
       
    11 // Nokia Corporation - initial contribution.
       
    12 //
       
    13 // Contributors:
       
    14 //
       
    15 // Description:
       
    16 //
       
    17 
       
    18 #if !defined (__IMCVUTIL_H__)
       
    19 #define __IMCVUTIL_H__
       
    20 
       
    21 #if !defined (__E32BASE_H__)
       
    22 #include <e32base.h>		
       
    23 #endif
       
    24 
       
    25 #if !defined (__MSVSTD_H__)
       
    26 #include <msvstd.h>		
       
    27 #endif
       
    28 
       
    29 #if !defined (__MENTACT_H__)
       
    30 #include <mentact.h>		
       
    31 #endif
       
    32 
       
    33 const TInt KMinimumDiskSpaceForSync = 65536;
       
    34 const TInt KCheckDiskSpaceEveryNMessages = 5;
       
    35 
       
    36 class CImcvUtils : public CBase	
       
    37 /**
       
    38 @internalComponent
       
    39 @released
       
    40 */
       
    41 	{
       
    42 public:
       
    43 	IMPORT_C static CImcvUtils* NewL();
       
    44 	IMPORT_C static CImcvUtils* NewLC();
       
    45 	~CImcvUtils();
       
    46 	IMPORT_C static void ReceiptFieldsL(CDesC8Array& aReceiptFields);
       
    47 	IMPORT_C static void PriorityFieldsL(CDesC8Array& aPriorityFields);
       
    48 	IMPORT_C static void SendReturnReceiptFieldsL(CDesC8Array& aReturnReceiptFields);
       
    49 	IMPORT_C static void SendPriorityFieldsL(CDesC8Array& aSendPriorityFields);
       
    50 	         static void SendImportanceFieldsL(CDesC8Array& aSendImportanceFields);
       
    51 	IMPORT_C TMsvPriority EvaluatePriorityText(const TDesC8& aPriority);
       
    52 	IMPORT_C TBool EvaluateReturnReceiptFields(const TDesC8& aFieldName);
       
    53 private:
       
    54 	CImcvUtils();
       
    55 	void ConstructL();
       
    56 	TInt ConvertPriorityIntoNumber(const TDesC8& aPriority);
       
    57 private:
       
    58 	TMsvPriority iPriority;
       
    59 	};
       
    60 
       
    61 
       
    62 class CLogWrapper;
       
    63 class CLogEvent;
       
    64 class CLogBase;
       
    65 
       
    66 class CImLogMessage : public CMsgActive
       
    67 /**
       
    68 @internalComponent
       
    69 @released
       
    70 */
       
    71 	{
       
    72 public:
       
    73 	IMPORT_C static CImLogMessage* NewL(RFs& aFs, TInt aPriority = CActive::EPriorityStandard);
       
    74 	~CImLogMessage();
       
    75 	IMPORT_C CLogEvent& LogEvent();
       
    76 	IMPORT_C TInt GetString(TDes& aString, TInt aId) const;
       
    77 	IMPORT_C CLogBase& LogBase();
       
    78 	IMPORT_C void Reset();
       
    79 	IMPORT_C void Start(TInt aError,TRequestStatus& aStatus);	
       
    80 private:
       
    81 	CImLogMessage(TInt aPriority);
       
    82 	void ConstructL(RFs& aFs,TInt aPriority);
       
    83 	void DoCancel();			// Allows client to stop the SMTP session prematurely
       
    84 	void DoRunL();			        // Decides what to do when current state completes
       
    85 	void DoComplete(TInt& aStatus);					// Cleanup code
       
    86 private:
       
    87 	CLogWrapper* iLogWrapper;
       
    88 	CLogEvent* iLogEvent;
       
    89 	};
       
    90 
       
    91 class ImCheckDiskSpace
       
    92 /**
       
    93 @internalTechnology
       
    94 @released
       
    95 */
       
    96 	{
       
    97 public:
       
    98 	IMPORT_C static void LeaveIfLowDiskL(RFs& aFs, TInt aCurrentDrive);
       
    99 	};
       
   100 
       
   101 #endif