home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / lib / libnet / mkcache.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.2 KB  |  70 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 MKCACHE_H
  20. #define MKCACHE_H
  21.  
  22. #include "mkgeturl.h"
  23.  
  24. #ifndef EXT_CACHE_H
  25. #include "extcache.h"
  26. #endif
  27.  
  28. XP_BEGIN_PROTOS
  29.  
  30. extern void   NET_CleanupCache (char * filename);
  31. extern int    NET_FindURLInCache(URL_Struct * URL_s, MWContext *ctxt);
  32. extern void   NET_RefreshCacheFileExpiration(URL_Struct * URL_s);
  33.  
  34. /* read the Cache File allocation table.
  35.  */
  36. extern void NET_ReadCacheFAT(char * cachefatfile, Bool stat_files);
  37.  
  38. /* remove a URL from the cache
  39.  */
  40. extern void NET_RemoveURLFromCache(URL_Struct *URL_s);
  41.  
  42. /* create an HTML stream and push a bunch of HTML about
  43.  * the cache
  44.  */
  45. extern void NET_DisplayCacheInfoAsHTML(ActiveEntry * cur_entry);
  46.  
  47. /* trace variable for cache testing */
  48. extern XP_Bool NET_CacheTraceOn;
  49.  
  50. /* public accessor function for netcaster */
  51. extern Bool NET_CacheStore(net_CacheObject *cacheObject, URL_Struct *url_s, Bool accept_partial_files);
  52.  
  53. /* return TRUE if the URL is in the cache and
  54.  * is a partial cache file
  55.  */ 
  56. extern Bool NET_IsPartialCacheFile(URL_Struct *URL_s);
  57.  
  58. /* encapsulated access to the first object in cache_database */
  59. extern int NET_FirstCacheObject(DBT *key, DBT *data);
  60.  
  61. /* encapsulated access to the next object in the cache_database */
  62. extern int NET_NextCacheObject(DBT *key, DBT *data);
  63.  
  64. /* Max size for displaying in the cache browser */
  65. extern int32 NET_GetMaxDiskCacheSize();
  66.  
  67. XP_END_PROTOS
  68.  
  69. #endif /* MKCACHE_H */
  70.