home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / modules / rdf / src / glue.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.8 KB  |  101 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    _RDF_GLUE_H_
  20. #define    _RDF_GLUE_H_
  21.  
  22.  
  23. #include "xp.h"
  24. #include "xp_mem.h"
  25. #include "net.h"
  26. #include "ntypes.h"
  27. #include "fe_proto.h"
  28.  
  29. #ifdef NSPR20
  30. #include "prinit.h"
  31. #else
  32. #include "prglobal.h"
  33. #endif
  34.  
  35. #ifdef XP_UNIX
  36. #include <sys/fcntl.h>
  37. #elif defined(XP_MAC)
  38. #include <fcntl.h>
  39. #endif
  40.  
  41. #include "rdf.h"
  42. #include "rdf-int.h"
  43. #include "ht.h"
  44.  
  45.  
  46.  
  47. #define    APPLICATION_RDF        "application/x-rdf"        /* XXX what should these be? */
  48. #define    EXTENSION_RDF        ".rdf"
  49. #define    EXTENSION_MCF        ".mcf"
  50.  
  51.  
  52.  
  53. /* external globals */
  54. extern char* gLocalStoreURL;
  55. extern char* gBookmarkURL;
  56.  
  57.  
  58.  
  59. /* glue.c prototypes */
  60.  
  61. XP_BEGIN_PROTOS
  62.  
  63. #ifdef NSPR20
  64. void ht_fprintf(PRFileDesc *file, const char *fmt, ...);
  65. #else
  66. void ht_fprintf(PRFileHandle file, const char *fmt, ...);
  67. #endif
  68.  
  69.  
  70.  
  71. unsigned int        rdf_write_ready(NET_StreamClass *stream);
  72. void            rdf_complete(NET_StreamClass *stream);
  73. void            rdf_abort(NET_StreamClass *stream, int status);
  74. NET_StreamClass *    rdf_Converter(FO_Present_Types format_out,
  75.                     void *client_data, URL_Struct *urls, MWContext *cx);
  76. void            rdf_GetUrlExitFunc (URL_Struct *urls, int status, MWContext *cx);
  77. int            rdfRetrievalType (RDFFile f);
  78. int            rdf_GetURL (MWContext *cx,  int method,
  79.                     Net_GetUrlExitFunc *exit_routine, RDFFile rdfFile);
  80. void            possiblyRereadRDFFiles (void* data);
  81. void            RDFglueInitialize (void);
  82. void            RDFglueExit (void);
  83. void            *gRDFMWContext();
  84. void            beginReadingRDFFile (RDFFile file);
  85. void            readLocalFile (RDFFile file);
  86.  
  87. char            *unescapeURL(char *inURL);
  88. char            *convertFileURLToNSPRCopaceticPath(char* inURL);
  89. PRFileDesc        *CallPROpenUsingFileURL(char *fileURL, PRIntn flags, PRIntn mode);
  90. PRDir            *CallPROpenDirUsingFileURL(char *fileURL);
  91. int32            CallPRWriteAccessFileUsingFileURL(char *fileURL);
  92. int32            CallPRDeleteFileUsingFileURL(char *fileURL);
  93. int            CallPR_RmDirUsingFileURL(char *dirURL);
  94. int32            CallPRMkDirUsingFileURL(char *dirURL, int mode);
  95. DB            *CallDBOpenUsingFileURL(char *fileURL, int flags,int mode,
  96.                         DBTYPE type, const void *openinfo);
  97.  
  98. XP_END_PROTOS
  99.  
  100. #endif
  101.