/*
* Copyright 2004 Perforce Software. All rights reserved.
*
* Developed by Data Shades Ltd.
*/
#ifndef INC_CALLBACK_MANAGER
#define INC_CALLBACK_MANAGER
#include "notify.h"
/*
* Class to handle callbacks when documents are opened/closed.
*/
class CallbackManager
{
public:
/*
* Constructor. Register callbacks here.
*/
CallbackManager();
/*
* Destructor. Deregister callbacks here.
*/
~CallbackManager();
private:
/*
* This gets called when a document is opened.
*
* data - userdata.
* info - Information about the event.
*/
static void promptOpenDocument( void *data, NotifyInfo *info );
/*
* This gets called when a document is closed.
*
* data - userdata.
* info - Information about the event.
*/
static void promptCloseDocument( void *data, NotifyInfo *info );
/*
* Called when external files need to be synced.
*
* data - userdata.
* info - Information about the event.
*/
static void syncRefs( void *data, NotifyInfo *info );
/*
* This gets called before a file is going to be opened.
*
* data - userdata.
* info - Information about the event.
*/
static void prepareOpen( void *data, NotifyInfo *info );
bool doingOpen;
bool doneRefs;
};
#endif