/******************************************************************************
 GMGlobals.h

 *****************************************************************************/

#ifndef _H_GMGlobals
#define _H_GMGlobals

// we include these for convenience

#include <JString.h>

#include <jXGlobals.h>
#include <jTypes.h>
#include <JXTextClipboard.h>

class GMApp;
class GNetDebugDir;
class GAddressBookMgr;
class GPrefsMgr;
class GInboxMgr;
class JXSRTextDialogBase;
class JXPTPrinter;
class GMChooseSaveFile;
class GMPTPrinter;
class GMDirectorManager;
class GMailboxChooseSaveFile;
class GAddressBookTreeDir;

GMApp*				GMGetApplication();

GNetDebugDir*		GMGetSMTPDebugDir(); 
GNetDebugDir*		GMGetPOPDebugDir(); 

GAddressBookMgr*		GGetAddressBookMgr();
GAddressBookTreeDir*	GMGetAddressBookDir();

GPrefsMgr*			GGetPrefsMgr();

GInboxMgr*			GGetInboxMgr();

void				GCheckPGP();
void				GGheckGPG();
JBoolean			GPGP_2_6_Enabled();
JBoolean			GGPG_1_0_Enabled();
JBoolean			GEncryptionEnabled();

JBoolean			GSpellCheckEnabled();

void				GBlockUntilFileUnlocked(const JCharacter* filename);
JBoolean			GLockFile(const JCharacter* filename);
JBoolean			GFileLocked(const JCharacter* filename);
void				GUnlockFile(const JCharacter* filename);

JBoolean			GProgramIsDying();
void				GSetProgramDying();

void				GQuoteString(JString* text, const JBoolean quoteFirst);

void				GCheckMail();
JXSRTextDialogBase*	GetSearchDialog();
JXPTPrinter*		GMGetPTPrinter();

GMChooseSaveFile*	GMGetAltChooseSaveFile();
GMPTPrinter*		GMGetAltPTPrinter();

GMailboxChooseSaveFile*	GMGetMailboxCSF();

GMDirectorManager*	GGetDirMgr();

JBoolean			GMReplaceFileWithTemp(const JCharacter* tempname, 
										  const JCharacter* filename);

	// called by TestApp

JBoolean 	GMCreateGlobals(GMApp* app);
void 		GMDeleteGlobals();

void		GMSuspend();
void		GMResume();

	// window manager resources

const JCharacter*	GMGetWMClassInstance();
const JCharacter*	GMGetTableWindowClass();
const JCharacter*	GMGetViewWindowClass();
const JCharacter*	GMGetEditorWindowClass();
const JCharacter*	GMGetAddressBookWindowClass();
const JCharacter*	GMGetMailboxWindowClass();

#endif
