1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
---|
2 | /* ***** BEGIN LICENSE BLOCK ***** |
---|
3 | * Version: NPL 1.1/GPL 2.0/LGPL 2.1 |
---|
4 | * |
---|
5 | * The contents of this file are subject to the Netscape Public License |
---|
6 | * Version 1.1 (the "License"); you may not use this file except in |
---|
7 | * compliance with the License. You may obtain a copy of the License at |
---|
8 | * http://www.mozilla.org/NPL/ |
---|
9 | * |
---|
10 | * Software distributed under the License is distributed on an "AS IS" basis, |
---|
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
---|
12 | * for the specific language governing rights and limitations under the |
---|
13 | * License. |
---|
14 | * |
---|
15 | * The Original Code is mozilla.org code. |
---|
16 | * |
---|
17 | * The Initial Developer of the Original Code is |
---|
18 | * Netscape Communications Corporation. |
---|
19 | * Portions created by the Initial Developer are Copyright (C) 1998 |
---|
20 | * the Initial Developer. All Rights Reserved. |
---|
21 | * |
---|
22 | * Contributor(s): |
---|
23 | * |
---|
24 | * Alternatively, the contents of this file may be used under the terms of |
---|
25 | * either the GNU General Public License Version 2 or later (the "GPL"), or |
---|
26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), |
---|
27 | * in which case the provisions of the GPL or the LGPL are applicable instead |
---|
28 | * of those above. If you wish to allow use of your version of this file only |
---|
29 | * under the terms of either the GPL or the LGPL, and not to allow others to |
---|
30 | * use your version of this file under the terms of the NPL, indicate your |
---|
31 | * decision by deleting the provisions above and replace them with the notice |
---|
32 | * and other provisions required by the GPL or the LGPL. If you do not delete |
---|
33 | * the provisions above, a recipient may use your version of this file under |
---|
34 | * the terms of any one of the NPL, the GPL or the LGPL. |
---|
35 | * |
---|
36 | * ***** END LICENSE BLOCK ***** */ |
---|
37 | |
---|
38 | #include "nsISupports.idl" |
---|
39 | |
---|
40 | %{C++ |
---|
41 | // Constants used for default email. |
---|
42 | // "0": screen name, "1": other email #1, "2": other email #2 |
---|
43 | #define AB_DEFAULT_EMAIL_IS_SCREEN_NAME "0" |
---|
44 | #define AB_DEFAULT_EMAIL_IS_EMAIL_1 "1" |
---|
45 | #define AB_DEFAULT_EMAIL_IS_EMAIL_2 "2" |
---|
46 | |
---|
47 | // Constants used for card types. |
---|
48 | // "" or "0": normal, "1": AOL groups, "2": AOL additional email address |
---|
49 | #define AB_CARD_IS_NORMAL_CARD "0" |
---|
50 | #define AB_CARD_IS_AOL_GROUPS "1" |
---|
51 | #define AB_CARD_IS_AOL_ADDITIONAL_EMAIL "2" |
---|
52 | |
---|
53 | %} |
---|
54 | |
---|
55 | [scriptable, uuid(97448252-F189-11d4-A422-001083003D0C)] |
---|
56 | interface nsIAbPreferMailFormat { |
---|
57 | const unsigned long unknown = 0; |
---|
58 | const unsigned long plaintext = 1; |
---|
59 | const unsigned long html = 2; |
---|
60 | }; |
---|
61 | |
---|
62 | [scriptable, uuid(FA5C977F-04C8-11d3-A2EB-001083003D0C)] |
---|
63 | interface nsIAbCard : nsISupports { |
---|
64 | // Card properties |
---|
65 | attribute wstring firstName; |
---|
66 | attribute wstring lastName; |
---|
67 | attribute wstring phoneticFirstName; |
---|
68 | attribute wstring phoneticLastName; |
---|
69 | attribute wstring displayName; |
---|
70 | attribute wstring nickName; |
---|
71 | attribute wstring primaryEmail; |
---|
72 | attribute wstring secondEmail; |
---|
73 | attribute wstring defaultEmail; |
---|
74 | attribute wstring cardType; |
---|
75 | attribute wstring workPhone; |
---|
76 | attribute wstring homePhone; |
---|
77 | attribute wstring faxNumber; |
---|
78 | attribute wstring pagerNumber; |
---|
79 | attribute wstring cellularNumber; |
---|
80 | attribute wstring workPhoneType; |
---|
81 | attribute wstring homePhoneType; |
---|
82 | attribute wstring faxNumberType; |
---|
83 | attribute wstring pagerNumberType; |
---|
84 | attribute wstring cellularNumberType; |
---|
85 | attribute wstring homeAddress; |
---|
86 | attribute wstring homeAddress2; |
---|
87 | attribute wstring homeCity; |
---|
88 | attribute wstring homeState; |
---|
89 | attribute wstring homeZipCode; |
---|
90 | attribute wstring homeCountry; |
---|
91 | attribute wstring workAddress; |
---|
92 | attribute wstring workAddress2; |
---|
93 | attribute wstring workCity; |
---|
94 | attribute wstring workState; |
---|
95 | attribute wstring workZipCode; |
---|
96 | attribute wstring workCountry; |
---|
97 | attribute wstring jobTitle; |
---|
98 | attribute wstring department; |
---|
99 | attribute wstring company; |
---|
100 | attribute wstring aimScreenName; |
---|
101 | attribute wstring anniversaryYear; |
---|
102 | attribute wstring anniversaryMonth; |
---|
103 | attribute wstring anniversaryDay; |
---|
104 | attribute wstring spouseName; |
---|
105 | attribute wstring familyName; |
---|
106 | attribute wstring defaultAddress; |
---|
107 | attribute wstring category; |
---|
108 | /** |
---|
109 | * webPage1 is work web page |
---|
110 | */ |
---|
111 | attribute wstring webPage1; |
---|
112 | /** |
---|
113 | * webPage2 is home web page |
---|
114 | */ |
---|
115 | attribute wstring webPage2; |
---|
116 | attribute wstring birthYear; |
---|
117 | attribute wstring birthMonth; |
---|
118 | attribute wstring birthDay; |
---|
119 | attribute wstring custom1; |
---|
120 | attribute wstring custom2; |
---|
121 | attribute wstring custom3; |
---|
122 | attribute wstring custom4; |
---|
123 | attribute wstring notes; |
---|
124 | attribute unsigned long lastModifiedDate; |
---|
125 | |
---|
126 | attribute unsigned long preferMailFormat; |
---|
127 | attribute boolean isMailList; |
---|
128 | /** |
---|
129 | * If isMailList is true then mailListURI |
---|
130 | * will contain the URI of the associated |
---|
131 | * mail list |
---|
132 | */ |
---|
133 | attribute string mailListURI; |
---|
134 | |
---|
135 | /** |
---|
136 | * Card type helper attributes |
---|
137 | */ |
---|
138 | readonly attribute boolean isANormalCard; |
---|
139 | readonly attribute boolean isASpecialGroup; |
---|
140 | readonly attribute boolean isAnEmailAddress; |
---|
141 | |
---|
142 | wstring getCardValue(in string name); |
---|
143 | |
---|
144 | void setCardValue(in string attrname, in wstring value); |
---|
145 | |
---|
146 | // Copies the card attributes from srcCard |
---|
147 | void copy(in nsIAbCard srcCard); |
---|
148 | |
---|
149 | // Edits an existing card in the directory defined by 'uri' |
---|
150 | // Rename to editCardInDirectory |
---|
151 | // Component will be an RDF card, since it has already |
---|
152 | // been created |
---|
153 | // |
---|
154 | // XXX FIX ME, this should not be a the card, it should be on the addressbook. |
---|
155 | void editCardToDatabase(in string uri); |
---|
156 | |
---|
157 | boolean equals(in nsIAbCard card); |
---|
158 | |
---|
159 | string convertToBase64EncodedXML(); |
---|
160 | wstring convertToXMLPrintData(); |
---|
161 | string convertToEscapedVCard(); |
---|
162 | }; |
---|