1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 *
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
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 * Oracle Corporation
19 * Portions created by the Initial Developer are Copyright (C) 2005
20 * the Initial Developer. All Rights Reserved.
21 *
22 * Contributor(s):
23 * Dan Mosedale <dan.mosedale@oracle.com>
24 * Jeremy Laine <jeremy.laine@m4x.org>
25 *
26 * Alternatively, the contents of this file may be used under the terms of
27 * either of the GNU General Public License Version 2 or later (the "GPL"),
28 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
37 *
38 * ***** END LICENSE BLOCK ***** */
39
40 #include "nsISupports.idl"
41
42 interface nsIMutableArray;
43 interface nsILocalFile;
44 interface nsIAddrDatabase;
45 interface nsIAbLDAPAttributeMap;
46 interface nsILDAPURL;
47
48 %{C++
49 #define kLDAPDirectoryRoot "moz-abldapdirectory://"
50 #define kLDAPDirectoryRootLen 22
51 %}
52
53 /**
54 * XXX This should really inherit from nsIAbDirectory, and some day it will.
55 * But for now, doing that complicates implementation.
56 */
57 [scriptable, uuid(2f689622-3d73-43aa-8580-6a7ba232be2b)]
58 interface nsIAbLDAPDirectory : nsISupports
59 {
60 /**
61 * If set, these arrays of nsILDAPControls are passed through to the
62 * nsILDAPOperation that searchExt is called on.
63 */
64 attribute nsIMutableArray searchServerControls;
65 attribute nsIMutableArray searchClientControls;
66
67 /**
68 * The Replication File Name to use.
69 */
70 attribute ACString replicationFileName;
71
72 /**
73 * The version of LDAP protocol in use.
74 */
75 attribute unsigned long protocolVersion;
76
77 /**
78 * The AuthDN to use to access the server.
79 */
80 attribute AUTF8String authDn;
81
82 /**
83 * The maximum number of matches that the server will return per a search.
84 */
85 attribute long maxHits;
86
87 /**
88 * The Last Change Number used for replication.
89 */
90 attribute long lastChangeNumber;
91
92 /**
93 * The LDAP server's scoping of the lastChangeNumber.
94 */
95 attribute ACString dataVersion;
96
97 /**
98 * The attribute map that is associated with this directory's server.
99 */
100 readonly attribute nsIAbLDAPAttributeMap attributeMap;
101
102 /**
103 * The LDAP URL for this directory. Note that this differs from
104 * nsIAbDirectory::URI. This attribute will give you a true ldap
105 * url, e.g. ldap://localhost:389/ whereas the uri will give you the
106 * directories rdf uri, e.g. moz-abldapdirectory://<pref base name>/.
107 */
108 attribute nsILDAPURL lDAPURL;
109
110 /**
111 * The replication (offline) file that this database uses.
112 */
113 readonly attribute nsILocalFile replicationFile;
114
115 /**
116 * A database that is set up for the replication file.
117 */
118 readonly attribute nsIAddrDatabase replicationDatabase;
119
120 /**
121 * The LDAP attributes used to build the Relative Distinguished Name
122 * of new cards, in the form of a comma separated list.
123 *
124 * The default is to use the common name (cn) attribute.
125 */
126 attribute ACString rdnAttributes;
127
128 /**
129 * The LDAP objectClass values added to cards when they are created/added,
130 * in the form of a comma separated list.
131 *
132 * The default is to use the following classes:
133 * top,person,organizationalPerson,inetOrgPerson,mozillaAbPersonAlpha
134 */
135 attribute ACString objectClasses;
136
137 };