update dev300-m58
[ooovba.git] / sal / inc / osl / profile.h
blob383e51633c31945adb4795237829bf07ef3cd7ef
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: profile.h,v $
10 * $Revision: 1.7 $
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 #ifndef _OSL_PROFILE_H_
32 #define _OSL_PROFILE_H_
34 #include <sal/types.h>
35 #include <rtl/ustring.h>
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
41 typedef sal_uInt32 oslProfileOption;
43 #define osl_Profile_DEFAULT 0x0000
44 #define osl_Profile_SYSTEM 0x0001 /* use system depended functinality */
45 #define osl_Profile_READLOCK 0x0002 /* lock file for reading */
46 #define osl_Profile_WRITELOCK 0x0004 /* lock file for writing */
47 #define osl_Profile_FLUSHWRITE 0x0010 /* writing only with flush */
50 typedef void* oslProfile;
52 /** Deprecated API.
53 Open or create a configuration profile.
54 @return 0 if the profile could not be created, otherwise a handle to the profile.
55 @deprecated
57 oslProfile SAL_CALL osl_openProfile(rtl_uString *strProfileName, oslProfileOption Options);
59 /** Deprecated API.
60 Close the opened profile an flush all data to the disk.
61 @param Profile handle to a opened profile.
62 @deprecated
64 sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile);
67 /** Deprecated API.
68 @deprecated
70 sal_Bool SAL_CALL osl_flushProfile(oslProfile Profile);
71 /** Deprecated API.
72 @deprecated
74 sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile,
75 const sal_Char* pszSection, const sal_Char* pszEntry,
76 sal_Char* pszString, sal_uInt32 MaxLen,
77 const sal_Char* pszDefault);
78 /** Deprecated API.
79 @deprecated
81 sal_Bool SAL_CALL osl_readProfileBool(oslProfile Profile,
82 const sal_Char* pszSection, const sal_Char* pszEntry,
83 sal_Bool Default);
84 /** Deprecated API.
85 @deprecated
87 sal_uInt32 SAL_CALL osl_readProfileIdent(oslProfile Profile,
88 const sal_Char* pszSection, const sal_Char* pszEntry,
89 sal_uInt32 FirstId, const sal_Char* Strings[],
90 sal_uInt32 Default);
92 /** Deprecated API.
93 @deprecated
95 sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile,
96 const sal_Char* pszSection, const sal_Char* pszEntry,
97 const sal_Char* pszString);
98 /** Deprecated API.
99 @deprecated
101 sal_Bool SAL_CALL osl_writeProfileBool(oslProfile Profile,
102 const sal_Char* pszSection, const sal_Char* pszEntry,
103 sal_Bool Value);
104 /** Deprecated API.
105 @deprecated
107 sal_Bool SAL_CALL osl_writeProfileIdent(oslProfile Profile,
108 const sal_Char* pszSection, const sal_Char* pszEntry,
109 sal_uInt32 FirstId, const sal_Char* Strings[],
110 sal_uInt32 Value);
112 /** Deprecated API.
113 Acquire the mutex, block if already acquired by another thread.
114 @param Profile handle to a opened profile.
115 @return False if section or entry could not be found.
116 @deprecated
118 sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile,
119 const sal_Char *pszSection, const sal_Char *pszEntry);
121 /** Deprecated API.
122 Get all entries belonging to the specified section.
123 @param Profile handle to a opened profile.
124 @return Pointer to a array of pointers.
125 @deprecated
127 sal_uInt32 SAL_CALL osl_getProfileSectionEntries(oslProfile Profile, const sal_Char *pszSection,
128 sal_Char* pszBuffer, sal_uInt32 MaxLen);
130 /** Deprecated API.
131 Get all section entries
132 @param Profile handle to a opened profile.
133 @return Pointer to a array of pointers.
134 @deprecated
136 sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, sal_Char* pszBuffer, sal_uInt32 MaxLen);
138 #ifdef __cplusplus
140 #endif
142 #endif /* _OSL_PROFILE_H_ */