diff -r 24e4ef208cca -r 3a747a240983 imgtools/imglib/filesystem/include/messageimplementation.h --- a/imgtools/imglib/filesystem/include/messageimplementation.h Wed Jul 14 14:50:01 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "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: -* Message Implementation Class for FileSystem tool -* @internalComponent -* @released -* -*/ - - - -#ifndef MESSAGEIMPLEMENTATION_H -#define MESSAGEIMPLEMENTATION_H - - - -#include -#include -#include -using namespace std; -typedef map Map; - - -enum -{ - ERROR = 0, - WARNING, - INFORMATION -}; -/** -To include more error or warning messages, Just include the key word here and -write the key word contents into the Message array at ".cpp" file. -Then increase the Message array size by number of messages included -*/ -enum -{ FILEOPENERROR = 1, - FILEREADERROR, - FILEWRITEERROR, - MEMORYALLOCATIONERROR, - ENTRYCREATEMSG, - BOOTSECTORERROR, - BOOTSECTORCREATEMSG, - BOOTSECTORWRITEMSG, - FATTABLEWRITEMSG, - IMAGESIZETOOBIG, - NOENTRIESFOUND, - EMPTYFILENAME, - EMPTYSHORTNAMEERROR, - CLUSTERERROR, - ROOTNOTFOUND, - UNKNOWNERROR -}; - - -/** -Abstract base Class for Message Implementation. - -@internalComponent -@released -*/ -class Message -{ - public: - virtual ~Message(){}; - // get error string from message file - virtual char * GetMessageString(int errorIndex)=0; - // display message to output device - virtual void Output(const char *aName) =0; - // start logging to a file - virtual void StartLogging(char *fileName)=0; - virtual void ReportMessage(int aMsgType, int aMsgIndex,...)=0; - virtual void InitializeMessages()=0; -}; - -/** -Class for Message Implementation. - -@internalComponent -@released -*/ -class MessageImplementation : public Message -{ - public: - MessageImplementation(); - ~MessageImplementation(); - - //override base class methods - char* GetMessageString(int errorIndex); - void Output(const char *aName); - void LogOutput(const char *aString); - void StartLogging(char *fileName); - void ReportMessage(int aMsgType, int aMsgIndex,...); - void InitializeMessages(); - private: - - bool iLogging; - char* iLogFileName; - FILE *iLogPtr; - Map iMessage; -}; - -/** -Structure for Messages. - -@internalComponent -@released -*/ -struct EnglishMessage -{ - int index; - char message[1024]; -}; - -#endif //MESSAGEIMPLEMENTATION_H