merge the formfield patch from ooo-build
[ooovba.git] / connectivity / source / drivers / mozab / bootstrap / MNSProfile.hxx
blob64614a666db9dfdf21b2605b83b3b48a8d44eb7b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: MNSProfile.hxx,v $
10 * $Revision: 1.5 $
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.
29 ************************************************************************/
31 #include "mozilla_nsprofile.h"
33 #define _MAX_LENGTH 256
35 class nsProfile: public nsIProfileInternal,
36 public nsIProfileChangeStatus,
37 public nsIFactory
39 NS_DECL_ISUPPORTS
40 NS_DECL_NSIPROFILE
41 NS_DECL_NSIPROFILEINTERNAL
42 NS_DECL_NSIPROFILECHANGESTATUS
43 NS_DECL_NSIFACTORY
45 private:
46 PRBool mStartingUp;
47 PRBool mProfileChangeVetoed;
48 PRBool mProfileChangeFailed;
50 nsString mCurrentProfileName;
51 PRBool mCurrentProfileAvailable;
53 PRBool mIsContentLocaleSpecified;
54 nsCString mContentLocaleName;
56 PRBool mShutdownProfileToreDownNetwork;
57 nsresult Init();
59 public:
60 nsProfile();
61 virtual ~nsProfile();
63 public:
64 //We register an factory for Mozilla profile service its CID and CONTRACTID are NS_PROFILE_CID and NS_PROFILE_CONTRACTID
65 //After that, we does not need profile.dll/libprofile.so any more. Our profile service are diffrent from the orginal one in
66 //these areas:
67 //1. We do not lock Mozilla Profile,
68 //2. We do not change Mozilla Profile settings. We do not change default profile, do not create new profiles and
69 // do not write changes back to profile register
70 //3. We support can load both Thunderbird profile and Mozilla profiles
71 static nsresult RegisterProfileManager(nsIProfile* aProfileService);
75 extern nsresult ConvertStringToUnicode(nsCString& aCharset, const char* inString, nsAString& outString);
76 extern nsresult GetPlatformCharset(nsCString& aCharset);