зеркало из https://github.com/mozilla/pjs.git
Bug 315584 - Convert RDF tests to use the glue, r=Pike
This commit is contained in:
Родитель
4ba158bdf1
Коммит
27dae01b2a
|
@ -43,7 +43,6 @@ VPATH = @srcdir@
|
|||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
PROGRAM = rdfcat$(BIN_SUFFIX)
|
||||
MOZILLA_INTERNAL_API = 1
|
||||
|
||||
CPPSRCS = rdfcat.cpp
|
||||
REQUIRES = xpcom \
|
||||
|
@ -52,6 +51,7 @@ REQUIRES = xpcom \
|
|||
$(NULL)
|
||||
|
||||
LIBS = \
|
||||
$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
|
||||
$(LIBS_DIR) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
|
|
|
@ -48,8 +48,11 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsIInputStream.h"
|
||||
|
|
|
@ -44,7 +44,6 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
PROGRAM = rdfpoll$(BIN_SUFFIX)
|
||||
CPPSRCS = rdfpoll.cpp
|
||||
MOZILLA_INTERNAL_API = 1
|
||||
|
||||
REQUIRES = xpcom \
|
||||
string \
|
||||
|
@ -53,6 +52,7 @@ REQUIRES = xpcom \
|
|||
$(NULL)
|
||||
|
||||
LIBS = \
|
||||
$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
|
||||
$(LIBS_DIR) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
|
@ -59,18 +60,17 @@
|
|||
#include "nsIRDFService.h"
|
||||
#include "nsIRDFXMLSource.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsRDFCID.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "prthread.h"
|
||||
#include "plevent.h"
|
||||
#include "plstr.h"
|
||||
#include "nsString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsEmbedString.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CIDs
|
||||
|
@ -116,11 +116,11 @@ rdf_WriteOp(const char* aOp,
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
nsXPIDLCString source;
|
||||
nsCString source;
|
||||
rv = aSource->GetValue(getter_Copies(source));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsXPIDLCString property;
|
||||
nsCString property;
|
||||
rv = aProperty->GetValue(getter_Copies(property));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
@ -129,28 +129,22 @@ rdf_WriteOp(const char* aOp,
|
|||
nsCOMPtr<nsIRDFDate> date;
|
||||
nsCOMPtr<nsIRDFInt> number;
|
||||
|
||||
printf("%.8s [%s]\n", aOp, (const char*) source);
|
||||
printf(" --[%s]--\n", (const char*) property);
|
||||
printf("%.8s [%s]\n", aOp, source.get());
|
||||
printf(" --[%s]--\n", property.get());
|
||||
|
||||
if ((resource = do_QueryInterface(aTarget)) != nsnull) {
|
||||
nsXPIDLCString target;
|
||||
nsCString target;
|
||||
rv = resource->GetValue(getter_Copies(target));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
printf(" ->[%s]\n", (const char*) target);
|
||||
printf(" ->[%s]\n", target.get());
|
||||
}
|
||||
else if ((literal = do_QueryInterface(aTarget)) != nsnull) {
|
||||
nsXPIDLString target;
|
||||
nsString target;
|
||||
rv = literal->GetValue(getter_Copies(target));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
char* p = ToNewCString(target);
|
||||
if (! p)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
printf(" ->\"%s\"\n", p);
|
||||
|
||||
nsCRT::free(p);
|
||||
printf(" ->\"%s\"\n", NS_ConvertUTF16toUTF8(target).get());
|
||||
}
|
||||
else if ((date = do_QueryInterface(aTarget)) != nsnull) {
|
||||
PRTime value;
|
||||
|
|
|
@ -44,7 +44,6 @@ VPATH = @srcdir@
|
|||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
PROGRAM = triplescat$(BIN_SUFFIX)
|
||||
MOZILLA_INTERNAL_API = 1
|
||||
|
||||
CPPSRCS = triplescat.cpp
|
||||
REQUIRES = xpcom \
|
||||
|
@ -54,6 +53,7 @@ REQUIRES = xpcom \
|
|||
$(NULL)
|
||||
|
||||
LIBS = \
|
||||
$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
|
||||
$(LIBS_DIR) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
|
|
Загрузка…
Ссылка в новой задаче