update dev300-m58
[ooovba.git] / connectivity / source / drivers / mozab / mozillasrc / MLdapAttributeMap.hxx
blob80bd222f6a151887e1de0d75cddb5b279a0cd356
1 /*************************************************************************
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * Copyright 2008 by Sun Microsystems, Inc.
6 * OpenOffice.org - a multi-platform office productivity suite
8 * $RCSfile: code,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
28 ************************************************************************/
30 #ifndef CONNECTIVITY_MLDAPATTRIBUTEMAP_HXX
31 #define CONNECTIVITY_MLDAPATTRIBUTEMAP_HXX
33 #include <MNSInclude.hxx>
35 #include <memory>
37 //........................................................................
38 namespace connectivity { namespace mozab {
39 //........................................................................
41 struct AttributeMap_Data;
42 class MQueryHelperResultEntry;
44 //====================================================================
45 //= class MLdapAttributeMap
46 //====================================================================
47 /** implements the nsIAbLDAPAttributeMap interface
49 Somewhere between Mozilla 1.7.5 and SeaMonkey 1.1.12, the LDAP address book
50 implementation was changed to take the attribute mapping (from LDAP attributes
51 to address book properties) not directly from the preferences. Instead, this mapping
52 is now delivered by a dedicated implementation (supporting the nsIAbLDAPAttributeMap
53 interface).
56 class MLdapAttributeMap : public nsIAbLDAPAttributeMap
58 public:
59 MLdapAttributeMap();
61 NS_DECL_ISUPPORTS
62 NS_DECL_NSIABLDAPATTRIBUTEMAP
64 static void fillCardFromResult( nsIAbCard& _card, const MQueryHelperResultEntry& _result );
65 static void fillResultFromCard( MQueryHelperResultEntry& _result, nsIAbCard& _card );
67 protected:
68 virtual ~MLdapAttributeMap();
70 private:
71 ::std::auto_ptr< AttributeMap_Data > m_pData;
74 //........................................................................
75 } } // namespace connectivity::mozab
76 //........................................................................
78 #endif // CONNECTIVITY_MLDAPATTRIBUTEMAP_HXX