зеркало из https://github.com/mozilla/pjs.git
make rdf build as a DLL on windows
This commit is contained in:
Родитель
375fe1a835
Коммит
372ef22374
|
@ -0,0 +1,9 @@
|
|||
#! gmake
|
||||
|
||||
DEPTH = ../..
|
||||
|
||||
DIRS = include src
|
||||
|
||||
INCLUDE = $(INCLUDE) -I$(DEPTH)/modules/libimg/public
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
MODULE = rdf
|
||||
|
||||
DEPTH = ..\..\..
|
||||
DEPTH = ..\..
|
||||
|
||||
EXPORTS = rdf.h \
|
||||
rdfc.h \
|
||||
|
|
|
@ -48,8 +48,6 @@ class nsIRDFDataBase;
|
|||
class nsIRDFService : public nsISupports {
|
||||
public:
|
||||
|
||||
NS_IMETHOD Initialize();
|
||||
|
||||
#ifdef RDF_NOT_IMPLEMENTED
|
||||
NS_IMETHOD RegisterHandler(RDF_String url_selector, const nsCID& clsid) = 0;
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
DEPTH=..
|
||||
|
||||
DIRS=\
|
||||
include \
|
||||
src \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
|
@ -138,7 +138,7 @@ public:
|
|||
rdfCursorWrapper(RDF_Cursor c);
|
||||
virtual ~rdfCursorWrapper();
|
||||
|
||||
/* NS_METHOD HasElements(PRBool& hasElements); */
|
||||
NS_METHOD HasElements(PRBool& hasElements);
|
||||
|
||||
NS_METHOD Next(RDF_NodeStruct& n);
|
||||
|
||||
|
@ -531,6 +531,14 @@ rdfCursorWrapper::~rdfCursorWrapper()
|
|||
RDF_DisposeCursor( mCursor );
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
rdfCursorWrapper::HasElements(PRBool& hasElements)
|
||||
{
|
||||
// XXX
|
||||
PR_ASSERT( PR_FALSE );
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
rdfCursorWrapper::Next(RDF_NodeStruct& next)
|
||||
{
|
||||
|
|
|
@ -53,6 +53,10 @@ getTranslator (char* url)
|
|||
ans = MakeColumnStore (url);
|
||||
} else if (startsWith("rdf:ht", url) || startsWith("rdf:scook", url)) {
|
||||
ans = MakeSCookDB(url);
|
||||
#ifdef XPCOM_XXX
|
||||
} else if (startsWith("rdf:CookieStore", url)) {
|
||||
ans = MakeCookieStore(url);
|
||||
#endif
|
||||
} else if (startsWith("http://", url)) {
|
||||
ans = MakeFileDB(url);
|
||||
} else {
|
||||
|
|
|
@ -16,14 +16,12 @@
|
|||
# Reserved.
|
||||
|
||||
|
||||
DEPTH = ..\..\..
|
||||
LIBRARY_SUFFIX=$(MOZ_BITS)
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
DLLNAME = rdf
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
DEPTH = ..\..
|
||||
MODULE=rdf
|
||||
REQUIRES=nspr rdf xpcom netlib
|
||||
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
DLLNAME=rdf
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
|
||||
C_OBJS=.\$(OBJDIR)\vocab.obj \
|
||||
.\$(OBJDIR)\core.obj \
|
||||
|
@ -32,17 +30,19 @@ C_OBJS=.\$(OBJDIR)\vocab.obj \
|
|||
.\$(OBJDIR)\rdfparse.obj \
|
||||
.\$(OBJDIR)\bmk2rdf.obj \
|
||||
.\$(OBJDIR)\columns.obj \
|
||||
.\$(OBJDIR)\ht.obj \
|
||||
.\$(OBJDIR)\netglue.obj \
|
||||
.\$(OBJDIR)\rdfht.obj \
|
||||
.\$(OBJDIR)\ht.obj \
|
||||
$(NULL)
|
||||
|
||||
CPP_OBJS=\
|
||||
.\$(OBJDIR)\comwrap.obj \
|
||||
.\$(OBJDIR)\netglue.obj \
|
||||
$(NULL)
|
||||
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\netlib.lib \
|
||||
$(DIST)\lib\libplc21.lib \
|
||||
$(LIBNSPR)
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
|
||||
NS_METHOD GetBindInfo(nsIURL* aURL);
|
||||
|
||||
NS_METHOD OnProgress(nsIURL* aURL, PRInt32 Progress, PRInt32 ProgressMax, const nsString &aMsg);
|
||||
NS_METHOD OnProgress(nsIURL* aURL, PRInt32 Progress, PRInt32 ProgressMax);
|
||||
|
||||
NS_METHOD OnStatus(nsIURL* aURL, const nsString& aMsg);
|
||||
|
||||
|
@ -51,24 +51,12 @@ private:
|
|||
RDFFile mFile;
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS( rdfStreamListener, NS_ISTREAMLISTENER_IID )
|
||||
|
||||
rdfStreamListener::rdfStreamListener(RDFFile f) : mFile(f)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ISupports implementation...
|
||||
NS_IMPL_ADDREF(rdfStreamListener)
|
||||
NS_IMPL_RELEASE(rdfStreamListener)
|
||||
|
||||
nsresult rdfStreamListener::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
{
|
||||
if (NULL == aInstancePtr) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
||||
rdfStreamListener::~rdfStreamListener()
|
||||
{
|
||||
}
|
||||
|
@ -82,7 +70,7 @@ rdfStreamListener::GetBindInfo(nsIURL* aURL)
|
|||
NS_METHOD
|
||||
rdfStreamListener::OnProgress(nsIURL* aURL,
|
||||
PRInt32 Progress,
|
||||
PRInt32 ProgressMax, const nsString &aMsg)
|
||||
PRInt32 ProgressMax)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -101,7 +89,6 @@ rdfStreamListener::OnStartBinding(nsIURL* aURL,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_METHOD
|
||||
rdfStreamListener::OnDataAvailable(nsIURL* aURL,
|
||||
nsIInputStream *pIStream,
|
||||
|
@ -114,9 +101,8 @@ rdfStreamListener::OnDataAvailable(nsIURL* aURL,
|
|||
do {
|
||||
const PRUint32 buffer_size = 80;
|
||||
char buffer[buffer_size];
|
||||
PRInt32 err;
|
||||
|
||||
len = pIStream->Read(&err, buffer, 0, buffer_size);
|
||||
nsresult err = pIStream->Read( buffer, 0, buffer_size, &len );
|
||||
if (err == NS_OK) {
|
||||
(void) parseNextRDFXMLBlobInt(mFile, buffer, len);
|
||||
} // else XXX ?
|
||||
|
@ -135,12 +121,12 @@ rdfStreamListener::OnStopBinding(nsIURL* aURL,
|
|||
switch( status ) {
|
||||
|
||||
case NS_BINDING_SUCCEEDED:
|
||||
/* finishRDFParse( mFile ); */
|
||||
// XXX finishRDFParse( mFile );
|
||||
break;
|
||||
|
||||
case NS_BINDING_FAILED:
|
||||
case NS_BINDING_ABORTED:
|
||||
// abortRDFParse( mFile );
|
||||
// XXX abortRDFParse( mFile );
|
||||
// XXX status code?
|
||||
break;
|
||||
|
||||
|
|
|
@ -101,6 +101,8 @@
|
|||
#define stringEquals(x, y) (strcmp(x, y) ==0)
|
||||
/*#define stringAppend(x, y) XP_AppendStr(x,y) */
|
||||
|
||||
NSPR_BEGIN_EXTERN_C
|
||||
|
||||
struct RDF_ResourceStruct {
|
||||
char* url;
|
||||
uint8 type;
|
||||
|
@ -455,6 +457,6 @@ extern RDF_WDVocab gWebData;
|
|||
extern RDF_NCVocab gNavCenter;
|
||||
extern RDF_CoreVocab gCoreVocab;
|
||||
|
||||
|
||||
NSPR_END_EXTERN_C
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _RDF_RDFPARSE_H_
|
||||
#define _RDF_RDFPARSE_H_
|
||||
|
||||
|
||||
#include "rdf-int.h"
|
||||
|
||||
|
||||
|
||||
|
||||
/* rdfparse.c data structures and defines */
|
||||
|
||||
#define wsc(c) ((c == ' ') || (c == '\r') || (c == '\n') || (c == '\t'))
|
||||
|
||||
|
||||
#define EXPECTING_OBJECT 21
|
||||
#define EXPECTING_PROPERTY 22
|
||||
|
||||
|
||||
|
||||
/* rdfparse.c function prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
char decodeEntityRef (char* string, int32* stringIndexPtr, int32 len);
|
||||
char * copyStringIgnoreWhiteSpace(char* string);
|
||||
char * getHref(char** attlist);
|
||||
void parseRDFProcessingInstruction (RDFFile f, char* token);
|
||||
char * getAttributeValue (char** attlist, char* elName);
|
||||
PRBool tagEquals (RDFFile f, char* tag1, char* tag2);
|
||||
void addElementProps (char** attlist, char* elementName, RDFFile f, RDF_Resource obj);
|
||||
PRBool knownObjectElement (char* eln);
|
||||
char * possiblyMakeAbsolute (RDFFile f, char* url);
|
||||
PRBool containerTagp (RDFFile f, char* elementName);
|
||||
RDF_Resource ResourceFromElementName (RDFFile f, char* elementName);
|
||||
void parseNextRDFToken (RDFFile f, char* token);
|
||||
void tokenizeElement (char* attr, char** attlist, char** elementName);
|
||||
void outputRDFTreeInt (RDF rdf, PRFileDesc *fp, RDF_Resource node, uint32 depth, PRBool localOnly);
|
||||
void outputRDFTree (RDF rdf, PRFileDesc *fp, RDF_Resource node);
|
||||
int parseNextRDFXMLBlobInt(RDFFile f, char* blob, int32 size) ;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
Загрузка…
Ссылка в новой задаче