gecko-dev/mailnews/addrbook/public/nsIAddrDatabase.idl
chuang%netscape.com 01cfaff029 Import address book
1999-08-25 21:19:37 +00:00

111 lines
5.4 KiB
Plaintext

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/* nsFileSpec is declared in nsIAbDirectory.idl */
#include "nsIAddrDBAnnouncer.idl"
#include "nsIAbCard.idl"
#include "nsIAbDirectory.idl"
[ptr] native nsIMdbTableRowCursor(nsIMdbTableRowCursor);
[ptr] native nsIMdbEnv(nsIMdbEnv);
[ptr] native nsIMdbRow(nsIMdbRow);
[ptr] native nsString(nsString);
%{C++
#include "mdb.h"
%}
[scriptable, uuid(A4186D8B-1DD0-11d3-A303-001083003D0C)]
interface nsIAddrDatabase : nsIAddrDBAnnouncer {
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);
void Commit(in unsigned long commitType);
void ForceClosed();
void CreateNewCardAndAddToDB(in nsIAbCard newCard, in boolean beNotify);
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);
void GetAnonymousStringAttribute(in string attrname, out string value);
void SetAnonymousIntAttribute(in string attrname, in unsigned long value);
void GetAnonymousIntAttribute(in string attrname, out unsigned long value);
void SetAnonymousBoolAttribute(in string attrname, in boolean value);
void GetAnonymousBoolAttribute(in string attrname, out boolean value);
void AddAnonymousAttributesToDB();
void RemoveAnonymousAttributesFromDB();
void EditAnonymousAttributesInDB();
void AddAnonymousAttributesFromCard(in nsIAbCard card);
void RemoveAnonymousAttributesFromCard(in nsIAbCard card);
void EditAnonymousAttributesFromCard(in nsIAbCard card);
[noscript] void GetNewRow(out nsIMdbRow newRow);
[noscript] void AddCardRowToDB(in nsIMdbRow newRow);
[noscript] void AddFirstName(in nsIMdbRow row, in nsString value);
[noscript] void AddLastName(in nsIMdbRow row, in nsString value);
[noscript] void AddDisplayName(in nsIMdbRow row, in nsString value);
[noscript] void AddNickName(in nsIMdbRow row, in nsString value);
[noscript] void AddPrimaryEmail(in nsIMdbRow row, in nsString value);
[noscript] void Add2ndEmail(in nsIMdbRow row, in nsString value);
[noscript] void AddWorkPhone(in nsIMdbRow row, in nsString value);
[noscript] void AddHomePhone(in nsIMdbRow row, in nsString value);
[noscript] void AddFaxNumber(in nsIMdbRow row, in nsString value);
[noscript] void AddPagerNumber(in nsIMdbRow row, in nsString value);
[noscript] void AddCellularNumber(in nsIMdbRow row, in nsString value);
[noscript] void AddHomeAddress(in nsIMdbRow row, in nsString value);
[noscript] void AddHomeAddress2(in nsIMdbRow row, in nsString value);
[noscript] void AddHomeCity(in nsIMdbRow row, in nsString value);
[noscript] void AddHomeState(in nsIMdbRow row, in nsString value);
[noscript] void AddHomeZipCode(in nsIMdbRow row, in nsString value);
[noscript] void AddHomeCountry(in nsIMdbRow row, in nsString value);
[noscript] void AddWorkAddress(in nsIMdbRow row, in nsString value);
[noscript] void AddWorkAddress2(in nsIMdbRow row, in nsString value);
[noscript] void AddWorkCity(in nsIMdbRow row, in nsString value);
[noscript] void AddWorkState(in nsIMdbRow row, in nsString value);
[noscript] void AddWorkZipCode(in nsIMdbRow row, in nsString value);
[noscript] void AddWorkCountry(in nsIMdbRow row, in nsString value);
[noscript] void AddJobTitle(in nsIMdbRow row, in nsString value);
[noscript] void AddDepartment(in nsIMdbRow row, in nsString value);
[noscript] void AddCompany(in nsIMdbRow row, in nsString value);
[noscript] void AddWebPage1(in nsIMdbRow row, in nsString value);
[noscript] void AddWebPage2(in nsIMdbRow row, in nsString value);
[noscript] void AddBirthYear(in nsIMdbRow row, in nsString value);
[noscript] void AddBirthMonth(in nsIMdbRow row, in nsString value);
[noscript] void AddBirthDay(in nsIMdbRow row, in nsString value);
[noscript] void AddCustom1(in nsIMdbRow row, in nsString value);
[noscript] void AddCustom2(in nsIMdbRow row, in nsString value);
[noscript] void AddCustom3(in nsIMdbRow row, in nsString value);
[noscript] void AddCustom4(in nsIMdbRow row, in nsString value);
[noscript] void AddNotes(in nsIMdbRow row, in nsString value);
};