Bug 214387 nsAddressBook.h:81: warning: `struct ExportAttributesTableStruct EXPORT_ATTRIBUTES_TABLE[53]' defined but not used

r=alecf sr=alecf
This commit is contained in:
timeless%mozdev.org 2003-11-10 15:44:47 +00:00
Родитель 3e47e5e2dc
Коммит 662b322cc7
2 изменённых файлов: 57 добавлений и 55 удалений

Просмотреть файл

@ -105,6 +105,61 @@
// see bugs bug #116692 and #118454
#define MOZ_AB_OBJECTCLASS "mozillaAbPersonObsolete"
const ExportAttributesTableStruct EXPORT_ATTRIBUTES_TABLE[EXPORT_ATTRIBUTES_TABLE_COUNT] = {
{kFirstNameColumn, "givenName", PR_TRUE},
{kLastNameColumn, "sn", PR_TRUE},
{kDisplayNameColumn, "cn", PR_TRUE},
{kNicknameColumn, "xmozillanickname", PR_TRUE},
{kPriEmailColumn, "mail", PR_TRUE},
{k2ndEmailColumn, MOZ_AB_LDIF_PREFIX "SecondEmail", PR_TRUE},
{kDefaultEmailColumn, MOZ_AB_LDIF_PREFIX "DefaultEmail", PR_FALSE},
{kCardTypeColumn, MOZ_AB_LDIF_PREFIX "CardType", PR_FALSE},
{kAimScreenNameColumn, MOZ_AB_LDIF_PREFIX "_AimScreenName", PR_FALSE},
{kPreferMailFormatColumn, "xmozillausehtmlmail", PR_FALSE},
{kLastModifiedDateColumn, "modifytimestamp", PR_FALSE},
{kWorkPhoneColumn, "telephoneNumber", PR_TRUE},
{kWorkPhoneTypeColumn, MOZ_AB_LDIF_PREFIX "WorkPhoneType", PR_FALSE},
{kHomePhoneColumn, "homePhone", PR_TRUE},
{kHomePhoneTypeColumn, MOZ_AB_LDIF_PREFIX "HomePhoneType", PR_FALSE},
{kFaxColumn, "facsimileTelephoneNumber", PR_TRUE},
{kFaxTypeColumn, MOZ_AB_LDIF_PREFIX "FaxNumberType", PR_FALSE},
{kPagerColumn, "pager", PR_TRUE},
{kPagerTypeColumn, MOZ_AB_LDIF_PREFIX "PagerNumberType", PR_FALSE},
{kCellularColumn, "mobile", PR_TRUE},
{kCellularTypeColumn, MOZ_AB_LDIF_PREFIX "CellularNumberType", PR_FALSE},
{kHomeAddressColumn, "homePostalAddress", PR_TRUE},
{kHomeAddress2Column, MOZ_AB_LDIF_PREFIX "HomePostalAddress2", PR_TRUE},
{kHomeCityColumn, MOZ_AB_LDIF_PREFIX "HomeLocalityName", PR_TRUE},
{kHomeStateColumn, MOZ_AB_LDIF_PREFIX "HomeState", PR_TRUE},
{kHomeZipCodeColumn, MOZ_AB_LDIF_PREFIX "HomePostalCode", PR_TRUE},
{kHomeCountryColumn, MOZ_AB_LDIF_PREFIX "HomeCountryName", PR_TRUE},
{kWorkAddressColumn, "postalAddress", PR_TRUE},
{kWorkAddress2Column, MOZ_AB_LDIF_PREFIX "PostalAddress2", PR_TRUE},
{kWorkCityColumn, "l", PR_TRUE},
{kWorkStateColumn, "st", PR_TRUE},
{kWorkZipCodeColumn, "postalCode", PR_TRUE},
{kWorkCountryColumn, "c", PR_TRUE},
{kJobTitleColumn, "title", PR_TRUE},
{kDepartmentColumn, "ou", PR_TRUE},
{kCompanyColumn, "o", PR_TRUE},
{kWebPage1Column, "workurl", PR_TRUE},
{kWebPage2Column, "homeurl", PR_TRUE},
{kBirthYearColumn, nsnull, PR_TRUE}, // unused for now
{kBirthMonthColumn, nsnull, PR_TRUE}, // unused for now
{kBirthDayColumn, nsnull, PR_TRUE}, // unused for now
{kCustom1Column, "custom1", PR_TRUE},
{kCustom2Column, "custom2", PR_TRUE},
{kCustom3Column, "custom3", PR_TRUE},
{kCustom4Column, "custom4", PR_TRUE},
{kNotesColumn, "description", PR_TRUE},
{kAnniversaryYearColumn, MOZ_AB_LDIF_PREFIX "AnniversaryYear", PR_FALSE},
{kAnniversaryMonthColumn, MOZ_AB_LDIF_PREFIX "AnniversaryMonth", PR_FALSE},
{kAnniversaryDayColumn, MOZ_AB_LDIF_PREFIX "AnniversaryDay", PR_FALSE},
{kSpouseNameColumn, MOZ_AB_LDIF_PREFIX "SpouseName", PR_FALSE},
{kFamilyNameColumn, MOZ_AB_LDIF_PREFIX "FamilyName", PR_FALSE},
{kDefaultAddressColumn, MOZ_AB_LDIF_PREFIX "DefaultAddress", PR_FALSE},
{kCategoryColumn, MOZ_AB_LDIF_PREFIX "Category", PR_FALSE},
};
//
// nsAddressBook

Просмотреть файл

@ -66,6 +66,8 @@ struct ExportAttributesTableStruct
PRBool includeForPlainText;
};
const extern ExportAttributesTableStruct EXPORT_ATTRIBUTES_TABLE[EXPORT_ATTRIBUTES_TABLE_COUNT];
// for now, the oder of the attributes with PR_TRUE for includeForPlainText
// should be in the same order as they are in the import code
// see importMsgProperties and nsImportStringBundle.
@ -79,61 +81,6 @@ struct ExportAttributesTableStruct
// as we want to allow export from mozilla back to 4.x, and other apps
// are probably out there that can handle 4.x LDIF)
// else use the MOZ_AB_LDIF_PREFIX prefix, see nsIAddrDatabase.idl
static ExportAttributesTableStruct EXPORT_ATTRIBUTES_TABLE[] = {
{kFirstNameColumn, "givenName", PR_TRUE},
{kLastNameColumn, "sn", PR_TRUE},
{kDisplayNameColumn, "cn", PR_TRUE},
{kNicknameColumn, "xmozillanickname", PR_TRUE},
{kPriEmailColumn, "mail", PR_TRUE},
{k2ndEmailColumn, MOZ_AB_LDIF_PREFIX "SecondEmail", PR_TRUE},
{kDefaultEmailColumn, MOZ_AB_LDIF_PREFIX "DefaultEmail", PR_FALSE},
{kCardTypeColumn, MOZ_AB_LDIF_PREFIX "CardType", PR_FALSE},
{kAimScreenNameColumn, MOZ_AB_LDIF_PREFIX "_AimScreenName", PR_FALSE},
{kPreferMailFormatColumn, "xmozillausehtmlmail", PR_FALSE},
{kLastModifiedDateColumn, "modifytimestamp", PR_FALSE},
{kWorkPhoneColumn, "telephoneNumber", PR_TRUE},
{kWorkPhoneTypeColumn, MOZ_AB_LDIF_PREFIX "WorkPhoneType", PR_FALSE},
{kHomePhoneColumn, "homePhone", PR_TRUE},
{kHomePhoneTypeColumn, MOZ_AB_LDIF_PREFIX "HomePhoneType", PR_FALSE},
{kFaxColumn, "facsimileTelephoneNumber", PR_TRUE},
{kFaxTypeColumn, MOZ_AB_LDIF_PREFIX "FaxNumberType", PR_FALSE},
{kPagerColumn, "pager", PR_TRUE},
{kPagerTypeColumn, MOZ_AB_LDIF_PREFIX "PagerNumberType", PR_FALSE},
{kCellularColumn, "mobile", PR_TRUE},
{kCellularTypeColumn, MOZ_AB_LDIF_PREFIX "CellularNumberType", PR_FALSE},
{kHomeAddressColumn, "homePostalAddress", PR_TRUE},
{kHomeAddress2Column, MOZ_AB_LDIF_PREFIX "HomePostalAddress2", PR_TRUE},
{kHomeCityColumn, MOZ_AB_LDIF_PREFIX "HomeLocalityName", PR_TRUE},
{kHomeStateColumn, MOZ_AB_LDIF_PREFIX "HomeState", PR_TRUE},
{kHomeZipCodeColumn, MOZ_AB_LDIF_PREFIX "HomePostalCode", PR_TRUE},
{kHomeCountryColumn, MOZ_AB_LDIF_PREFIX "HomeCountryName", PR_TRUE},
{kWorkAddressColumn, "postalAddress", PR_TRUE},
{kWorkAddress2Column, MOZ_AB_LDIF_PREFIX "PostalAddress2", PR_TRUE},
{kWorkCityColumn, "l", PR_TRUE},
{kWorkStateColumn, "st", PR_TRUE},
{kWorkZipCodeColumn, "postalCode", PR_TRUE},
{kWorkCountryColumn, "c", PR_TRUE},
{kJobTitleColumn, "title", PR_TRUE},
{kDepartmentColumn, "ou", PR_TRUE},
{kCompanyColumn, "o", PR_TRUE},
{kWebPage1Column, "workurl", PR_TRUE},
{kWebPage2Column, "homeurl", PR_TRUE},
{kBirthYearColumn, nsnull, PR_TRUE}, // unused for now
{kBirthMonthColumn, nsnull, PR_TRUE}, // unused for now
{kBirthDayColumn, nsnull, PR_TRUE}, // unused for now
{kCustom1Column, "custom1", PR_TRUE},
{kCustom2Column, "custom2", PR_TRUE},
{kCustom3Column, "custom3", PR_TRUE},
{kCustom4Column, "custom4", PR_TRUE},
{kNotesColumn, "description", PR_TRUE},
{kAnniversaryYearColumn, MOZ_AB_LDIF_PREFIX "AnniversaryYear", PR_FALSE},
{kAnniversaryMonthColumn, MOZ_AB_LDIF_PREFIX "AnniversaryMonth", PR_FALSE},
{kAnniversaryDayColumn, MOZ_AB_LDIF_PREFIX "AnniversaryDay", PR_FALSE},
{kSpouseNameColumn, MOZ_AB_LDIF_PREFIX "SpouseName", PR_FALSE},
{kFamilyNameColumn, MOZ_AB_LDIF_PREFIX "FamilyName", PR_FALSE},
{kDefaultAddressColumn, MOZ_AB_LDIF_PREFIX "DefaultAddress", PR_FALSE},
{kCategoryColumn, MOZ_AB_LDIF_PREFIX "Category", PR_FALSE},
};
class nsAddressBook : public nsIAddressBook, public nsICmdLineHandler, public nsIContentHandler
{