gecko-dev/mailnews/addrbook/public/nsIAbCard.idl

131 строка
3.9 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.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsISupports.idl"
interface nsIAddrDatabase;
[ptr] native nsVoidArray(nsVoidArray);
%{C++
#include "nsVoidArray.h"
%}
[scriptable, uuid(97448252-F189-11d4-A422-001083003D0C)]
interface nsIAbPreferMailFormat {
const unsigned long unknown = 0;
const unsigned long plaintext = 1;
const unsigned long html = 2;
};
[scriptable, uuid(FA5C977F-04C8-11d3-A2EB-001083003D0C)]
interface nsIAbCard : nsISupports {
// Card properties
attribute wstring firstName;
attribute wstring lastName;
attribute wstring displayName;
attribute wstring nickName;
attribute wstring primaryEmail;
attribute wstring secondEmail;
attribute wstring workPhone;
attribute wstring homePhone;
attribute wstring faxNumber;
attribute wstring pagerNumber;
attribute wstring cellularNumber;
attribute wstring homeAddress;
attribute wstring homeAddress2;
attribute wstring homeCity;
attribute wstring homeState;
attribute wstring homeZipCode;
attribute wstring homeCountry;
attribute wstring workAddress;
attribute wstring workAddress2;
attribute wstring workCity;
attribute wstring workState;
attribute wstring workZipCode;
attribute wstring workCountry;
attribute wstring jobTitle;
attribute wstring department;
attribute wstring company;
attribute wstring webPage1;
attribute wstring webPage2;
attribute wstring birthYear;
attribute wstring birthMonth;
attribute wstring birthDay;
attribute wstring custom1;
attribute wstring custom2;
attribute wstring custom3;
attribute wstring custom4;
attribute wstring notes;
attribute unsigned long lastModifiedDate;
attribute wstring name;
attribute unsigned long preferMailFormat;
attribute boolean isMailList;
// If isMailList==true then this string
// will contain the URI of the associated
// mail list
attribute string mailListURI;
wstring getCardValue(in string attrname);
void setCardValue(in string attrname, in wstring value);
// Copies the card attributes from srcCard
void copy(in nsIAbCard srcCard);
readonly attribute string printCardUrl;
// Adds a new card to the directory defined by 'uri'
// Rename to addCardToDirectory
//
// Returns an intstance of a card which
// is an RDF resource component
nsIAbCard addCardToDatabase(in string uri);
// Behaviour wise this is very similar to the
// addCardToDatabase method, except that it
// assumes the uri refers to a directory that
// is not a mail list
// This method is rendundent, droping a card
// onto a list should be allowed.
// Rename to dropCardToDirectory
//
// Returns an intstance of a card which
// is an RDF resource component
nsIAbCard dropCardToDatabase(in string uri);
// Edits an existing card in the directory defined by 'uri'
// Rename to editCardInDirectory
// Component will be an RDF card, since it has already
// been created
//
void editCardToDatabase(in string uri);
// Not sure what this does. Used by the
// card data source for values of collation
// properties, somthing to do with locales
// and sorting. Gets called when selecting
// table headers like Name and Email.
wstring getCollationKey(in wstring str);
};