cid#1636693 COPY_INSTEAD_OF_MOVE
[LibreOffice.git] / include / osl / profile.h
blob082f0e0a0bc6212e1a9fcc5c72984a1bd2790f44
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 .
21 * This file is part of LibreOffice published API.
24 #ifndef INCLUDED_OSL_PROFILE_H
25 #define INCLUDED_OSL_PROFILE_H
27 #include "sal/config.h"
29 #include "rtl/ustring.h"
30 #include "sal/saldllapi.h"
31 #include "sal/types.h"
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
37 typedef sal_uInt32 oslProfileOption;
39 #define osl_Profile_DEFAULT 0x0000
40 #define osl_Profile_SYSTEM 0x0001 /* use system depended functionality */
41 #define osl_Profile_READLOCK 0x0002 /* lock file for reading */
42 #define osl_Profile_WRITELOCK 0x0004 /* lock file for writing */
43 #define osl_Profile_FLUSHWRITE 0x0010 /* writing only with flush */
46 typedef void* oslProfile;
48 /** Deprecated API.
49 Open or create a configuration profile.
50 @retval 0 if the profile could not be created, otherwise a handle to the profile.
51 @deprecated
53 SAL_DLLPUBLIC oslProfile SAL_CALL osl_openProfile(
54 rtl_uString *strProfileName, oslProfileOption Options) SAL_COLD;
56 /** Deprecated API.
57 Close the opened profile an flush all data to the disk.
58 @param Profile handle to an opened profile.
59 @deprecated
61 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_closeProfile(
62 oslProfile Profile) SAL_COLD;
64 /** Deprecated API.
65 @deprecated
68 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_flushProfile(
69 oslProfile Profile) SAL_COLD;
70 /** Deprecated API.
71 @deprecated
73 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_readProfileString(
74 oslProfile Profile,
75 const char* pszSection, const char* pszEntry,
76 char* pszString, sal_uInt32 MaxLen,
77 const char* pszDefault) SAL_COLD;
78 /** Deprecated API.
79 @deprecated
81 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_readProfileBool(
82 oslProfile Profile,
83 const char* pszSection, const char* pszEntry,
84 sal_Bool Default) SAL_COLD;
85 /** Deprecated API.
86 @deprecated
88 SAL_DLLPUBLIC sal_uInt32 SAL_CALL osl_readProfileIdent(
89 oslProfile Profile,
90 const char* pszSection, const char* pszEntry,
91 sal_uInt32 FirstId, const char* Strings[],
92 sal_uInt32 Default) SAL_COLD;
94 /** Deprecated API.
95 @deprecated
97 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_writeProfileString(
98 oslProfile Profile,
99 const char* pszSection, const char* pszEntry,
100 const char* pszString) SAL_COLD;
102 /** Deprecated API.
103 @deprecated
105 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_writeProfileBool(
106 oslProfile Profile,
107 const char* pszSection, const char* pszEntry,
108 sal_Bool Value) SAL_COLD;
110 /** Deprecated API.
111 @deprecated
113 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_writeProfileIdent(
114 oslProfile Profile,
115 const char* pszSection, const char* pszEntry,
116 sal_uInt32 FirstId, const char* Strings[],
117 sal_uInt32 Value) SAL_COLD;
119 /** Deprecated API.
120 Acquire the mutex, block if already acquired by another thread.
121 @retval False if section or entry could not be found.
122 @deprecated
124 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_removeProfileEntry(
125 oslProfile Profile,
126 const char *pszSection, const char *pszEntry) SAL_COLD;
128 /** Deprecated API.
129 Get all entries belonging to the specified section.
130 @returns Pointer to an array of pointers.
131 @deprecated
133 SAL_DLLPUBLIC sal_uInt32 SAL_CALL osl_getProfileSectionEntries(
134 oslProfile Profile, const char *pszSection,
135 char* pszBuffer, sal_uInt32 MaxLen) SAL_COLD;
137 /** Deprecated API.
138 Get all section entries
139 @retval Pointer to an array of pointers.
140 @deprecated
142 SAL_DLLPUBLIC sal_uInt32 SAL_CALL osl_getProfileSections(
143 oslProfile Profile, char* pszBuffer, sal_uInt32 MaxLen) SAL_COLD;
145 #ifdef __cplusplus
147 #endif
149 #endif // INCLUDED_OSL_PROFILE_H
151 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */