Version 4.3.0.0.beta1, tag libreoffice-4.3.0.0.beta1
[LibreOffice.git] / connectivity / source / drivers / mozab / mozillasrc / MLdapAttributeMap.hxx
blobf7b1d9f1253f0536250db0033f33e313f2fb279c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MOZAB_MOZILLASRC_MLDAPATTRIBUTEMAP_HXX
21 #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MOZAB_MOZILLASRC_MLDAPATTRIBUTEMAP_HXX
23 #include <MNSInclude.hxx>
25 #include <memory>
28 namespace connectivity { namespace mozab {
31 struct AttributeMap_Data;
32 class MQueryHelperResultEntry;
35 //= class MLdapAttributeMap
37 /** implements the nsIAbLDAPAttributeMap interface
39 Somewhere between Mozilla 1.7.5 and SeaMonkey 1.1.12, the LDAP address book
40 implementation was changed to take the attribute mapping (from LDAP attributes
41 to address book properties) not directly from the preferences. Instead, this mapping
42 is now delivered by a dedicated implementation (supporting the nsIAbLDAPAttributeMap
43 interface).
46 class MLdapAttributeMap : public nsIAbLDAPAttributeMap
48 public:
49 MLdapAttributeMap();
51 NS_DECL_ISUPPORTS
52 NS_DECL_NSIABLDAPATTRIBUTEMAP
54 static void fillCardFromResult( nsIAbCard& _card, const MQueryHelperResultEntry& _result );
55 static void fillResultFromCard( MQueryHelperResultEntry& _result, nsIAbCard& _card );
57 protected:
58 virtual ~MLdapAttributeMap();
60 private:
61 ::std::auto_ptr< AttributeMap_Data > m_pData;
65 } } // namespace connectivity::mozab
68 #endif // INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MOZAB_MOZILLASRC_MLDAPATTRIBUTEMAP_HXX
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */