/****************************************************************************/
/* WebWorks Help API                                                        */
/*                                                                          */
/*                                                                          */
/****************************************************************************/

/*$Id: wwhcomm.h,v 1.7 2004/03/11 21:32:42 allums Exp $*/


#ifndef WWHELP_COMM_H
#define WWHELP_COMM_H


#if defined(_WIN32)
#  include <wtypes.h>
#elif TARGET_OS_MAC
#  include <MacTypes.h>
#else
#  include <sys/types.h>
#endif


#ifdef __cplusplus
extern "C"
{
#endif

/****************************************************************************/
/* Define NULL                                                              */
/*                                                                          */
/****************************************************************************/

#ifndef NULL
#define NULL 0
#endif


/****************************************************************************/
/* WWHelp_BrowserInfo struct                                                */
/*                                                                          */
/****************************************************************************/

#if defined(_WIN32)
#  define WWHELP_OPENCOMMAND_MAXLENGTH       4096
#  define WWHELP_DDESERVICENAME_MAXLENGTH    256
#elif TARGET_OS_MAC
#else
#  define WWHELP_PROGRAM_MAXLENGTH           4096
#  define WWHELP_PROCESSSIGNATURE_MAXLENGTH  256
#  define WWHELP_MOZILLARESPONSE_MAXLENGTH   256
#endif

typedef struct WWHelp_BrowserInfoStruct
{
  int            mbAllowSmartURLs;
  int            mbNetscapeBrowser;
#if defined(_WIN32)
  int            mbSupportsDDEWithFile;
  int            mbSendWithCOM;
  char           mOpenCommand[WWHELP_OPENCOMMAND_MAXLENGTH];
  char           mDDEServiceName[WWHELP_DDESERVICENAME_MAXLENGTH];
  DWORD          mDDEWindowID;
  char*          mpLocationID;
#elif TARGET_OS_MAC
  OSType         mCreatorCode;
#else
  char           mProgram[WWHELP_PROGRAM_MAXLENGTH];
  int            mbNeverFails;
  unsigned char  mProcessSignature[WWHELP_PROCESSSIGNATURE_MAXLENGTH];
#endif
} WWHelp_BrowserInfo;


/****************************************************************************/
/* WebWorks Help API functions                                              */
/*                                                                          */
/****************************************************************************/

int  WWHelp_Comm_Startup();

int  WWHelp_Comm_Shutdown();

int  WWHelp_Comm_NewBrowserInfo(WWHelp_BrowserInfo* pParamBrowserInfo);

int  WWHelp_Comm_DeleteBrowserInfo(WWHelp_BrowserInfo* pParamBrowserInfo);

int  WWHelp_Comm_ClearBrowserInfo(WWHelp_BrowserInfo* pParamBrowserInfo);

int  WWHelp_Comm_SetDefaultBrowserInfo(WWHelp_BrowserInfo* pParamBrowserInfo);

int  WWHelp_Comm_DisplayURL(const WWHelp_BrowserInfo* pParamBrowserInfo,
                            const char*               pParamURL,
                            const size_t              ParamURLLength);

int  WWHelp_Comm_DisplayHelpURL(const WWHelp_BrowserInfo* pParamBrowserInfo,
                                const char*               pParamURL,
                                const size_t              ParamURLLength);

#ifdef __cplusplus
}
#endif


#endif
