diff --git a/mailnews/addrbook/src/nsAddrDatabase.h b/mailnews/addrbook/src/nsAddrDatabase.h index a4b7dc37cd51..85a4aa2528ae 100644 --- a/mailnews/addrbook/src/nsAddrDatabase.h +++ b/mailnews/addrbook/src/nsAddrDatabase.h @@ -52,18 +52,7 @@ typedef enum { AB_NotifyInserted, AB_NotifyDeleted, - AB_NotifyPropertyChanged, - - AB_NotifyAll, /* contents of the have totally changed. Listener must totally - forget anything they knew about the object. */ - /* pane notifications (i.e. not tied to a particular entry */ - AB_NotifyScramble, /* same contents, but the view indices have all changed - i.e the object was sorted on a different attribute */ - AB_NotifyLDAPTotalContentChanged, - AB_NotifyNewTopIndex, - AB_NotifyStartSearching, - AB_NotifyStopSearching - + AB_NotifyPropertyChanged } AB_NOTIFY_CODE; class nsAddrDatabase : public nsIAddrDatabase diff --git a/mailnews/addrbook/src/nsDirectoryDataSource.cpp b/mailnews/addrbook/src/nsDirectoryDataSource.cpp index 0c2637cfb37b..3b1821742c7d 100644 --- a/mailnews/addrbook/src/nsDirectoryDataSource.cpp +++ b/mailnews/addrbook/src/nsDirectoryDataSource.cpp @@ -64,7 +64,6 @@ static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID); #define NC_RDF_DIRNAME "http://home.netscape.com/NC-rdf#DirName" -#define NC_RDF_CARDCHILD "http://home.netscape.com/NC-rdf#CardChild" #define NC_RDF_DIRURI "http://home.netscape.com/NC-rdf#DirUri" #define NC_RDF_ISMAILLIST "http://home.netscape.com/NC-rdf#IsMailList" #define NC_RDF_ISREMOTE "http://home.netscape.com/NC-rdf#IsRemote" @@ -147,9 +146,6 @@ nsAbDirectoryDataSource::Init() rv = rdf->GetResource(NS_LITERAL_CSTRING(NC_RDF_DIRNAME), getter_AddRefs(kNC_DirName)); NS_ENSURE_SUCCESS(rv,rv); - rv = rdf->GetResource(NS_LITERAL_CSTRING(NC_RDF_CARDCHILD), - getter_AddRefs(kNC_CardChild)); - NS_ENSURE_SUCCESS(rv,rv); rv = rdf->GetResource(NS_LITERAL_CSTRING(NC_RDF_DIRURI), getter_AddRefs(kNC_DirUri)); NS_ENSURE_SUCCESS(rv,rv); @@ -255,10 +251,6 @@ NS_IMETHODIMP nsAbDirectoryDataSource::GetTargets(nsIRDFResource* source, *targets = cursor; return NS_OK; } - else if((kNC_CardChild == property)) - { - return directory->GetChildCards(targets); - } } return NS_NewEmptyEnumerator(targets); } @@ -300,7 +292,6 @@ nsAbDirectoryDataSource::HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc if (NS_SUCCEEDED(rv)) { *result = (aArc == kNC_DirName || aArc == kNC_Child || - aArc == kNC_CardChild || aArc == kNC_DirUri || aArc == kNC_IsMailList || aArc == kNC_IsRemote || @@ -351,7 +342,6 @@ nsAbDirectoryDataSource::getDirectoryArcLabelsOut(nsIAbDirectory *directory, (*arcs)->AppendElement(kNC_DirName); (*arcs)->AppendElement(kNC_Child); - (*arcs)->AppendElement(kNC_CardChild); (*arcs)->AppendElement(kNC_DirUri); (*arcs)->AppendElement(kNC_IsMailList); (*arcs)->AppendElement(kNC_IsRemote); @@ -421,24 +411,13 @@ nsAbDirectoryDataSource::DoCommand(nsISupportsArray/**/* aSource NS_IMETHODIMP nsAbDirectoryDataSource::OnItemAdded(nsISupports *parentDirectory, nsISupports *item) { nsresult rv; - nsCOMPtr card; nsCOMPtr directory; nsCOMPtr parentResource; if(NS_SUCCEEDED(parentDirectory->QueryInterface(NS_GET_IID(nsIRDFResource), getter_AddRefs(parentResource)))) { - //If we are adding a card - if(NS_SUCCEEDED(item->QueryInterface(NS_GET_IID(nsIAbCard), getter_AddRefs(card)))) - { - nsCOMPtr itemNode(do_QueryInterface(item, &rv)); - if (NS_SUCCEEDED(rv)) - { - //Notify directories that a message was added. - NotifyObservers(parentResource, kNC_CardChild, itemNode, PR_TRUE, PR_FALSE); - } - } //If we are adding a directory - else if(NS_SUCCEEDED(item->QueryInterface(NS_GET_IID(nsIAbDirectory), getter_AddRefs(directory)))) + if (NS_SUCCEEDED(item->QueryInterface(NS_GET_IID(nsIAbDirectory), getter_AddRefs(directory)))) { nsCOMPtr itemNode(do_QueryInterface(item, &rv)); if(NS_SUCCEEDED(rv)) @@ -486,24 +465,13 @@ nsresult nsAbDirectoryDataSource::DoModifyDirectory(nsISupportsArray *parentDir, NS_IMETHODIMP nsAbDirectoryDataSource::OnItemRemoved(nsISupports *parentDirectory, nsISupports *item) { nsresult rv; - nsCOMPtr card; nsCOMPtr directory; nsCOMPtr parentResource; if(NS_SUCCEEDED(parentDirectory->QueryInterface(NS_GET_IID(nsIRDFResource), getter_AddRefs(parentResource)))) { - //If we are removing a card - if(NS_SUCCEEDED(item->QueryInterface(NS_GET_IID(nsIAbCard), getter_AddRefs(card)))) - { - nsCOMPtr itemNode(do_QueryInterface(item, &rv)); - if(NS_SUCCEEDED(rv)) - { - //Notify directories that a card was deleted. - NotifyObservers(parentResource, kNC_CardChild, itemNode, PR_FALSE, PR_FALSE); - } - } //If we are removing a directory - else if(NS_SUCCEEDED(item->QueryInterface(NS_GET_IID(nsIAbDirectory), getter_AddRefs(directory)))) + if (NS_SUCCEEDED(item->QueryInterface(NS_GET_IID(nsIAbDirectory), getter_AddRefs(directory)))) { nsCOMPtr itemNode(do_QueryInterface(item, &rv)); if(NS_SUCCEEDED(rv)) @@ -847,13 +815,7 @@ nsresult nsAbDirectoryDataSource::DoDirectoryHasAssertion(nsIAbDirectory *direct return NS_OK; } - if ((kNC_CardChild == property)) - { - nsCOMPtr card(do_QueryInterface(target, &rv)); - if(NS_SUCCEEDED(rv)) - rv = directory->HasCard(card, hasAssertion); - } - else if ((kNC_Child == property)) + if ((kNC_Child == property)) { nsCOMPtr newDirectory(do_QueryInterface(target, &rv)); if(NS_SUCCEEDED(rv)) diff --git a/mailnews/addrbook/src/nsDirectoryDataSource.h b/mailnews/addrbook/src/nsDirectoryDataSource.h index df3928df014a..f0ca153ee0c0 100644 --- a/mailnews/addrbook/src/nsDirectoryDataSource.h +++ b/mailnews/addrbook/src/nsDirectoryDataSource.h @@ -149,7 +149,6 @@ protected: nsCOMPtr kNC_Child; nsCOMPtr kNC_DirName; - nsCOMPtr kNC_CardChild; nsCOMPtr kNC_DirUri; nsCOMPtr kNC_IsMailList; nsCOMPtr kNC_IsRemote;