clean up the addressbook IDL
- use interCaps - don't use out parameters when they're not needed - fix JS to match (C++ signatures have not changed) patch contributed by the always generous Sammy Ford <fuzed@swbell.net> Thanks! r=alecf git-svn-id: svn://10.0.0.236/trunk@55271 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
6f390f3338
commit
2d679461dc
@ -33,69 +33,69 @@ interface nsIAddrDatabase;
|
|||||||
[scriptable, uuid(FA5C977F-04C8-11d3-A2EB-001083003D0C)]
|
[scriptable, uuid(FA5C977F-04C8-11d3-A2EB-001083003D0C)]
|
||||||
interface nsIAbCard : nsISupports {
|
interface nsIAbCard : nsISupports {
|
||||||
|
|
||||||
attribute wstring FirstName;
|
attribute wstring firstName;
|
||||||
attribute wstring LastName;
|
attribute wstring lastName;
|
||||||
attribute wstring DisplayName;
|
attribute wstring displayName;
|
||||||
attribute wstring NickName;
|
attribute wstring nickName;
|
||||||
attribute wstring PrimaryEmail;
|
attribute wstring primaryEmail;
|
||||||
attribute wstring SecondEmail;
|
attribute wstring secondEmail;
|
||||||
attribute wstring WorkPhone;
|
attribute wstring workPhone;
|
||||||
attribute wstring HomePhone;
|
attribute wstring homePhone;
|
||||||
attribute wstring FaxNumber;
|
attribute wstring faxNumber;
|
||||||
attribute wstring PagerNumber;
|
attribute wstring pagerNumber;
|
||||||
attribute wstring CellularNumber;
|
attribute wstring cellularNumber;
|
||||||
attribute wstring HomeAddress;
|
attribute wstring homeAddress;
|
||||||
attribute wstring HomeAddress2;
|
attribute wstring homeAddress2;
|
||||||
attribute wstring HomeCity;
|
attribute wstring homeCity;
|
||||||
attribute wstring HomeState;
|
attribute wstring homeState;
|
||||||
attribute wstring HomeZipCode;
|
attribute wstring homeZipCode;
|
||||||
attribute wstring HomeCountry;
|
attribute wstring homeCountry;
|
||||||
attribute wstring WorkAddress;
|
attribute wstring workAddress;
|
||||||
attribute wstring WorkAddress2;
|
attribute wstring workAddress2;
|
||||||
attribute wstring WorkCity;
|
attribute wstring workCity;
|
||||||
attribute wstring WorkState;
|
attribute wstring workState;
|
||||||
attribute wstring WorkZipCode;
|
attribute wstring workZipCode;
|
||||||
attribute wstring WorkCountry;
|
attribute wstring workCountry;
|
||||||
attribute wstring JobTitle;
|
attribute wstring jobTitle;
|
||||||
attribute wstring Department;
|
attribute wstring department;
|
||||||
attribute wstring Company;
|
attribute wstring company;
|
||||||
attribute wstring WebPage1;
|
attribute wstring webPage1;
|
||||||
attribute wstring WebPage2;
|
attribute wstring webPage2;
|
||||||
attribute wstring BirthYear;
|
attribute wstring birthYear;
|
||||||
attribute wstring BirthMonth;
|
attribute wstring birthMonth;
|
||||||
attribute wstring BirthDay;
|
attribute wstring birthDay;
|
||||||
attribute wstring Custom1;
|
attribute wstring custom1;
|
||||||
attribute wstring Custom2;
|
attribute wstring custom2;
|
||||||
attribute wstring Custom3;
|
attribute wstring custom3;
|
||||||
attribute wstring Custom4;
|
attribute wstring custom4;
|
||||||
attribute wstring Notes;
|
attribute wstring notes;
|
||||||
attribute unsigned long LastModifiedDate;
|
attribute unsigned long lastModifiedDate;
|
||||||
|
|
||||||
attribute boolean SendPlainText;
|
attribute boolean sendPlainText;
|
||||||
|
|
||||||
attribute unsigned long DbTableID;
|
attribute unsigned long dbTableID;
|
||||||
attribute unsigned long DbRowID;
|
attribute unsigned long dbRowID;
|
||||||
|
|
||||||
void GetCardValue(in string attrname, out wstring value);
|
wstring getCardValue(in string attrname);
|
||||||
void SetCardValue(in string attrname, in wstring value);
|
void setCardValue(in string attrname, in wstring value);
|
||||||
void SetAbDatabase(in nsIAddrDatabase database);
|
void setAbDatabase(in nsIAddrDatabase database);
|
||||||
|
|
||||||
[noscript] void GetAnonymousStrAttrubutesList(out nsVoidArray attrlist);
|
[noscript] readonly attribute nsVoidArray anonymousStrAttrubutesList;
|
||||||
[noscript] void GetAnonymousStrValuesList(out nsVoidArray valuelist);
|
[noscript] readonly attribute nsVoidArray anonymousStrValuesList;
|
||||||
[noscript] void GetAnonymousIntAttrubutesList(out nsVoidArray attrlist);
|
[noscript] readonly attribute nsVoidArray anonymousIntAttrubutesList;
|
||||||
[noscript] void GetAnonymousIntValuesList(out nsVoidArray valuelist);
|
[noscript] readonly attribute nsVoidArray anonymousIntValuesList;
|
||||||
[noscript] void GetAnonymousBoolAttrubutesList(out nsVoidArray attrlist);
|
[noscript] readonly attribute nsVoidArray anonymousBoolAttrubutesList;
|
||||||
[noscript] void GetAnonymousBoolValuesList(out nsVoidArray valuelist);
|
[noscript] readonly attribute nsVoidArray anonymousBoolValuesList;
|
||||||
|
|
||||||
void SetAnonymousStringAttribute(in string attrname, in string value);
|
void setAnonymousStringAttribute(in string attrname, in string value);
|
||||||
void SetAnonymousIntAttribute(in string attrname, in unsigned long value);
|
void setAnonymousIntAttribute(in string attrname, in unsigned long value);
|
||||||
void SetAnonymousBoolAttribute(in string attrname, in boolean value);
|
void setAnonymousBoolAttribute(in string attrname, in boolean value);
|
||||||
void AddAnonymousAttributesToDB();
|
void addAnonymousAttributesToDB();
|
||||||
void EditAnonymousAttributesInDB();
|
void editAnonymousAttributesInDB();
|
||||||
|
|
||||||
void GetCardURI(out string uri);
|
readonly attribute string cardURI;
|
||||||
void AddCardToDatabase(in string uri);
|
void addCardToDatabase(in string uri);
|
||||||
void EditCardToDatabase(in string uri);
|
void editCardToDatabase(in string uri);
|
||||||
void CopyCard(in nsIAbCard srcCard);
|
void copyCard(in nsIAbCard srcCard);
|
||||||
void GetCollationKey(in wstring str, out wstring key);
|
wstring getCollationKey(in wstring str);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -35,21 +35,21 @@
|
|||||||
[scriptable, uuid(1920E485-0709-11d3-A2EC-001083003D0C)]
|
[scriptable, uuid(1920E485-0709-11d3-A2EC-001083003D0C)]
|
||||||
interface nsIAbDirectory : nsISupports {
|
interface nsIAbDirectory : nsISupports {
|
||||||
|
|
||||||
attribute wstring DirName;
|
attribute wstring dirName;
|
||||||
attribute unsigned long LastModifiedDate;
|
attribute unsigned long lastModifiedDate;
|
||||||
attribute DIR_Server server;
|
attribute DIR_Server server;
|
||||||
|
|
||||||
void GetDirFilePath(out string dbPath);
|
readonly attribute string dirFilePath;
|
||||||
void GetChildNodes(out nsIEnumerator childList);
|
readonly attribute nsIEnumerator childNodes;
|
||||||
void GetChildCards(out nsIEnumerator childCards);
|
readonly attribute nsIEnumerator childCards;
|
||||||
void AddChildCards(in string uriName, out nsIAbCard childCard);
|
nsIAbCard addChildCards(in string uriName);
|
||||||
void AddDirectory(in string uriName, out nsIAbDirectory childDir);
|
nsIAbDirectory addDirectory(in string uriName);
|
||||||
void DeleteDirectories(in nsISupportsArray dierctories);
|
void deleteDirectories(in nsISupportsArray dierctories);
|
||||||
void DeleteCards(in nsISupportsArray cards);
|
void deleteCards(in nsISupportsArray cards);
|
||||||
void HasCard(in nsIAbCard cards, out boolean hasCard);
|
boolean hasCard(in nsIAbCard cards);
|
||||||
void HasDirectory(in nsIAbDirectory dir, out boolean hasDir);
|
boolean hasDirectory(in nsIAbDirectory dir);
|
||||||
void GetMailingList(out nsIEnumerator mailingList);
|
readonly attribute nsIEnumerator mailingList;
|
||||||
void CreateNewDirectory(in wstring dirName, in string fileName);
|
void createNewDirectory(in wstring dirName, in string fileName);
|
||||||
void GetDirUri(out string uri);
|
string getDirUri();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -26,8 +26,8 @@
|
|||||||
[scriptable, uuid(1920E484-0709-11d3-A2EC-001083003D0C)]
|
[scriptable, uuid(1920E484-0709-11d3-A2EC-001083003D0C)]
|
||||||
interface nsIAbListener : nsISupports {
|
interface nsIAbListener : nsISupports {
|
||||||
|
|
||||||
void OnItemAdded(in nsISupports parentDir, in nsISupports item);
|
void onItemAdded(in nsISupports parentDir, in nsISupports item);
|
||||||
void OnItemRemoved(in nsISupports parentDir, in nsISupports item);
|
void onItemRemoved(in nsISupports parentDir, in nsISupports item);
|
||||||
void OnItemPropertyChanged(in nsISupports item, in string property, in wstring oldValue, in wstring newValue);
|
void onItemPropertyChanged(in nsISupports item, in string property, in wstring oldValue, in wstring newValue);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -39,15 +39,15 @@
|
|||||||
[scriptable, uuid(C5339441-303F-11d3-9E13-00A0C92B5F0D)]
|
[scriptable, uuid(C5339441-303F-11d3-9E13-00A0C92B5F0D)]
|
||||||
interface nsIAddrBookSession : nsISupports {
|
interface nsIAddrBookSession : nsISupports {
|
||||||
|
|
||||||
void AddAddressBookListener(in nsIAbListener listener);
|
void addAddressBookListener(in nsIAbListener listener);
|
||||||
void RemoveAddressBookListener(in nsIAbListener listener);
|
void removeAddressBookListener(in nsIAbListener listener);
|
||||||
void NotifyItemPropertyChanged(in nsISupports item,
|
void notifyItemPropertyChanged(in nsISupports item,
|
||||||
in string property,
|
in string property,
|
||||||
in wstring oldValue,
|
in wstring oldValue,
|
||||||
in wstring newValue);
|
in wstring newValue);
|
||||||
void NotifyDirectoryItemAdded(in nsIAbDirectory directory, in nsISupports item);
|
void notifyDirectoryItemAdded(in nsIAbDirectory directory, in nsISupports item);
|
||||||
void NotifyDirectoryItemDeleted(in nsIAbDirectory directory, in nsISupports item);
|
void notifyDirectoryItemDeleted(in nsIAbDirectory directory, in nsISupports item);
|
||||||
|
|
||||||
[noscript] void GetUserProfileDirectory(out nsFileSpec userDir);
|
[noscript] readonly attribute nsFileSpec userProfileDirectory;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -28,14 +28,14 @@ interface nsIAddrDBListener;
|
|||||||
[scriptable, uuid(A4186D8A-1DD0-11d3-A303-001083003D0C)]
|
[scriptable, uuid(A4186D8A-1DD0-11d3-A303-001083003D0C)]
|
||||||
interface nsIAddrDBAnnouncer : nsISupports {
|
interface nsIAddrDBAnnouncer : nsISupports {
|
||||||
|
|
||||||
void AddListener(in nsIAddrDBListener listener);
|
void addListener(in nsIAddrDBListener listener);
|
||||||
void RemoveListener(in nsIAddrDBListener listener);
|
void removeListener(in nsIAddrDBListener listener);
|
||||||
|
|
||||||
void NotifyCardAttribChange(in unsigned long abCode,
|
void notifyCardAttribChange(in unsigned long abCode,
|
||||||
in nsIAddrDBListener instigator);
|
in nsIAddrDBListener instigator);
|
||||||
void NotifyCardEntryChange (in unsigned long abCode,
|
void notifyCardEntryChange (in unsigned long abCode,
|
||||||
in nsIAbCard card,
|
in nsIAbCard card,
|
||||||
in nsIAddrDBListener instigator);
|
in nsIAddrDBListener instigator);
|
||||||
|
|
||||||
void NotifyAnnouncerGoingAway();
|
void notifyAnnouncerGoingAway();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -27,10 +27,11 @@ interface nsIAddrDBAnnouncer;
|
|||||||
[scriptable, uuid(A4186D89-1DD0-11d3-A303-001083003D0C)]
|
[scriptable, uuid(A4186D89-1DD0-11d3-A303-001083003D0C)]
|
||||||
interface nsIAddrDBListener : nsISupports {
|
interface nsIAddrDBListener : nsISupports {
|
||||||
|
|
||||||
void OnCardAttribChange(in unsigned long abCode,
|
void onCardAttribChange(in unsigned long abCode,
|
||||||
in nsIAddrDBListener instigator);
|
in nsIAddrDBListener instigator);
|
||||||
void OnCardEntryChange (in unsigned long abCode,
|
void onCardEntryChange (in unsigned long abCode,
|
||||||
in nsIAbCard card,
|
in nsIAbCard card,
|
||||||
in nsIAddrDBListener instigator);
|
in nsIAddrDBListener instigator);
|
||||||
void OnAnnouncerGoingAway(in nsIAddrDBAnnouncer instigator);
|
void onAnnouncerGoingAway(in nsIAddrDBAnnouncer instigator);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -38,76 +38,75 @@
|
|||||||
interface nsIAddrDatabase : nsIAddrDBAnnouncer {
|
interface nsIAddrDatabase : nsIAddrDBAnnouncer {
|
||||||
|
|
||||||
attribute nsFileSpec dbPath;
|
attribute nsFileSpec dbPath;
|
||||||
|
[noscript] void open(in nsFileSpec folderName, in boolean create,
|
||||||
|
out nsIAddrDatabase pCardDB, in boolean upgrading);
|
||||||
|
void close(in boolean forceCommit);
|
||||||
|
[noscript] void openMDB(in nsFileSpec dbName, in boolean create);
|
||||||
|
void closeMDB(in boolean commit);
|
||||||
|
void openAnonymousDB(out nsIAddrDatabase pCardDB);
|
||||||
|
void closeAnonymousDB(in boolean forceCommit);
|
||||||
|
|
||||||
[noscript] void Open(in nsFileSpec folderName, in boolean create,
|
void commit(in unsigned long commitType);
|
||||||
out nsIAddrDatabase pCardDB, in boolean upgrading);
|
void forceClosed();
|
||||||
void Close(in boolean forceCommit);
|
|
||||||
[noscript] void OpenMDB(in nsFileSpec dbName, in boolean create);
|
|
||||||
void CloseMDB(in boolean commit);
|
|
||||||
void OpenAnonymousDB(out nsIAddrDatabase pCardDB);
|
|
||||||
void CloseAnonymousDB(in boolean forceCommit);
|
|
||||||
|
|
||||||
void Commit(in unsigned long commitType);
|
void createNewCardAndAddToDB(in nsIAbCard newCard, in boolean beNotify);
|
||||||
void ForceClosed();
|
nsIEnumerator enumerateCards(in nsIAbDirectory directory);
|
||||||
|
nsIEnumerator enumerateMailingLists(in nsIAbDirectory directory);
|
||||||
|
void deleteCard(in nsIAbCard card, in boolean beNotify);
|
||||||
|
void editCard(in nsIAbCard card, in boolean beNotify);
|
||||||
|
boolean containsCard(in nsIAbCard card);
|
||||||
|
|
||||||
void CreateNewCardAndAddToDB(in nsIAbCard newCard, in boolean beNotify);
|
nsIAbCard getCardForEmailAddress(in nsIAbDirectory directory, in string emailAddress);
|
||||||
void EnumerateCards(in nsIAbDirectory directory, out nsIEnumerator result);
|
|
||||||
void EnumerateMailingLists(in nsIAbDirectory directory, out nsIEnumerator result);
|
|
||||||
void DeleteCard(in nsIAbCard card, in boolean beNotify);
|
|
||||||
void EditCard(in nsIAbCard card, in boolean beNotify);
|
|
||||||
void ContainsCard(in nsIAbCard card, out boolean hasCard);
|
|
||||||
|
|
||||||
void GetCardForEmailAddress(in nsIAbDirectory directory, in string emailAddress, out nsIAbCard card);
|
void setAnonymousStringAttribute(in string attrname, in string value);
|
||||||
|
string getAnonymousStringAttribute(in string attrname);
|
||||||
|
void setAnonymousIntAttribute(in string attrname, in unsigned long value);
|
||||||
|
unsigned long getAnonymousIntAttribute(in string attrname);
|
||||||
|
void setAnonymousBoolAttribute(in string attrname, in boolean value);
|
||||||
|
boolean getAnonymousBoolAttribute(in string attrname);
|
||||||
|
void addAnonymousAttributesToDB();
|
||||||
|
void removeAnonymousAttributesFromDB();
|
||||||
|
void editAnonymousAttributesInDB();
|
||||||
|
void addAnonymousAttributesFromCard(in nsIAbCard card);
|
||||||
|
void removeAnonymousAttributesFromCard(in nsIAbCard card);
|
||||||
|
void editAnonymousAttributesFromCard(in nsIAbCard card);
|
||||||
|
|
||||||
void SetAnonymousStringAttribute(in string attrname, in string value);
|
[noscript] readonly attribute nsIMdbRow newRow;
|
||||||
void GetAnonymousStringAttribute(in string attrname, out string value);
|
[noscript] void addCardRowToDB(in nsIMdbRow newRow);
|
||||||
void SetAnonymousIntAttribute(in string attrname, in unsigned long value);
|
[noscript] void addFirstName(in nsIMdbRow row, in string value);
|
||||||
void GetAnonymousIntAttribute(in string attrname, out unsigned long value);
|
[noscript] void addLastName(in nsIMdbRow row, in string value);
|
||||||
void SetAnonymousBoolAttribute(in string attrname, in boolean value);
|
[noscript] void addDisplayName(in nsIMdbRow row, in string value);
|
||||||
void GetAnonymousBoolAttribute(in string attrname, out boolean value);
|
[noscript] void addNickName(in nsIMdbRow row, in string value);
|
||||||
void AddAnonymousAttributesToDB();
|
[noscript] void addPrimaryEmail(in nsIMdbRow row, in string value);
|
||||||
void RemoveAnonymousAttributesFromDB();
|
[noscript] void add2ndEmail(in nsIMdbRow row, in string value);
|
||||||
void EditAnonymousAttributesInDB();
|
[noscript] void addWorkPhone(in nsIMdbRow row, in string value);
|
||||||
void AddAnonymousAttributesFromCard(in nsIAbCard card);
|
[noscript] void addHomePhone(in nsIMdbRow row, in string value);
|
||||||
void RemoveAnonymousAttributesFromCard(in nsIAbCard card);
|
[noscript] void addFaxNumber(in nsIMdbRow row, in string value);
|
||||||
void EditAnonymousAttributesFromCard(in nsIAbCard card);
|
[noscript] void addPagerNumber(in nsIMdbRow row, in string value);
|
||||||
|
[noscript] void addCellularNumber(in nsIMdbRow row, in string value);
|
||||||
[noscript] void GetNewRow(out nsIMdbRow newRow);
|
[noscript] void addHomeAddress(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddCardRowToDB(in nsIMdbRow newRow);
|
[noscript] void addHomeAddress2(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddFirstName(in nsIMdbRow row, in string value);
|
[noscript] void addHomeCity(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddLastName(in nsIMdbRow row, in string value);
|
[noscript] void addHomeState(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddDisplayName(in nsIMdbRow row, in string value);
|
[noscript] void addHomeZipCode(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddNickName(in nsIMdbRow row, in string value);
|
[noscript] void addHomeCountry(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddPrimaryEmail(in nsIMdbRow row, in string value);
|
[noscript] void addWorkAddress(in nsIMdbRow row, in string value);
|
||||||
[noscript] void Add2ndEmail(in nsIMdbRow row, in string value);
|
[noscript] void addWorkAddress2(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddWorkPhone(in nsIMdbRow row, in string value);
|
[noscript] void addWorkCity(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddHomePhone(in nsIMdbRow row, in string value);
|
[noscript] void addWorkState(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddFaxNumber(in nsIMdbRow row, in string value);
|
[noscript] void addWorkZipCode(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddPagerNumber(in nsIMdbRow row, in string value);
|
[noscript] void addWorkCountry(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddCellularNumber(in nsIMdbRow row, in string value);
|
[noscript] void addJobTitle(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddHomeAddress(in nsIMdbRow row, in string value);
|
[noscript] void addDepartment(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddHomeAddress2(in nsIMdbRow row, in string value);
|
[noscript] void addCompany(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddHomeCity(in nsIMdbRow row, in string value);
|
[noscript] void addWebPage1(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddHomeState(in nsIMdbRow row, in string value);
|
[noscript] void addWebPage2(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddHomeZipCode(in nsIMdbRow row, in string value);
|
[noscript] void addBirthYear(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddHomeCountry(in nsIMdbRow row, in string value);
|
[noscript] void addBirthMonth(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddWorkAddress(in nsIMdbRow row, in string value);
|
[noscript] void addBirthDay(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddWorkAddress2(in nsIMdbRow row, in string value);
|
[noscript] void addCustom1(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddWorkCity(in nsIMdbRow row, in string value);
|
[noscript] void addCustom2(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddWorkState(in nsIMdbRow row, in string value);
|
[noscript] void addCustom3(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddWorkZipCode(in nsIMdbRow row, in string value);
|
[noscript] void addCustom4(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddWorkCountry(in nsIMdbRow row, in string value);
|
[noscript] void addNotes(in nsIMdbRow row, in string value);
|
||||||
[noscript] void AddJobTitle(in nsIMdbRow row, in string value);
|
|
||||||
[noscript] void AddDepartment(in nsIMdbRow row, in string value);
|
|
||||||
[noscript] void AddCompany(in nsIMdbRow row, in string value);
|
|
||||||
[noscript] void AddWebPage1(in nsIMdbRow row, in string value);
|
|
||||||
[noscript] void AddWebPage2(in nsIMdbRow row, in string value);
|
|
||||||
[noscript] void AddBirthYear(in nsIMdbRow row, in string value);
|
|
||||||
[noscript] void AddBirthMonth(in nsIMdbRow row, in string value);
|
|
||||||
[noscript] void AddBirthDay(in nsIMdbRow row, in string value);
|
|
||||||
[noscript] void AddCustom1(in nsIMdbRow row, in string value);
|
|
||||||
[noscript] void AddCustom2(in nsIMdbRow row, in string value);
|
|
||||||
[noscript] void AddCustom3(in nsIMdbRow row, in string value);
|
|
||||||
[noscript] void AddCustom4(in nsIMdbRow row, in string value);
|
|
||||||
[noscript] void AddNotes(in nsIMdbRow row, in string value);
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -36,12 +36,12 @@ interface nsIDOMWindow;
|
|||||||
[scriptable, uuid(D60B84F1-2A8C-11d3-9E07-00A0C92B5F0D)]
|
[scriptable, uuid(D60B84F1-2A8C-11d3-9E07-00A0C92B5F0D)]
|
||||||
interface nsIAddressBook : nsISupports {
|
interface nsIAddressBook : nsISupports {
|
||||||
|
|
||||||
void DeleteCards(in nsIDOMXULElement tree, in nsIDOMXULElement srcDir, in nsIDOMNodeList node);
|
void deleteCards(in nsIDOMXULElement tree, in nsIDOMXULElement srcDir, in nsIDOMNodeList node);
|
||||||
void NewAddressBook(in nsIRDFCompositeDataSource db, in nsIDOMXULElement srcDir, in wstring name);
|
void newAddressBook(in nsIRDFCompositeDataSource db, in nsIDOMXULElement srcDir, in wstring name);
|
||||||
void DeleteAddressBooks(in nsIRDFCompositeDataSource db, in nsIDOMXULElement srcDir, in nsIDOMNodeList node);
|
void deleteAddressBooks(in nsIRDFCompositeDataSource db, in nsIDOMXULElement srcDir, in nsIDOMNodeList node);
|
||||||
void PrintCard();
|
void printCard();
|
||||||
void PrintAddressbook();
|
void printAddressbook();
|
||||||
void SetWebShellWindow(in nsIDOMWindow win);
|
void setWebShellWindow(in nsIDOMWindow win);
|
||||||
void ImportAddressBook();
|
void importAddressBook();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,6 @@
|
|||||||
|
|
||||||
[scriptable, uuid(CA2A6B08-3625-11d3-988E-001083010E9B)]
|
[scriptable, uuid(CA2A6B08-3625-11d3-988E-001083010E9B)]
|
||||||
interface nsIAutoCompleteListener : nsISupports {
|
interface nsIAutoCompleteListener : nsISupports {
|
||||||
void OnAutoCompleteResult(in nsISupports aParam, in wstring aOriginalString, in wstring aMatch);
|
void onAutoCompleteResult(in nsISupports aParam, in wstring aOriginalString, in wstring aMatch);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -27,6 +27,6 @@ interface nsIAutoCompleteListener;
|
|||||||
|
|
||||||
[scriptable, uuid(CA2A6B07-3625-11d3-988E-001083010E9B)]
|
[scriptable, uuid(CA2A6B07-3625-11d3-988E-001083010E9B)]
|
||||||
interface nsIAutoCompleteSession : nsISupports {
|
interface nsIAutoCompleteSession : nsISupports {
|
||||||
void AutoComplete(in nsISupports aParam, in wstring aSearchString, in nsIAutoCompleteListener aResultListener);
|
void autoComplete(in nsISupports aParam, in wstring aSearchString, in nsIAutoCompleteListener aResultListener);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -135,7 +135,7 @@ function EditCardOKButton()
|
|||||||
{
|
{
|
||||||
SetCardValues(editCard.card, document);
|
SetCardValues(editCard.card, document);
|
||||||
|
|
||||||
editCard.card.EditCardToDatabase(editCard.abURI);
|
editCard.card.editCardToDatabase(editCard.abURI);
|
||||||
|
|
||||||
// callback to allow caller to update
|
// callback to allow caller to update
|
||||||
if ( editCard.okCallback )
|
if ( editCard.okCallback )
|
||||||
@ -150,45 +150,45 @@ function GetCardValues(cardproperty, doc)
|
|||||||
{
|
{
|
||||||
if ( cardproperty )
|
if ( cardproperty )
|
||||||
{
|
{
|
||||||
doc.getElementById('FirstName').value = cardproperty.FirstName;
|
doc.getElementById('FirstName').value = cardproperty.firstName;
|
||||||
doc.getElementById('LastName').value = cardproperty.LastName;
|
doc.getElementById('LastName').value = cardproperty.lastName;
|
||||||
doc.getElementById('DisplayName').value = cardproperty.DisplayName;
|
doc.getElementById('DisplayName').value = cardproperty.displayName;
|
||||||
doc.getElementById('NickName').value = cardproperty.NickName;
|
doc.getElementById('NickName').value = cardproperty.nickName;
|
||||||
|
|
||||||
doc.getElementById('PrimaryEmail').value = cardproperty.PrimaryEmail;
|
doc.getElementById('PrimaryEmail').value = cardproperty.primaryEmail;
|
||||||
doc.getElementById('SecondEmail').value = cardproperty.SecondEmail;
|
doc.getElementById('SecondEmail').value = cardproperty.secondEmail;
|
||||||
//doc.getElementById('SendPlainText').value = cardproperty.SendPlainText;
|
//doc.getElementById('SendPlainText').value = cardproperty.sendPlainText;
|
||||||
|
|
||||||
doc.getElementById('WorkPhone').value = cardproperty.WorkPhone;
|
doc.getElementById('WorkPhone').value = cardproperty.workPhone;
|
||||||
doc.getElementById('HomePhone').value = cardproperty.HomePhone;
|
doc.getElementById('HomePhone').value = cardproperty.homePhone;
|
||||||
doc.getElementById('FaxNumber').value = cardproperty.FaxNumber;
|
doc.getElementById('FaxNumber').value = cardproperty.faxNumber;
|
||||||
doc.getElementById('PagerNumber').value = cardproperty.PagerNumber;
|
doc.getElementById('PagerNumber').value = cardproperty.pagerNumber;
|
||||||
doc.getElementById('CellularNumber').value = cardproperty.CellularNumber;
|
doc.getElementById('CellularNumber').value = cardproperty.cellularNumber;
|
||||||
|
|
||||||
doc.getElementById('HomeAddress').value = cardproperty.HomeAddress;
|
doc.getElementById('HomeAddress').value = cardproperty.homeAddress;
|
||||||
doc.getElementById('HomeAddress2').value = cardproperty.HomeAddress2;
|
doc.getElementById('HomeAddress2').value = cardproperty.homeAddress2;
|
||||||
doc.getElementById('HomeCity').value = cardproperty.HomeCity;
|
doc.getElementById('HomeCity').value = cardproperty.homeCity;
|
||||||
doc.getElementById('HomeState').value = cardproperty.HomeState;
|
doc.getElementById('HomeState').value = cardproperty.homeState;
|
||||||
doc.getElementById('HomeZipCode').value = cardproperty.HomeZipCode;
|
doc.getElementById('HomeZipCode').value = cardproperty.homeZipCode;
|
||||||
doc.getElementById('HomeCountry').value = cardproperty.HomeCountry;
|
doc.getElementById('HomeCountry').value = cardproperty.homeCountry;
|
||||||
|
|
||||||
doc.getElementById('JobTitle').value = cardproperty.JobTitle;
|
doc.getElementById('JobTitle').value = cardproperty.jobTitle;
|
||||||
doc.getElementById('Department').value = cardproperty.Department;
|
doc.getElementById('Department').value = cardproperty.department;
|
||||||
doc.getElementById('Company').value = cardproperty.Company;
|
doc.getElementById('Company').value = cardproperty.company;
|
||||||
doc.getElementById('WorkAddress').value = cardproperty.WorkAddress;
|
doc.getElementById('WorkAddress').value = cardproperty.workAddress;
|
||||||
doc.getElementById('WorkAddress2').value = cardproperty.WorkAddress2;
|
doc.getElementById('WorkAddress2').value = cardproperty.workAddress2;
|
||||||
doc.getElementById('WorkCity').value = cardproperty.WorkCity;
|
doc.getElementById('WorkCity').value = cardproperty.workCity;
|
||||||
doc.getElementById('WorkState').value = cardproperty.WorkState;
|
doc.getElementById('WorkState').value = cardproperty.workState;
|
||||||
doc.getElementById('WorkZipCode').value = cardproperty.WorkZipCode;
|
doc.getElementById('WorkZipCode').value = cardproperty.workZipCode;
|
||||||
doc.getElementById('WorkCountry').value = cardproperty.WorkCountry;
|
doc.getElementById('WorkCountry').value = cardproperty.workCountry;
|
||||||
|
|
||||||
doc.getElementById('WebPage1').value = cardproperty.WebPage1;
|
doc.getElementById('WebPage1').value = cardproperty.webPage1;
|
||||||
|
|
||||||
doc.getElementById('Custom1').value = cardproperty.Custom1;
|
doc.getElementById('Custom1').value = cardproperty.custom1;
|
||||||
doc.getElementById('Custom2').value = cardproperty.Custom2;
|
doc.getElementById('Custom2').value = cardproperty.custom2;
|
||||||
doc.getElementById('Custom3').value = cardproperty.Custom3;
|
doc.getElementById('Custom3').value = cardproperty.custom3;
|
||||||
doc.getElementById('Custom4').value = cardproperty.Custom4;
|
doc.getElementById('Custom4').value = cardproperty.custom4;
|
||||||
doc.getElementById('Notes').value = cardproperty.Notes;
|
doc.getElementById('Notes').value = cardproperty.notes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,45 +198,45 @@ function SetCardValues(cardproperty, doc)
|
|||||||
{
|
{
|
||||||
if (cardproperty)
|
if (cardproperty)
|
||||||
{
|
{
|
||||||
cardproperty.FirstName = doc.getElementById('FirstName').value;
|
cardproperty.firstName = doc.getElementById('FirstName').value;
|
||||||
cardproperty.LastName = doc.getElementById('LastName').value;
|
cardproperty.lastName = doc.getElementById('LastName').value;
|
||||||
cardproperty.DisplayName = doc.getElementById('DisplayName').value;
|
cardproperty.displayName = doc.getElementById('DisplayName').value;
|
||||||
cardproperty.NickName = doc.getElementById('NickName').value;
|
cardproperty.nickName = doc.getElementById('NickName').value;
|
||||||
|
|
||||||
cardproperty.PrimaryEmail = doc.getElementById('PrimaryEmail').value;
|
cardproperty.primaryEmail = doc.getElementById('PrimaryEmail').value;
|
||||||
cardproperty.SecondEmail = doc.getElementById('SecondEmail').value;
|
cardproperty.secondEmail = doc.getElementById('SecondEmail').value;
|
||||||
//cardproperty.SendPlainText = doc.getElementById('SendPlainText').value;
|
//cardproperty.SendPlainText = doc.getElementById('SendPlainText').value;
|
||||||
|
|
||||||
cardproperty.WorkPhone = doc.getElementById('WorkPhone').value;
|
cardproperty.workPhone = doc.getElementById('WorkPhone').value;
|
||||||
cardproperty.HomePhone = doc.getElementById('HomePhone').value;
|
cardproperty.homePhone = doc.getElementById('HomePhone').value;
|
||||||
cardproperty.FaxNumber = doc.getElementById('FaxNumber').value;
|
cardproperty.faxNumber = doc.getElementById('FaxNumber').value;
|
||||||
cardproperty.PagerNumber = doc.getElementById('PagerNumber').value;
|
cardproperty.pagerNumber = doc.getElementById('PagerNumber').value;
|
||||||
cardproperty.CellularNumber = doc.getElementById('CellularNumber').value;
|
cardproperty.cellularNumber = doc.getElementById('CellularNumber').value;
|
||||||
|
|
||||||
cardproperty.HomeAddress = doc.getElementById('HomeAddress').value;
|
cardproperty.homeAddress = doc.getElementById('HomeAddress').value;
|
||||||
cardproperty.HomeAddress2 = doc.getElementById('HomeAddress2').value;
|
cardproperty.homeAddress2 = doc.getElementById('HomeAddress2').value;
|
||||||
cardproperty.HomeCity = doc.getElementById('HomeCity').value;
|
cardproperty.homeCity = doc.getElementById('HomeCity').value;
|
||||||
cardproperty.HomeState = doc.getElementById('HomeState').value;
|
cardproperty.homeState = doc.getElementById('HomeState').value;
|
||||||
cardproperty.HomeZipCode = doc.getElementById('HomeZipCode').value;
|
cardproperty.homeZipCode = doc.getElementById('HomeZipCode').value;
|
||||||
cardproperty.HomeCountry = doc.getElementById('HomeCountry').value;
|
cardproperty.homeCountry = doc.getElementById('HomeCountry').value;
|
||||||
|
|
||||||
cardproperty.JobTitle = doc.getElementById('JobTitle').value;
|
cardproperty.jobTitle = doc.getElementById('JobTitle').value;
|
||||||
cardproperty.Department = doc.getElementById('Department').value;
|
cardproperty.department = doc.getElementById('Department').value;
|
||||||
cardproperty.Company = doc.getElementById('Company').value;
|
cardproperty.company = doc.getElementById('Company').value;
|
||||||
cardproperty.WorkAddress = doc.getElementById('WorkAddress').value;
|
cardproperty.workAddress = doc.getElementById('WorkAddress').value;
|
||||||
cardproperty.WorkAddress2 = doc.getElementById('WorkAddress2').value;
|
cardproperty.workAddress2 = doc.getElementById('WorkAddress2').value;
|
||||||
cardproperty.WorkCity = doc.getElementById('WorkCity').value;
|
cardproperty.workCity = doc.getElementById('WorkCity').value;
|
||||||
cardproperty.WorkState = doc.getElementById('WorkState').value;
|
cardproperty.workState = doc.getElementById('WorkState').value;
|
||||||
cardproperty.WorkZipCode = doc.getElementById('WorkZipCode').value;
|
cardproperty.workZipCode = doc.getElementById('WorkZipCode').value;
|
||||||
cardproperty.WorkCountry = doc.getElementById('WorkCountry').value;
|
cardproperty.workCountry = doc.getElementById('WorkCountry').value;
|
||||||
|
|
||||||
cardproperty.WebPage1 = doc.getElementById('WebPage1').value;
|
cardproperty.webPage1 = doc.getElementById('WebPage1').value;
|
||||||
|
|
||||||
cardproperty.Custom1 = doc.getElementById('Custom1').value;
|
cardproperty.custom1 = doc.getElementById('Custom1').value;
|
||||||
cardproperty.Custom2 = doc.getElementById('Custom2').value;
|
cardproperty.custom2 = doc.getElementById('Custom2').value;
|
||||||
cardproperty.Custom3 = doc.getElementById('Custom3').value;
|
cardproperty.custom3 = doc.getElementById('Custom3').value;
|
||||||
cardproperty.Custom4 = doc.getElementById('Custom4').value;
|
cardproperty.custom4 = doc.getElementById('Custom4').value;
|
||||||
cardproperty.Notes = doc.getElementById('Notes').value;
|
cardproperty.notes = doc.getElementById('Notes').value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ var ResultsPaneController =
|
|||||||
if ( resultsTree )
|
if ( resultsTree )
|
||||||
{
|
{
|
||||||
var cardList = resultsTree.selectedItems;
|
var cardList = resultsTree.selectedItems;
|
||||||
top.addressbook.DeleteCards(resultsTree, resultsTree, cardList);
|
top.addressbook.deleteCards(resultsTree, resultsTree, cardList);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -136,7 +136,7 @@ var DirPaneController =
|
|||||||
case "cmd_delete":
|
case "cmd_delete":
|
||||||
case "button_delete":
|
case "button_delete":
|
||||||
if ( dirTree )
|
if ( dirTree )
|
||||||
top.addressbook.DeleteAddressBooks(dirTree.database, dirTree, dirTree.selectedItems);
|
top.addressbook.deleteAddressBooks(dirTree.database, dirTree, dirTree.selectedItems);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -3,6 +3,7 @@ var gUpdateCardView = 0;
|
|||||||
|
|
||||||
function OnLoadAddressBook()
|
function OnLoadAddressBook()
|
||||||
{
|
{
|
||||||
|
|
||||||
top.addressbook = Components.classes["component://netscape/addressbook"].createInstance();
|
top.addressbook = Components.classes["component://netscape/addressbook"].createInstance();
|
||||||
top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook);
|
top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook);
|
||||||
top.gUpdateCardView = UpdateCardView;
|
top.gUpdateCardView = UpdateCardView;
|
||||||
@ -80,7 +81,7 @@ function AbPrintCard()
|
|||||||
{
|
{
|
||||||
dump("print card\n");
|
dump("print card\n");
|
||||||
try {
|
try {
|
||||||
addressbook.PrintCard();
|
addressbook.printCard();
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
dump("failed to print card\n");
|
dump("failed to print card\n");
|
||||||
@ -100,7 +101,7 @@ function AbPrintAddressBook()
|
|||||||
|
|
||||||
function AbImport()
|
function AbImport()
|
||||||
{
|
{
|
||||||
addressbook.ImportAddressBook();
|
addressbook.importAddressBook();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -115,7 +116,7 @@ function AbDelete()
|
|||||||
//get the current folder
|
//get the current folder
|
||||||
var srcDirectory = document.getElementById('resultsTree');
|
var srcDirectory = document.getElementById('resultsTree');
|
||||||
dump("srcDirectory = " + srcDirectory + "\n");
|
dump("srcDirectory = " + srcDirectory + "\n");
|
||||||
top.addressbook.DeleteCards(tree, srcDirectory, cardList);
|
top.addressbook.deleteCards(tree, srcDirectory, cardList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
@ -128,7 +129,7 @@ function AbDeleteDirectory()
|
|||||||
|
|
||||||
// if ( tree && tree.selectedItems && tree.selectedItems.length )
|
// if ( tree && tree.selectedItems && tree.selectedItems.length )
|
||||||
if ( tree )
|
if ( tree )
|
||||||
top.addressbook.DeleteAddressBooks(tree.database, tree, tree.selectedItems);
|
top.addressbook.deleteAddressBooks(tree.database, tree, tree.selectedItems);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user