Bug 973142 - Get rid of the MOZILLA_INTERNAL_API makefile variable; r=glandium

It's just as easy to directly set the preprocessor macro in the moz.build
files.  Using this variable doesn't really buy us anything.

This patch also removes unused code from rdf/tests/dsds.
This commit is contained in:
Ehsan Akhgari 2014-02-18 01:56:51 -05:00
parent 3ffdf39409
commit 22eada1dd3
30 changed files with 17 additions and 711 deletions

View File

@ -420,8 +420,7 @@ ifdef _MSC_VER
OS_LDFLAGS += $(DELAYLOAD_LDFLAGS)
endif # _MSC_VER
# Does the makefile specifies the internal XPCOM API linkage?
ifneq (,$(MOZILLA_INTERNAL_API)$(LIBXUL_LIBRARY))
ifneq (,$(LIBXUL_LIBRARY))
DEFINES += -DMOZILLA_INTERNAL_API
endif

View File

@ -12,4 +12,3 @@ LOCAL_INCLUDES += $(MOZ_ICU_CFLAGS)
endif
DIST_INSTALL = 1
MOZILLA_INTERNAL_API = 1

View File

@ -14,4 +14,3 @@ LOCAL_INCLUDES += [
'..',
'../../src',
]

View File

@ -1,6 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API = 1

View File

@ -12,3 +12,5 @@ LIBRARY_NAME = 'profdirserviceprovider_s'
# we don't want the shared lib
FORCE_STATIC_LIB = True
DEFINES['MOZILLA_INTERNAL_API'] = True

View File

@ -312,7 +312,8 @@ VARIABLES = {
'LIBXUL_LIBRARY': (bool, bool,
"""Whether the library in this directory is linked into libxul.
Implies ``MOZILLA_INTERNAL_API`` and ``FORCE_STATIC_LIB``.
Implies ``FORCE_STATIC_LIB`` and the ``MOZILLA_INTERNAL_API``
preprocessor macro.
""", None),
'LOCAL_INCLUDES': (StrictOrderingOnAppendList, list,

View File

@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API = 1
EXTRA_DSO_LDOPTS = \
-L$(DIST)/bin \
$(XPCOM_LIBS) \

View File

@ -4,15 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
SOURCES += [
'nsRDFDataSourceDS.cpp',
'nsRDFDataSourceFactory.cpp',
]
LIBRARY_NAME = 'rdfdsds'
IS_COMPONENT = True
RESOURCE_FILES.samples.rdf += [
'DataSourceViewer.css',
'DataSourceViewer.xul',

View File

@ -1,86 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef __gen_nsRDFDOMDataSource_h__
#define __gen_nsRDFDOMDataSource_h__
#include "nsRDFDOMDataSource.h"
/* starting interface: nsRDFDOMDataSource */
/* {0F78DA58-8321-11d2-8EAC-00805F29F370} */
#define NS_IRDFDATASOURCE_IID_STR "0F78DA58-8321-11d2-8EAC-00805F29F370"
#define NS_IRDFDATASOURCE_IID \
{0x0F78DA58, 0x8321, 0x11d2, \
{ 0x8E, 0xAC, 0x00, 0x80, 0x5F, 0x29, 0xF3, 0x70 }}
class nsRDFDOMDataSource : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IRDFDATASOURCE_IID)
/* void Init (in string uri); */
NS_IMETHOD Init(const char *uri) = 0;
/* readonly attribute string URI; */
NS_IMETHOD GetURI(char * *aURI) = 0;
/* nsIRDFResource GetSource (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
NS_IMETHOD GetSource(nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, nsIRDFResource **_retval) = 0;
/* nsISimpleEnumerator GetSources (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
NS_IMETHOD GetSources(nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, nsISimpleEnumerator **_retval) = 0;
/* nsIRDFNode GetTarget (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */
NS_IMETHOD GetTarget(nsIRDFResource *aSource, nsIRDFResource *aProperty, bool aTruthValue, nsIRDFNode **_retval) = 0;
/* nsISimpleEnumerator GetTargets (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */
NS_IMETHOD GetTargets(nsIRDFResource *aSource, nsIRDFResource *aProperty, bool aTruthValue, nsISimpleEnumerator **_retval) = 0;
/* void Assert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
NS_IMETHOD Assert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue) = 0;
/* void Unassert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */
NS_IMETHOD Unassert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) = 0;
/* boolean HasAssertion (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
NS_IMETHOD HasAssertion(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, bool *_retval) = 0;
/* void AddObserver (in nsIRDFObserver aObserver); */
NS_IMETHOD AddObserver(nsIRDFObserver *aObserver) = 0;
/* void RemoveObserver (in nsIRDFObserver aObserver); */
NS_IMETHOD RemoveObserver(nsIRDFObserver *aObserver) = 0;
/* nsISimpleEnumerator ArcLabelsIn (in nsIRDFNode aNode); */
NS_IMETHOD ArcLabelsIn(nsIRDFNode *aNode, nsISimpleEnumerator **_retval) = 0;
/* nsISimpleEnumerator ArcLabelsOut (in nsIRDFResource aSource); */
NS_IMETHOD ArcLabelsOut(nsIRDFResource *aSource, nsISimpleEnumerator **_retval) = 0;
/* nsISimpleEnumerator GetAllResources (); */
NS_IMETHOD GetAllResources(nsISimpleEnumerator **_retval) = 0;
/* void Flush (); */
NS_IMETHOD Flush() = 0;
/* nsISimpleEnumerator GetAllCmds (in nsIRDFResource aSource); */
NS_IMETHOD GetAllCmds(nsIRDFResource *aSource, nsISimpleEnumerator **_retval) = 0;
/* boolean IsCommandEnabled (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */
NS_IMETHOD IsCommandEnabled(nsISupportsArray * aSources, nsIRDFResource *aCommand, nsISupportsArray * aArguments, bool *_retval) = 0;
/* void DoCommand (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */
NS_IMETHOD DoCommand(nsISupportsArray * aSources, nsIRDFResource *aCommand, nsISupportsArray * aArguments) = 0;
/* void beginUpdateBatch (); */
NS_IMETHOD BeginUpdateBatch() = 0;
/* void endUpdateBatch (); */
NS_IMETHOD EndUpdateBatch() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsRDFDOMDataSource, NS_IRDFDATASOURCE_IID)
#endif /* __gen_nsRDFDOMDataSource_h__ */

View File

@ -1,456 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsCRT.h"
#include "nsCOMPtr.h"
#include "nsIRDFService.h"
#include "nsRDFCID.h"
#include "nsIRDFDataSource.h"
#include "nsIRDFRemoteDataSource.h"
#include "rdf.h"
#include "nsIServiceManager.h"
#include "nsEnumeratorUtils.h"
#include "nsXPIDLString.h"
#ifdef DEBUG
#include <stdio.h>
#endif
/**
* RDF vocabulary describing assertions in inner datasource
*
* For a particular resource, we want to provide all arcs out and
* in that the inner datasource has.
* This is done by introducing helper resources for each triple of
* the form
* x-moz-dsds:<subject-resource-pointer><predicate-resource-pointer>\
* <object-node-pointer>
* For each triple, that has the resource in question as subject, a
* "arcsout" assertion goes from that resource to a x-moz-dsds resource.
* For each triple, that has the resource in question as object, a
* "arcsin" assertion goes from that resource to a x-moz-dsds resource.
* For each x-moz-dsds resource, there is a "subject" arc to the subject,
* a "predicate" arc to the predicate and a "object" arc to the object.
*
* The namespace of this vocabulary is
* "http://www.mozilla.org/rdf/vocab/dsds".
*
* XXX we might want to add a "qname" resource from each resource to a
* somewhat canonical "prefix:localname" literal.
*/
#define NS_RDF_DSDS_NAMESPACE_URI "http://www.mozilla.org/rdf/vocab/dsds#"
#define NS_RDF_ARCSOUT NS_RDF_DSDS_NAMESPACE_URI "arcsout"
#define NS_RDF_ARCSIN NS_RDF_DSDS_NAMESPACE_URI "arcsin"
#define NS_RDF_SUBJECT NS_RDF_DSDS_NAMESPACE_URI "subject"
#define NS_RDF_PREDICATE NS_RDF_DSDS_NAMESPACE_URI "predicate"
#define NS_RDF_OBJECT NS_RDF_DSDS_NAMESPACE_URI "object"
#define NC_RDF_Name NC_NAMESPACE_URI "Name"
#define NC_RDF_Value NC_NAMESPACE_URI "Value"
#define NC_RDF_Child NC_NAMESPACE_URI "child"
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
class nsRDFDataSourceDataSource :
public nsIRDFDataSource,
public nsIRDFRemoteDataSource {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIRDFDATASOURCE
NS_DECL_NSIRDFREMOTEDATASOURCE
nsRDFDataSourceDataSource();
virtual ~nsRDFDataSourceDataSource();
private:
nsCString mURI;
nsCOMPtr<nsIRDFDataSource> mDataSource;
static nsIRDFResource* kNC_Name;
static nsIRDFResource* kNC_Value;
static nsIRDFResource* kNC_Child;
};
nsIRDFResource* nsRDFDataSourceDataSource::kNC_Name=nullptr;
nsIRDFResource* nsRDFDataSourceDataSource::kNC_Value=nullptr;
nsIRDFResource* nsRDFDataSourceDataSource::kNC_Child=nullptr;
nsRDFDataSourceDataSource::nsRDFDataSourceDataSource()
{
}
nsRDFDataSourceDataSource::~nsRDFDataSourceDataSource()
{
}
NS_IMPL_ISUPPORTS2(nsRDFDataSourceDataSource,
nsIRDFDataSource,
nsIRDFRemoteDataSource)
/**
* Implement nsIRDFRemoteDataSource
*/
/* readonly attribute boolean loaded; */
NS_IMETHODIMP nsRDFDataSourceDataSource::GetLoaded(bool *aLoaded)
{
nsCOMPtr<nsIRDFRemoteDataSource> remote =
do_QueryInterface(mDataSource);
if (remote) {
return remote->GetLoaded(aLoaded);
}
*aLoaded = true;
return NS_OK;
}
/* void Init (in string uri); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::Init(const char *uri)
{
nsresult rv;
mURI = uri;
// cut off "rdf:datasource?"
NS_NAMED_LITERAL_CSTRING(prefix, "rdf:datasource");
nsAutoCString mInnerURI;
mInnerURI = Substring(mURI, prefix.Length() + 1);
// bail if datasorce is empty or we're trying to inspect ourself
if (mInnerURI.IsEmpty() || mInnerURI == prefix) {
mURI.Truncate();
return NS_ERROR_INVALID_ARG;
}
nsCOMPtr<nsIRDFService> rdf(do_GetService(kRDFServiceCID, &rv));
rv = rdf->GetDataSource(mInnerURI.get(), getter_AddRefs(mDataSource));
if (NS_FAILED(rv)) {
mURI.Truncate();
NS_WARNING("Could not get inner datasource");
return rv;
}
// get RDF resources
if (!kNC_Name) {
rdf->GetResource(NS_LITERAL_CSTRING(NC_RDF_Name), &kNC_Name);
rdf->GetResource(NS_LITERAL_CSTRING(NC_RDF_Child), &kNC_Child);
rdf->GetResource(NS_LITERAL_CSTRING(NC_RDF_Value), &kNC_Value);
}
#ifdef DEBUG_alecf
printf("nsRDFDataSourceDataSource::Init(%s)\n", uri);
#endif
return NS_OK;
}
/* void Refresh (in boolean aBlocking); */
NS_IMETHODIMP nsRDFDataSourceDataSource::Refresh(bool aBlocking)
{
nsCOMPtr<nsIRDFRemoteDataSource> remote =
do_QueryInterface(mDataSource);
if (remote) {
return remote->Refresh(aBlocking);
}
return NS_OK;
}
/* void Flush (); */
NS_IMETHODIMP nsRDFDataSourceDataSource::Flush()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void FlushTo (in string aURI); */
NS_IMETHODIMP nsRDFDataSourceDataSource::FlushTo(const char *aURI)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/**
* Implement nsIRDFDataSource
*/
/* readonly attribute string URI; */
NS_IMETHODIMP
nsRDFDataSourceDataSource::GetURI(char * *aURI)
{
#ifdef DEBUG_alecf
printf("nsRDFDataSourceDataSource::GetURI()\n");
#endif
*aURI = ToNewCString(mURI);
return NS_OK;
}
/* nsIRDFResource GetSource (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::GetSource(nsIRDFResource *aProperty,
nsIRDFNode *aTarget,
bool aTruthValue,
nsIRDFResource **_retval)
{
return NS_RDF_NO_VALUE;
}
/* nsISimpleEnumerator GetSources (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::GetSources(nsIRDFResource *aProperty,
nsIRDFNode *aTarget,
bool aTruthValue,
nsISimpleEnumerator **_retval)
{
return NS_RDF_NO_VALUE;
}
/* nsIRDFNode GetTarget (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::GetTarget(nsIRDFResource *aSource,
nsIRDFResource *aProperty,
bool aTruthValue,
nsIRDFNode **_retval)
{
#ifdef DEBUG_alecf
nsXPIDLCString sourceval;
nsXPIDLCString propval;
aSource->GetValue(getter_Copies(sourceval));
aProperty->GetValue(getter_Copies(propval));
printf("GetTarget(%s, %s,..)\n", (const char*)sourceval,
(const char*)propval);
#endif
return NS_OK;
}
/* nsISimpleEnumerator GetTargets (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::GetTargets(nsIRDFResource *aSource,
nsIRDFResource *aProperty,
bool aTruthValue,
nsISimpleEnumerator **_retval)
{
nsXPIDLCString sourceval;
aSource->GetValue(getter_Copies(sourceval));
nsXPIDLCString propval;
aProperty->GetValue(getter_Copies(propval));
#ifdef DEBUG_alecf
printf("GetTargets(%s, %s,..)\n", (const char*)sourceval,
(const char*)propval);
#endif
nsresult rv;
bool isProp;
nsCOMPtr<nsISupportsArray> arcs;
nsISimpleEnumerator *enumerator;
if (NS_SUCCEEDED(aProperty->EqualsNode(kNC_Child, &isProp)) &&
isProp) {
// here we need to determine if we need to extract out the source
// or use aSource?
if (StringBeginsWith(sourceval, NS_LITERAL_CSTRING("dsresource:"))) {
// somehow get the source
// XXX ? rv = mDataSource->ArcLabelsOut(realsource, &enumerator);
rv = mDataSource->ArcLabelsOut(aSource, &enumerator);
} else {
rv = mDataSource->ArcLabelsOut(aSource, &enumerator);
}
// enumerate all the children and create the composite resources
bool hasMoreArcs=false;
rv = enumerator->HasMoreElements(&hasMoreArcs);
while (NS_SUCCEEDED(rv) && hasMoreArcs) {
// get the next arc
nsCOMPtr<nsISupports> arcSupports;
rv = enumerator->GetNext(getter_AddRefs(arcSupports));
nsCOMPtr<nsIRDFResource> arc = do_QueryInterface(arcSupports, &rv);
// get all the resources on the ends of the arc arcs
nsCOMPtr<nsISimpleEnumerator> targetEnumerator;
rv = mDataSource->GetTargets(aSource, arc, true,
getter_AddRefs(targetEnumerator));
bool hasMoreTargets;
rv = targetEnumerator->HasMoreElements(&hasMoreTargets);
while (NS_SUCCEEDED(rv) && hasMoreTargets) {
// get the next target
nsCOMPtr<nsISupports> targetSupports;
rv = enumerator->GetNext(getter_AddRefs(targetSupports));
nsCOMPtr<nsIRDFResource> target=do_QueryInterface(targetSupports, &rv);
// now we have an (arc, target) tuple that will be our node
// arc will become #Name
// target will become #Value
#ifdef DEBUG_alecf
nsXPIDLString arcValue;
nsXPIDLString targetValue;
arc->GetValue(getter_Copies(arcValue));
target->GetValue(getter_Copies(targetValue));
printf("#child of %s:\n\t%s = %s\n",
(const char*)sourceval
#endif
}
rv = enumerator->HasMoreElements(&hasMoreArcs);
}
} else if (NS_SUCCEEDED(aProperty->EqualsNode(kNC_Name, &isProp)) &&
isProp) {
if (StringBeginsWith(sourceval, NS_LITERAL_CSTRING("dsresource:"))) {
// extract out the name
}
} else if (NS_SUCCEEDED(aProperty->EqualsNode(kNC_Value, &isProp)) &&
isProp) {
} else {
rv = NS_NewISupportsArray(getter_AddRefs(arcs));
if (NS_FAILED(rv)) return rv;
nsArrayEnumerator* cursor =
new nsArrayEnumerator(arcs);
if (!cursor) return NS_ERROR_OUT_OF_MEMORY;
*_retval = cursor;
NS_ADDREF(*_retval);
}
return NS_OK;
}
/* void Assert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::Assert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue)
{
return NS_RDF_NO_VALUE;
}
/* void Unassert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::Unassert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget)
{
return NS_RDF_NO_VALUE;
}
/* boolean HasAssertion (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::HasAssertion(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, bool *_retval)
{
return NS_RDF_NO_VALUE;
}
/* void AddObserver (in nsIRDFObserver aObserver); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::AddObserver(nsIRDFObserver *aObserver)
{
return NS_RDF_NO_VALUE;
}
/* void RemoveObserver (in nsIRDFObserver aObserver); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::RemoveObserver(nsIRDFObserver *aObserver)
{
return NS_RDF_NO_VALUE;
}
/* nsISimpleEnumerator ArcLabelsIn (in nsIRDFNode aNode); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::ArcLabelsIn(nsIRDFNode *aNode, nsISimpleEnumerator **_retval)
{
return NS_RDF_NO_VALUE;
}
/* nsISimpleEnumerator ArcLabelsOut (in nsIRDFResource aSource); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::ArcLabelsOut(nsIRDFResource *aSource,
nsISimpleEnumerator **_retval)
{
nsresult rv=NS_OK;
nsCOMPtr<nsISupportsArray> arcs;
rv = NS_NewISupportsArray(getter_AddRefs(arcs));
if (NS_FAILED(rv)) return rv;
nsXPIDLCString sourceval;
aSource->GetValue(getter_Copies(sourceval));
#ifdef DEBUG_alecf
printf("ArcLabelsOut(%s)\n", (const char*)sourceval);
#endif
arcs->AppendElement(kNC_Name);
arcs->AppendElement(kNC_Value);
arcs->AppendElement(kNC_Child);
nsArrayEnumerator* cursor =
new nsArrayEnumerator(arcs);
if (!cursor) return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(cursor);
*_retval = cursor;
return NS_OK;
}
/* nsISimpleEnumerator GetAllResources (); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::GetAllResources(nsISimpleEnumerator **_retval)
{
return NS_RDF_NO_VALUE;
}
/* boolean IsCommandEnabled (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::IsCommandEnabled(nsISupportsArray * aSources, nsIRDFResource *aCommand, nsISupportsArray * aArguments, bool *_retval)
{
return NS_RDF_NO_VALUE;
}
/* void DoCommand (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::DoCommand(nsISupportsArray * aSources, nsIRDFResource *aCommand, nsISupportsArray * aArguments)
{
return NS_RDF_NO_VALUE;
}
/* void beginUpdateBatch (); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::BeginUpdateBatch()
{
return NS_OK;
}
/* void endUpdateBatch (); */
NS_IMETHODIMP
nsRDFDataSourceDataSource::EndUpdateBatch()
{
return NS_OK;
}
nsresult
NS_NewRDFDataSourceDataSource(nsISupports *, const nsIID& iid,
void ** result)
{
nsRDFDataSourceDataSource * dsds = new nsRDFDataSourceDataSource();
if (!dsds) return NS_ERROR_NOT_INITIALIZED;
return dsds->QueryInterface(iid, result);
}

View File

@ -1,19 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef __nsRDFDataSourceDS_h
#define __nsRDFDataSourceDS_h
/* {aa1b3f18-1aad-11d3-84bf-006008948010} */
#define NS_RDFDATASOURCEDATASOURCE_CID \
{0xaa1b3f18, 0x1aad, 0x11d3, \
{0x84, 0xbf, 0x00, 0x60, 0x08, 0x94, 0x80, 0x10}}
nsresult
NS_NewRDFDataSourceDataSource(nsISupports* aOuter,
const nsIID& iid, void **result);
#endif

View File

@ -1,70 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsIGenericFactory.h"
#include "nsRDFDataSourceDS.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "rdf.h"
#ifdef DEBUG
#include <stdio.h>
#endif
static NS_DEFINE_CID(kRDFDataSourceCID, NS_RDFDATASOURCEDATASOURCE_CID);
static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
nsresult
NSGetFactory(nsISupports* aServMgr,
const nsCID &aClass,
const char* aClassName,
const char* aContractID,
nsIFactory **aFactory)
{
nsresult rv=NS_OK;
nsIGenericFactory* fact;
if (aClass.Equals(kRDFDataSourceCID))
rv = NS_NewGenericFactory(&fact, NS_NewRDFDataSourceDataSource);
else
rv = NS_ERROR_FAILURE;
if (NS_SUCCEEDED(rv))
*aFactory = fact;
#ifdef DEBUG_alecf
printf("nsRDFDataSource's NSGetFactory!\n");
#endif
return rv;
}
nsresult
NSRegisterSelf(nsISupports* aServMgr, const char* aPath)
{
nsresult rv;
nsCOMPtr<nsIComponentManager> compMgr =
do_GetService(kComponentManagerCID, aServMgr, &rv);
if (NS_FAILED(rv)) return rv;
rv = compMgr->RegisterComponent(kRDFDataSourceCID,
"Generic DataSource DataSource",
NS_RDF_DATASOURCE_CONTRACTID_PREFIX "datasource",
aPath, true, true);
return rv;
}
nsresult
NSUnregisterSelf(nsISupports* aServMgr, const char* aPath)
{
nsresult rv;
nsCOMPtr<nsIComponentManager> compMgr =
do_GetService(kComponentManagerCID, aServMgr, &rv);
if (NS_FAILED(rv)) return rv;
rv = compMgr->UnregisterComponent(kRDFDataSourceCID, aPath);
return rv;
}

View File

@ -1,12 +0,0 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This makefile builds the version of unicharutils_s static library which uses
# internal linkage. Components that use frozen (external) linkage should use
# rdfutil_external_s.
MOZILLA_INTERNAL_API = 1
include $(topsrcdir)/config/rules.mk

View File

@ -1,5 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API := 1

View File

@ -3,7 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API = 1
include $(topsrcdir)/config/rules.mk
ABS_SRCDIR := $(abspath $(srcdir))

View File

@ -1,13 +0,0 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API = 1
# XXX Get this to work in libxul builds.
## simple c++ tests (no xpcom)
#CPP_UNIT_TESTS = \
# TestUrlClassifierUtils.cpp \
# $(NULL)

View File

@ -9,3 +9,11 @@ MOCHITEST_CHROME_MANIFESTS += ['mochitest/chrome.ini']
XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
JAR_MANIFESTS += ['jar.mn']
#DEFINES['MOZILLA_INTERNAL_API'] = True
# XXX Get this to work in libxul builds.
## simple c++ tests (no xpcom)
#CPP_UNIT_TESTS += [ \
# 'TestUrlClassifierUtils.cpp', \
#]

View File

@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API = 1
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
# This is going to be a framework named "XUL", not an ordinary library named
# "libxul.dylib"

View File

@ -20,6 +20,8 @@ if CONFIG['OS_ARCH'] == 'WINNT':
'/xpcom/base',
]
DEFINES['MOZILLA_INTERNAL_API'] = True
# component libraries
additional_defines = (
'MOZ_AUTH_EXTENSION',

View File

@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API = 1
include $(topsrcdir)/config/rules.mk
DUMP_CLASSES = \

View File

@ -4,3 +4,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEFINES['MOZILLA_INTERNAL_API'] = True

View File

@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API =1
INSTALL_TARGETS += errorlist
errorlist_FILES := \
ErrorListCDefines.h \

View File

@ -158,6 +158,5 @@ LOCAL_INCLUDES += [
'/xpcom/ds',
]
if CONFIG['MOZ_OPTIMIZE']:
DEFINES['MOZ_OPTIMIZE'] = True

View File

@ -5,8 +5,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API = 1
LOCAL_INCLUDES = \
-I$(srcdir) \
-I.. \

View File

@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API = 1
LOCAL_INCLUDES = \
-I$(srcdir)/../reflect/xptinfo/src \
-I$(srcdir)/../base \

View File

@ -2,7 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API = 1
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES += -I..

View File

@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API = 1
######################################################################
# ARM
######################################################################

View File

@ -1,6 +0,0 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API = 1

View File

@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZILLA_INTERNAL_API = 1
include $(topsrcdir)/config/rules.mk
ifneq (,$(INTEL_ARCHITECTURE))

View File

@ -70,6 +70,7 @@ CPP_UNIT_TESTS += [
'TestPipe.cpp',
'TestPLDHash.cpp',
'TestRefPtr.cpp',
'TestStringAPI.cpp',
'TestTArray.cpp',
'TestTextFormatter.cpp',
'TestThreadUtils.cpp'
@ -113,11 +114,6 @@ if CONFIG['MOZ_DEBUG'] and CONFIG['OS_ARCH'] not in ('WINNT', 'Darwin'):
'TestDeadlockDetectorScalability.cpp',
]
if not CONFIG['MOZILLA_INTERNAL_API']:
CPP_UNIT_TESTS += [
'TestStringAPI.cpp',
]
LOCAL_INCLUDES += [
'../ds',
]