Version 4.3.0.0.beta1, tag libreoffice-4.3.0.0.beta1
[LibreOffice.git] / connectivity / source / drivers / mork / MNSProfileDiscover.hxx
blob26a8eceae12dfa04a50e0484bd93eedb9f7cf552
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 __MNSProfileDiscover_h___
21 #define __MNSProfileDiscover_h___
23 #include <sal/types.h>
24 #include <osl/diagnose.h>
25 #include <osl/conditn.hxx>
26 #include <com/sun/star/mozilla/MozillaProductType.hpp>
27 #include <com/sun/star/uno/RuntimeException.hpp>
28 #include <com/sun/star/uno/Sequence.hxx>
29 #include <rtl/ustring.hxx>
31 #include <vector>
32 #include <map>
34 #include "dllapi.h"
36 using namespace com::sun::star::mozilla;
37 namespace connectivity
39 namespace mork
41 class ProfileStruct;
44 typedef ::std::map < OUString, ::connectivity::mork::ProfileStruct* > ProfileList;
45 namespace connectivity
47 namespace mork
49 class ProfileStruct
51 public:
52 ProfileStruct(MozillaProductType aProduct, const OUString& aProfileName,
53 const OUString &aProfilePath
55 MozillaProductType getProductType() { return product;}
56 OUString getProfileName(){ return profileName;}
57 OUString getProfilePath() ;
58 protected:
59 MozillaProductType product;
60 OUString profileName;
61 OUString profilePath;
64 class ProductStruct
66 public:
67 void setCurrentProfile(const OUString& aProfileName){mCurrentProfileName = aProfileName;}
69 OUString mCurrentProfileName;
71 ProfileList mProfileList;
74 //Used to query profiles information
75 class LO_DLLPUBLIC_MORK ProfileAccess
77 public:
79 virtual ~ProfileAccess();
80 ProfileAccess();
81 OUString getProfilePath( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException);
82 OUString getDefaultProfile( ::com::sun::star::mozilla::MozillaProductType product ) throw (::com::sun::star::uno::RuntimeException);
83 protected:
84 ProductStruct m_ProductProfileList[4];
85 sal_Int32 LoadProductsInfo();
86 sal_Int32 LoadXPToolkitProfiles(MozillaProductType product);
92 #endif // __MNSProfileDiscover_h___
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */