// PROGRAM.H
//
// Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
//

#if !defined(__PROGRAM_H__)
#define __PROGRAM_H__

#if !defined(__E32STD_H__)
#include <e32std.h>
#endif

#if !defined(__TEXTTRAN_H__)
#include <texttran.h>
#endif

IMPORT_C TPtrC DebuggerDllFilename();
IMPORT_C TFileName RuntimeResourceFile();

class TRuntimeResBuf
	{
public:
    TInt  iError;           // runtime error or KErrNone if no error
	TInt  iProcLineNumber;  // line number of the procedure in the source module ( from OPO Module)
    TUint iOffset;          // Q code offset to runtime error within proc
    TBuf<80> iErrMsg;       // runtime error string
    TFileName iSrcFile;		// to take source file name causing error
	TBuf<32> iProcName;		// to take name of procedure causing error
    CTextTranslator::TDebugFlag iDebugFlag;
	};

// for TRuntimeParams::iFlags
const TInt KRuntimeFlagsSignal=0x1;   /* signal on completion */
const TInt KRuntimeFlagsNotify=0x2;   /* call notifier on error */

// Runtime commands for command-line
const TInt KOplrCommandRunFromEditor='E';
const TInt KOplrCommandRunFromDebugger='D';
const TInt KOplrCommandRunNoIPC='R';

class TRuntimeParams
    {       /* used to pass extra command-line parameters to OPLR.APP */
public:
    TInt  iFlags;                  /* mode information */
    TThreadId  iOwnerThreadId;     /* requestor process id */
    TDes* iResultOffset;			/* result buffer offset */
	TInt iOwnerWindowGroup;			/* requestor window group identifier */
    };

#endif // __PROGRAM_H__
