зеркало из https://github.com/mozilla/gecko-dev.git
make rdf build as a DLL on windows
This commit is contained in:
Родитель
3c968525d6
Коммит
b8e8afe664
|
@ -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
|
||||
DEPTH = ..\..
|
||||
MODULE=rdf
|
||||
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
DLLNAME=rdf
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MODULE=rdf
|
||||
REQUIRES=nspr rdf xpcom netlib
|
||||
|
||||
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
|
||||
|
|
|
@ -37,9 +37,8 @@
|
|||
|
||||
/* rdfparse.c function prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
NSPR_BEGIN_EXTERN_C
|
||||
|
||||
char decodeEntityRef (char* string, int32* stringIndexPtr, int32 len);
|
||||
char * copyStringIgnoreWhiteSpace(char* string);
|
||||
char * getHref(char** attlist);
|
||||
|
@ -57,10 +56,6 @@ void outputRDFTreeInt (RDF rdf, PRFileDesc *fp, RDF_Resource node, uint32 depth
|
|||
void outputRDFTree (RDF rdf, PRFileDesc *fp, RDF_Resource node);
|
||||
int parseNextRDFXMLBlobInt(RDFFile f, char* blob, int32 size) ;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
NSPR_END_EXTERN_C
|
||||
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче