diff --git a/mailnews/addrbook/public/nsIAbMDBCard.idl b/mailnews/addrbook/public/nsIAbMDBCard.idl index b7cc9059599..2082eb8d672 100644 --- a/mailnews/addrbook/public/nsIAbMDBCard.idl +++ b/mailnews/addrbook/public/nsIAbMDBCard.idl @@ -41,7 +41,7 @@ interface nsIAddrDatabase; -[scriptable, uuid(5F414A80-1DD2-11B2-AAD0-AA4A15D5A1E8)] +[scriptable, uuid(3ed862c5-7007-49fc-8834-094e1c71baab)] interface nsIAbMDBCard : nsISupports { // used by the absync code attribute unsigned long key; @@ -52,11 +52,6 @@ interface nsIAbMDBCard : nsISupports { void setAbDatabase(in nsIAddrDatabase database); - // Copies attributes from the srcCard - // Only used when the address database notifies - // a directory listener of an inserted event - void copyCard(in nsIAbMDBCard srcCardDB); - wstring getStringAttribute(in string name); void setStringAttribute(in string name, in wstring value); }; diff --git a/mailnews/addrbook/src/nsAbCardProperty.cpp b/mailnews/addrbook/src/nsAbCardProperty.cpp index 5089f9c9a35..384685195a9 100644 --- a/mailnews/addrbook/src/nsAbCardProperty.cpp +++ b/mailnews/addrbook/src/nsAbCardProperty.cpp @@ -1187,11 +1187,11 @@ NS_IMETHODIMP nsAbCardProperty::Copy(nsIAbCard* srcCard) srcCard->GetSecondEmail(getter_Copies(str)); SetSecondEmail(str); - PRUint32 format; + PRUint32 format = nsIAbPreferMailFormat::unknown; srcCard->GetPreferMailFormat(&format); SetPreferMailFormat(format); - PRUint32 popularityIndex; + PRUint32 popularityIndex = 0; srcCard->GetPopularityIndex(&popularityIndex); SetPopularityIndex(popularityIndex); diff --git a/mailnews/addrbook/src/nsAbMDBCardProperty.cpp b/mailnews/addrbook/src/nsAbMDBCardProperty.cpp index 64de064c463..f8e0cf7b66b 100644 --- a/mailnews/addrbook/src/nsAbMDBCardProperty.cpp +++ b/mailnews/addrbook/src/nsAbMDBCardProperty.cpp @@ -129,141 +129,6 @@ NS_IMETHODIMP nsAbMDBCardProperty::GetStringAttribute(const char *name, PRUnicha return mCardDatabase->GetCardValue(this, name, value); } -NS_IMETHODIMP nsAbMDBCardProperty::CopyCard(nsIAbMDBCard* srcCardDB) -{ - nsresult rv = NS_OK; - nsCOMPtr srcCard(do_QueryInterface(srcCardDB, &rv)); - NS_ENSURE_SUCCESS(rv, rv); - - nsXPIDLString str; - srcCard->GetFirstName(getter_Copies(str)); - SetFirstName(str); - - srcCard->GetLastName(getter_Copies(str)); - SetLastName(str); - srcCard->GetPhoneticFirstName(getter_Copies(str)); - SetPhoneticFirstName(str); - srcCard->GetPhoneticLastName(getter_Copies(str)); - SetPhoneticLastName(str); - srcCard->GetDisplayName(getter_Copies(str)); - SetDisplayName(str); - srcCard->GetNickName(getter_Copies(str)); - SetNickName(str); - srcCard->GetPrimaryEmail(getter_Copies(str)); - SetPrimaryEmail(str); - srcCard->GetSecondEmail(getter_Copies(str)); - SetSecondEmail(str); - - PRUint32 format = nsIAbPreferMailFormat::unknown; - srcCard->GetPreferMailFormat(&format); - SetPreferMailFormat(format); - - PRUint32 popularityIndex = 0; - srcCard->GetPopularityIndex(&popularityIndex); - SetPopularityIndex(popularityIndex); - - PRBool allowRemoteContent = PR_FALSE; - srcCard->GetAllowRemoteContent(&allowRemoteContent); - SetAllowRemoteContent(allowRemoteContent); - - srcCard->GetWorkPhone(getter_Copies(str)); - SetWorkPhone(str); - srcCard->GetHomePhone(getter_Copies(str)); - SetHomePhone(str); - srcCard->GetFaxNumber(getter_Copies(str)); - SetFaxNumber(str); - srcCard->GetPagerNumber(getter_Copies(str)); - SetPagerNumber(str); - srcCard->GetCellularNumber(getter_Copies(str)); - SetCellularNumber(str); - srcCard->GetWorkPhoneType(getter_Copies(str)); - SetWorkPhoneType(str); - srcCard->GetHomePhoneType(getter_Copies(str)); - SetHomePhoneType(str); - srcCard->GetFaxNumberType(getter_Copies(str)); - SetFaxNumberType(str); - srcCard->GetPagerNumberType(getter_Copies(str)); - SetPagerNumberType(str); - srcCard->GetCellularNumberType(getter_Copies(str)); - SetCellularNumberType(str); - srcCard->GetHomeAddress(getter_Copies(str)); - SetHomeAddress(str); - srcCard->GetHomeAddress2(getter_Copies(str)); - SetHomeAddress2(str); - srcCard->GetHomeCity(getter_Copies(str)); - SetHomeCity(str); - srcCard->GetHomeState(getter_Copies(str)); - SetHomeState(str); - srcCard->GetHomeZipCode(getter_Copies(str)); - SetHomeZipCode(str); - srcCard->GetHomeCountry(getter_Copies(str)); - SetHomeCountry(str); - srcCard->GetWorkAddress(getter_Copies(str)); - SetWorkAddress(str); - srcCard->GetWorkAddress2(getter_Copies(str)); - SetWorkAddress2(str); - srcCard->GetWorkCity(getter_Copies(str)); - SetWorkCity(str); - srcCard->GetWorkState(getter_Copies(str)); - SetWorkState(str); - srcCard->GetWorkZipCode(getter_Copies(str)); - SetWorkZipCode(str); - srcCard->GetWorkCountry(getter_Copies(str)); - SetWorkCountry(str); - srcCard->GetJobTitle(getter_Copies(str)); - SetJobTitle(str); - srcCard->GetDepartment(getter_Copies(str)); - SetDepartment(str); - srcCard->GetCompany(getter_Copies(str)); - SetCompany(str); - srcCard->GetAimScreenName(getter_Copies(str)); - SetAimScreenName(str); - - srcCard->GetAnniversaryYear(getter_Copies(str)); - SetAnniversaryYear(str); - srcCard->GetAnniversaryMonth(getter_Copies(str)); - SetAnniversaryMonth(str); - srcCard->GetAnniversaryDay(getter_Copies(str)); - SetAnniversaryDay(str); - srcCard->GetSpouseName(getter_Copies(str)); - SetSpouseName(str); - srcCard->GetFamilyName(getter_Copies(str)); - SetFamilyName(str); - srcCard->GetDefaultAddress(getter_Copies(str)); - SetDefaultAddress(str); - srcCard->GetCategory(getter_Copies(str)); - SetCategory(str); - - srcCard->GetWebPage1(getter_Copies(str)); - SetWebPage1(str); - srcCard->GetWebPage2(getter_Copies(str)); - SetWebPage2(str); - srcCard->GetBirthYear(getter_Copies(str)); - SetBirthYear(str); - srcCard->GetBirthMonth(getter_Copies(str)); - SetBirthMonth(str); - srcCard->GetBirthDay(getter_Copies(str)); - SetBirthDay(str); - srcCard->GetCustom1(getter_Copies(str)); - SetCustom1(str); - srcCard->GetCustom2(getter_Copies(str)); - SetCustom2(str); - srcCard->GetCustom3(getter_Copies(str)); - SetCustom3(str); - srcCard->GetCustom4(getter_Copies(str)); - SetCustom4(str); - srcCard->GetNotes(getter_Copies(str)); - SetNotes(str); - - PRUint32 tableID, rowID; - srcCardDB->GetDbTableID(&tableID); - SetDbTableID(tableID); - srcCardDB->GetDbRowID(&rowID); - SetDbRowID(rowID); - - return NS_OK; -} - NS_IMETHODIMP nsAbMDBCardProperty::EditCardToDatabase(const char *uri) { if (!mCardDatabase && uri)