/* -*- 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(FA5C977F-04C8-11d3-A2EB-001083003D0C)]
interface nsIAbCard : nsISupports {

	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 boolean sendPlainText;

    attribute unsigned long dbTableID;
    attribute unsigned long dbRowID;

	wstring getCardValue(in string attrname);
	void setCardValue(in string attrname, in wstring value);
	void setAbDatabase(in nsIAddrDatabase database);

	[noscript] readonly attribute nsVoidArray anonymousStrAttrubutesList;
	[noscript] readonly attribute nsVoidArray anonymousStrValuesList;
	[noscript] readonly attribute nsVoidArray anonymousIntAttrubutesList;
	[noscript] readonly attribute nsVoidArray anonymousIntValuesList;
	[noscript] readonly attribute nsVoidArray anonymousBoolAttrubutesList;
	[noscript] readonly attribute nsVoidArray anonymousBoolValuesList;

	void setAnonymousStringAttribute(in string attrname, in string value);
	void setAnonymousIntAttribute(in string attrname, in unsigned long value);
	void setAnonymousBoolAttribute(in string attrname, in boolean value);
	void addAnonymousAttributesToDB();
	void editAnonymousAttributesInDB();

	readonly attribute string cardURI;
	void addCardToDatabase(in string uri);
	void editCardToDatabase(in string uri);
	void copyCard(in nsIAbCard srcCard);
	wstring getCollationKey(in wstring str);
};
