home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / prefs / brpref / public / ibrprefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.2 KB  |  97 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. #ifndef __IBRPREFS_H_
  19. #define __IBRPREFS_H_
  20.  
  21. #include "net.h"
  22.  
  23. /////////////////////////////////////////////////////////////////////////////
  24. // IBrowserPrefs::EnumHelpers member returns an IEnumHelpers object.
  25.  
  26. #ifdef __cplusplus
  27. interface IEnumHelpers;
  28. #else
  29. typedef interface IEnumHelpers IEnumHelpers;
  30. #endif
  31.  
  32. typedef IEnumHelpers FAR* LPENUMHELPERS;
  33.  
  34. #undef  INTERFACE
  35. #define INTERFACE       IEnumHelpers
  36.  
  37. DECLARE_INTERFACE_(IEnumHelpers, IUnknown)
  38. {
  39.     // *** IUnknown methods ***
  40.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  41.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  42.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  43.  
  44.     // *** IEnumHelpers methods ***
  45.     STDMETHOD(Next)  (THIS_ NET_cdataStruct **ppcdata) PURE;
  46.     STDMETHOD(Reset) (THIS) PURE;
  47. };
  48.  
  49. /////////////////////////////////////////////////////////////////////////////
  50. // IBrowserPrefs interface
  51.  
  52. #ifdef __cplusplus
  53. interface IBrowserPrefs;
  54. #else
  55. typedef interface IBrowserPrefs IBrowserPrefs;
  56. #endif
  57.  
  58. typedef IBrowserPrefs FAR* LPBROWSERPREFS;
  59.  
  60. #undef  INTERFACE
  61. #define INTERFACE IBrowserPrefs
  62.  
  63. typedef struct _HELPERINFO {
  64.     int        nHowToHandle;  // one of HANDLE_VIA_NETSCAPE .. HANDLE_SHELLEXECUTE
  65.     char    szOpenCmd[_MAX_PATH + 32];
  66.     BOOL    bAskBeforeOpening;
  67.     LPCSTR    lpszMimeType;  // not used for GetHelperInfo (only for SetHelperInfo)
  68.     BOOL    bIsLocked; //TRUE if this helper is associated with a mime type from the prefs file and it's locked....CRN_MIME
  69. } HELPERINFO, FAR *LPHELPERINFO;
  70.  
  71. // IBrowserPrefs provides the preference UI code with a way to get at
  72. // various state maintained by the Navigator
  73. DECLARE_INTERFACE_(IBrowserPrefs, IUnknown)
  74. {
  75.     // IUnknown methods
  76.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  77.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  78.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  79.  
  80.     // IBrowserPrefs methods
  81.     STDMETHOD(GetCurrentPage)(THIS_ LPOLESTR *pszPage) PURE;
  82.  
  83.     STDMETHOD(EnumHelpers)(THIS_ LPENUMHELPERS *ppEnumHelpers) PURE;
  84.     STDMETHOD(GetHelperInfo)(THIS_ NET_cdataStruct *, LPHELPERINFO) PURE;
  85.     STDMETHOD(SetHelperInfo)(THIS_ NET_cdataStruct *, LPHELPERINFO) PURE;
  86.     STDMETHOD(NewFileType)(THIS_
  87.                            LPCSTR lpszDescription,
  88.                            LPCSTR lpszExtension,
  89.                            LPCSTR lpszMimeType,
  90.                            LPCSTR lpszOpenCmd,
  91.                            NET_cdataStruct **ppcdata) PURE;
  92.     STDMETHOD(RemoveFileType)(THIS_ NET_cdataStruct *) PURE;
  93. };
  94.  
  95. #endif /* __IBRPREFS_H_ */
  96.  
  97.