зеркало из https://github.com/mozilla/pjs.git
Bug 174583 Remove nsIRDFDataSource { nsIEnumerator GetAllCommands(in nsIRDFResource aSource); }
r=rjc,bienvenu sr=alecf
This commit is contained in:
Родитель
0347776ab8
Коммит
3e013d49d9
|
@ -489,13 +489,6 @@ NS_IMETHODIMP nsAbRDFDataSource::GetAllResources(nsISimpleEnumerator** aCursor)
|
|||
return NS_RDF_NO_VALUE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAbRDFDataSource::GetAllCommands(nsIRDFResource* source,
|
||||
nsIEnumerator/*<nsIRDFResource>*/** commands)
|
||||
{
|
||||
return NS_RDF_NO_VALUE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAbRDFDataSource::GetAllCmds(nsIRDFResource* source,
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** commands)
|
||||
|
|
|
@ -353,26 +353,6 @@ nsAbDirectoryDataSource::getDirectoryArcLabelsOut(nsIAbDirectory *directory,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAbDirectoryDataSource::GetAllCommands(nsIRDFResource* source,
|
||||
nsIEnumerator/*<nsIRDFResource>*/** commands)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsISupportsArray> cmds;
|
||||
|
||||
nsCOMPtr<nsIAbDirectory> directory(do_QueryInterface(source, &rv));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = NS_NewISupportsArray(getter_AddRefs(cmds));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
cmds->AppendElement(kNC_Delete);
|
||||
cmds->AppendElement(kNC_DeleteCards);
|
||||
}
|
||||
|
||||
if (cmds != nsnull)
|
||||
return cmds->Enumerate(commands);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAbDirectoryDataSource::IsCommandEnabled(nsISupportsArray/*<nsIRDFResource>*/* aSources,
|
||||
nsIRDFResource* aCommand,
|
||||
|
|
|
@ -98,8 +98,6 @@ public:
|
|||
NS_IMETHOD ArcLabelsOut(nsIRDFResource* source,
|
||||
nsISimpleEnumerator** labels);
|
||||
|
||||
NS_IMETHOD GetAllCommands(nsIRDFResource* source,
|
||||
nsIEnumerator/*<nsIRDFResource>*/** commands);
|
||||
NS_IMETHOD IsCommandEnabled(nsISupportsArray/*<nsIRDFResource>*/* aSources,
|
||||
nsIRDFResource* aCommand,
|
||||
nsISupportsArray/*<nsIRDFResource>*/* aArguments,
|
||||
|
|
|
@ -656,17 +656,19 @@ nsMsgFolderDataSource::GetAllResources(nsISimpleEnumerator** aCursor)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMsgFolderDataSource::GetAllCommands(nsIRDFResource* source,
|
||||
nsIEnumerator/*<nsIRDFResource>*/** commands)
|
||||
nsMsgFolderDataSource::GetAllCmds(nsIRDFResource* source,
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** commands)
|
||||
{
|
||||
NS_NOTYETIMPLEMENTED("no one actually uses me");
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsISupportsArray> cmds;
|
||||
|
||||
nsCOMPtr<nsIMsgFolder> folder(do_QueryInterface(source, &rv));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = NS_NewISupportsArray(getter_AddRefs(cmds));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIArray> cmds;
|
||||
NS_NewArray(getter_AddRefs(cmds));
|
||||
if (!cmds) return rv;
|
||||
|
||||
cmds->AppendElement(kNC_Delete);
|
||||
cmds->AppendElement(kNC_ReallyDelete);
|
||||
cmds->AppendElement(kNC_NewFolder);
|
||||
|
@ -681,19 +683,8 @@ nsMsgFolderDataSource::GetAllCommands(nsIRDFResource* source,
|
|||
cmds->AppendElement(kNC_Rename);
|
||||
cmds->AppendElement(kNC_EmptyTrash);
|
||||
cmds->AppendElement(kNC_DownloadFlagged);
|
||||
}
|
||||
|
||||
if (cmds != nsnull)
|
||||
return cmds->Enumerate(commands);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMsgFolderDataSource::GetAllCmds(nsIRDFResource* source,
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** commands)
|
||||
{
|
||||
NS_NOTYETIMPLEMENTED("sorry!");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -107,8 +107,6 @@ public:
|
|||
|
||||
NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult);
|
||||
|
||||
NS_IMETHOD GetAllCommands(nsIRDFResource* source,
|
||||
nsIEnumerator/*<nsIRDFResource>*/** commands);
|
||||
NS_IMETHOD GetAllCmds(nsIRDFResource* source,
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** commands);
|
||||
|
||||
|
|
|
@ -287,15 +287,7 @@ nsMsgRDFDataSource::GetAllResources(nsISimpleEnumerator **_retval)
|
|||
}
|
||||
|
||||
|
||||
/* nsIEnumerator GetAllCommands (in nsIRDFResource aSource); */
|
||||
NS_IMETHODIMP
|
||||
nsMsgRDFDataSource::GetAllCommands(nsIRDFResource *aSource, nsIEnumerator **_retval)
|
||||
{
|
||||
return NS_RDF_NO_VALUE;
|
||||
}
|
||||
|
||||
|
||||
/* nsISimpleEnumerator GetAllCommands (in nsIRDFResource aSource); */
|
||||
/* nsISimpleEnumerator GetAllCmds (in nsIRDFResource aSource); */
|
||||
NS_IMETHODIMP
|
||||
nsMsgRDFDataSource::GetAllCmds(nsIRDFResource *aSource, nsISimpleEnumerator **_retval)
|
||||
{
|
||||
|
|
|
@ -554,12 +554,6 @@ nsSoundDatasource::GetSources(nsIRDFResource *aProperty, nsIRDFNode *aTarget, PR
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSoundDatasource::GetAllCommands(nsIRDFResource *aSource, nsIEnumerator **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSoundDatasource::AddObserver(nsIRDFObserver *n)
|
||||
{
|
||||
|
|
|
@ -727,12 +727,6 @@ nsSubscribeDataSource::GetSources(nsIRDFResource *aProperty, nsIRDFNode *aTarget
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSubscribeDataSource::GetAllCommands(nsIRDFResource *aSource, nsIEnumerator **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSubscribeDataSource::NotifyObservers(nsIRDFResource *subject,
|
||||
nsIRDFResource *property,
|
||||
|
|
|
@ -404,12 +404,6 @@ NS_IMETHODIMP nsSmtpDataSource::GetAllResources(nsISimpleEnumerator **aResult)
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* nsIEnumerator GetAllCommands (in nsIRDFResource aSource); */
|
||||
NS_IMETHODIMP nsSmtpDataSource::GetAllCommands(nsIRDFResource *aSource, nsIEnumerator **aResult)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* boolean IsCommandEnabled (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */
|
||||
NS_IMETHODIMP nsSmtpDataSource::IsCommandEnabled(nsISupportsArray *aSources, nsIRDFResource *aCommand, nsISupportsArray *aArguments, PRBool *aResult)
|
||||
{
|
||||
|
|
|
@ -187,11 +187,6 @@ interface nsIRDFDataSource : nsISupports
|
|||
*/
|
||||
nsISimpleEnumerator GetAllResources();
|
||||
|
||||
/**
|
||||
* Returns the set of all commands defined for a given source.
|
||||
*/
|
||||
nsIEnumerator GetAllCommands(in nsIRDFResource aSource);
|
||||
|
||||
/**
|
||||
* Returns whether a given command is enabled for a set of sources.
|
||||
*/
|
||||
|
|
|
@ -1284,82 +1284,6 @@ CompositeDataSourceImpl::GetAllResources(nsISimpleEnumerator** aResult)
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* shaver 19990824: until Composite is made to implement
|
||||
* nsIRDFRemoteDataSource, we don't need or want this. When it does implement
|
||||
* nsIRDFRemoteDataSource, we should do a similar thing with Refresh and
|
||||
* make a no-op Init. I'll be back to finish that off later.
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP
|
||||
CompositeDataSourceImpl::Flush()
|
||||
{
|
||||
for (PRInt32 i = mDataSources.Count() - 1; i >= 0; --i) {
|
||||
nsIRDFDataSource* ds = NS_STATIC_CAST(nsIRDFDataSource*, mDataSources[i]);
|
||||
nsCOMPtr<nsIRDFRemoteDataSource> remote = do_QueryInterface(ds);
|
||||
if (remote)
|
||||
remote->Flush();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
NS_IMETHODIMP
|
||||
CompositeDataSourceImpl::GetEnabledCommands(nsISupportsArray* aSources,
|
||||
nsISupportsArray* aArguments,
|
||||
nsIEnumerator** aResult)
|
||||
{
|
||||
nsCOMPtr<nsIEnumerator> commands; // union of enabled commands
|
||||
for (PRInt32 i = mDataSources.Count() - 1; i >= 0; --i) {
|
||||
nsIRDFDataSource* ds = NS_STATIC_CAST(nsIRDFDataSource*, mDataSources[i]);
|
||||
nsIEnumerator* dsCmds;
|
||||
nsresult rv = ds->GetEnabledCommands(aSources, aArguments, &dsCmds);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
if (commands == nsnull) {
|
||||
commands = dont_QueryInterface(dsCmds);
|
||||
}
|
||||
else {
|
||||
nsIEnumerator* unionCmds;
|
||||
rv = NS_NewUnionEnumerator(commands, dsCmds, &unionCmds);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
NS_RELEASE(dsCmds);
|
||||
commands = dont_QueryInterface(unionCmds);
|
||||
}
|
||||
}
|
||||
}
|
||||
*aResult = commands;
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
CompositeDataSourceImpl::GetAllCommands(nsIRDFResource* source,
|
||||
nsIEnumerator/*<nsIRDFResource>*/** result)
|
||||
{
|
||||
nsCOMPtr<nsIEnumerator> commands; // union of enabled commands
|
||||
for (PRInt32 i = mDataSources.Count() - 1; i >= 0; --i) {
|
||||
nsIRDFDataSource* ds = NS_STATIC_CAST(nsIRDFDataSource*, mDataSources[i]);
|
||||
nsIEnumerator* dsCmds;
|
||||
nsresult rv = ds->GetAllCommands(source, &dsCmds);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
if (commands == nsnull) {
|
||||
commands = dont_QueryInterface(dsCmds);
|
||||
}
|
||||
else {
|
||||
nsIEnumerator* unionCmds;
|
||||
rv = NS_NewUnionEnumerator(commands, dsCmds, &unionCmds);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
NS_RELEASE(dsCmds);
|
||||
commands = dont_QueryInterface(unionCmds);
|
||||
}
|
||||
}
|
||||
}
|
||||
*result = commands;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CompositeDataSourceImpl::GetAllCmds(nsIRDFResource* source,
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** result)
|
||||
|
|
|
@ -97,9 +97,6 @@ class nsRDFDOMDataSource : public nsISupports {
|
|||
/* void Flush (); */
|
||||
NS_IMETHOD Flush() = 0;
|
||||
|
||||
/* nsIEnumerator GetAllCommands (in nsIRDFResource aSource); */
|
||||
NS_IMETHOD GetAllCommands(nsIRDFResource *aSource, nsIEnumerator **_retval) = 0;
|
||||
|
||||
/* nsISimpleEnumerator GetAllCmds (in nsIRDFResource aSource); */
|
||||
NS_IMETHOD GetAllCmds(nsIRDFResource *aSource, nsISimpleEnumerator **_retval) = 0;
|
||||
|
||||
|
|
|
@ -114,9 +114,6 @@ public:
|
|||
/* void Flush (); */
|
||||
NS_IMETHOD Flush();
|
||||
|
||||
/* nsIEnumerator GetAllCommands (in nsIRDFResource aSource); */
|
||||
NS_IMETHOD GetAllCommands(nsIRDFResource *aSource, nsIEnumerator **_retval);
|
||||
|
||||
/* boolean IsCommandEnabled (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */
|
||||
NS_IMETHOD IsCommandEnabled(nsISupportsArray * aSources, nsIRDFResource *aCommand, nsISupportsArray * aArguments, PRBool *_retval);
|
||||
|
||||
|
@ -437,13 +434,6 @@ nsRDFDataSourceDataSource::Flush()
|
|||
return NS_RDF_NO_VALUE;
|
||||
}
|
||||
|
||||
/* nsIEnumerator GetAllCommands (in nsIRDFResource aSource); */
|
||||
NS_IMETHODIMP
|
||||
nsRDFDataSourceDataSource::GetAllCommands(nsIRDFResource *aSource, nsIEnumerator **_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, PRBool *_retval)
|
||||
|
|
|
@ -4046,16 +4046,6 @@ nsBookmarksService::GetAllResources(nsISimpleEnumerator** aResult)
|
|||
return mInner->GetAllResources(aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBookmarksService::GetAllCommands(nsIRDFResource* source,
|
||||
nsIEnumerator/*<nsIRDFResource>*/** commands)
|
||||
{
|
||||
NS_NOTYETIMPLEMENTED("write me!");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBookmarksService::GetAllCmds(nsIRDFResource* source,
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** commands)
|
||||
|
|
|
@ -1282,17 +1282,6 @@ nsHTTPIndex::GetAllResources(nsISimpleEnumerator **_retval)
|
|||
return(rv);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTTPIndex::GetAllCommands(nsIRDFResource *aSource, nsIEnumerator **_retval)
|
||||
{
|
||||
nsresult rv = NS_ERROR_UNEXPECTED;
|
||||
if (mInner)
|
||||
{
|
||||
rv = mInner->GetAllCommands(aSource, _retval);
|
||||
}
|
||||
return(rv);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTTPIndex::IsCommandEnabled(nsISupportsArray *aSources, nsIRDFResource *aCommand,
|
||||
nsISupportsArray *aArguments, PRBool *_retval)
|
||||
|
|
|
@ -2140,14 +2140,6 @@ nsGlobalHistory::ArcLabelsOut(nsIRDFResource* aSource,
|
|||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGlobalHistory::GetAllCommands(nsIRDFResource* aSource,
|
||||
nsIEnumerator/*<nsIRDFResource>*/** aCommands)
|
||||
{
|
||||
NS_NOTYETIMPLEMENTED("sorry");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGlobalHistory::GetAllCmds(nsIRDFResource* aSource,
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** aCommands)
|
||||
|
|
|
@ -1962,14 +1962,6 @@ NS_IMETHODIMP nsCharsetMenu::GetAllResources(nsISimpleEnumerator** aCursor)
|
|||
return mInner->GetAllResources(aCursor);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCharsetMenu::GetAllCommands(
|
||||
nsIRDFResource* source,
|
||||
nsIEnumerator/*<nsIRDFResource>*/** commands)
|
||||
{
|
||||
NS_NOTYETIMPLEMENTED("write me!");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCharsetMenu::GetAllCmds(
|
||||
nsIRDFResource* source,
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** commands)
|
||||
|
|
|
@ -660,14 +660,6 @@ nsRegistryDataSource::GetAllResources(nsISimpleEnumerator **_retval)
|
|||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::GetAllCommands(nsIRDFResource *aSource, nsIEnumerator **_retval)
|
||||
{
|
||||
NS_NOTYETIMPLEMENTED("write me");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::IsCommandEnabled(nsISupportsArray *aSources, nsIRDFResource *aCommand, nsISupportsArray *aArguments, PRBool *_retval)
|
||||
{
|
||||
|
|
|
@ -937,15 +937,6 @@ RelatedLinksHandlerImpl::RemoveObserver(nsIRDFObserver *aObserver)
|
|||
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
RelatedLinksHandlerImpl::GetAllCommands(nsIRDFResource* aSource,
|
||||
nsIEnumerator/*<nsIRDFResource>*/** aCommands)
|
||||
{
|
||||
return mInner->GetAllCommands(aSource, aCommands);
|
||||
}
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
RelatedLinksHandlerImpl::GetAllCmds(nsIRDFResource* aSource,
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** aCommands)
|
||||
|
|
|
@ -1712,16 +1712,6 @@ InternetSearchDataSource::RemoveObserver(nsIRDFObserver *aObserver)
|
|||
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
InternetSearchDataSource::GetAllCommands(nsIRDFResource* source,
|
||||
nsIEnumerator/*<nsIRDFResource>*/** commands)
|
||||
{
|
||||
NS_NOTYETIMPLEMENTED("write me!");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
InternetSearchDataSource::GetAllCmds(nsIRDFResource* source,
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** commands)
|
||||
|
|
|
@ -955,15 +955,6 @@ LocalSearchDataSource::RemoveObserver(nsIRDFObserver *n)
|
|||
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
LocalSearchDataSource::GetAllCommands(nsIRDFResource* source,nsIEnumerator/*<nsIRDFResource>*/** commands)
|
||||
{
|
||||
NS_NOTYETIMPLEMENTED("write me!");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
LocalSearchDataSource::GetAllCmds(nsIRDFResource* source, nsISimpleEnumerator/*<nsIRDFResource>*/** commands)
|
||||
{
|
||||
|
|
|
@ -534,14 +534,6 @@ NS_IMETHODIMP nsWindowDataSource::GetAllResources(nsISimpleEnumerator **_retval)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* nsIEnumerator GetAllCommands (in nsIRDFResource aSource); */
|
||||
NS_IMETHODIMP nsWindowDataSource::GetAllCommands(nsIRDFResource *aSource, nsIEnumerator **_retval)
|
||||
{
|
||||
if (mInner)
|
||||
return mInner->GetAllCommands(aSource, _retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* boolean IsCommandEnabled (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */
|
||||
NS_IMETHODIMP nsWindowDataSource::IsCommandEnabled(nsISupportsArray *aSources, nsIRDFResource *aCommand, nsISupportsArray *aArguments, PRBool *_retval)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче