home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / lib / libnet / mkmemcac.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.3 KB  |  72 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.  
  19. #ifndef MK_MEMORY_CACHE_H
  20.  
  21. /* A pointer to this struct is passed as the converter_obj argument to
  22.  * NET_MemCacheConverter.
  23.  */
  24. typedef struct net_MemCacheConverterObject {
  25.     NET_StreamClass *next_stream;
  26.     XP_Bool         dont_hold_URL_s;
  27. } net_MemCacheConverterObject;
  28.  
  29. extern NET_StreamClass * 
  30. NET_MemCacheConverter (FO_Present_Types format_out,
  31.                     void       *converter_obj,
  32.                     URL_Struct *URL_s,
  33.                     MWContext  *window_id);
  34.  
  35. extern int
  36. NET_FindURLInMemCache(URL_Struct * URL_s, MWContext *ctxt);
  37.  
  38. extern void
  39. NET_InitMemCacProtocol(void);
  40.  
  41. /* remove a URL from the memory cache
  42.  */
  43. extern void
  44. NET_RemoveURLFromMemCache(URL_Struct *URL_s);
  45.  
  46. /* create an HTML stream and push a bunch of HTML about
  47.  * the memory cache
  48.  */
  49. extern void
  50. NET_DisplayMemCacheInfoAsHTML(ActiveEntry * cur_entry);
  51.  
  52. /* set or unset a lock on a memory cache object
  53.  */
  54. extern void
  55. NET_ChangeMemCacheLock(URL_Struct *URL_s, Bool set);
  56.  
  57. /* Create a wysiwyg cache converter to a copy of the current entry for URL_s.
  58.  */
  59. extern NET_StreamClass *
  60. net_CloneWysiwygMemCacheEntry(MWContext *window_id, URL_Struct *URL_s,
  61.                   uint32 nbytes, const char * wysiwyg_url,
  62.                   const char * base_href);
  63. /* return the first cache object in memory */
  64. extern net_CacheObject * 
  65. NET_FirstMemCacheObject(XP_List* list_ptr);
  66.  
  67. /* return the next cache object in memory */
  68. extern net_CacheObject * 
  69. NET_NextMemCacheObject(XP_List* list_ptr);
  70.  
  71. #endif /* MK_MEMORY_CACHE_H */
  72.