1*b1cdbd2cSJim Jagielski /************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski 23*b1cdbd2cSJim Jagielski 24*b1cdbd2cSJim Jagielski #ifndef _OSL_PROFILE_H_ 25*b1cdbd2cSJim Jagielski #define _OSL_PROFILE_H_ 26*b1cdbd2cSJim Jagielski 27*b1cdbd2cSJim Jagielski #include <sal/types.h> 28*b1cdbd2cSJim Jagielski #include <rtl/ustring.h> 29*b1cdbd2cSJim Jagielski 30*b1cdbd2cSJim Jagielski #ifdef __cplusplus 31*b1cdbd2cSJim Jagielski extern "C" { 32*b1cdbd2cSJim Jagielski #endif 33*b1cdbd2cSJim Jagielski 34*b1cdbd2cSJim Jagielski typedef sal_uInt32 oslProfileOption; 35*b1cdbd2cSJim Jagielski 36*b1cdbd2cSJim Jagielski #define osl_Profile_DEFAULT 0x0000 37*b1cdbd2cSJim Jagielski #define osl_Profile_SYSTEM 0x0001 /* use system depended functinality */ 38*b1cdbd2cSJim Jagielski #define osl_Profile_READLOCK 0x0002 /* lock file for reading */ 39*b1cdbd2cSJim Jagielski #define osl_Profile_WRITELOCK 0x0004 /* lock file for writing */ 40*b1cdbd2cSJim Jagielski #define osl_Profile_FLUSHWRITE 0x0010 /* writing only with flush */ 41*b1cdbd2cSJim Jagielski 42*b1cdbd2cSJim Jagielski 43*b1cdbd2cSJim Jagielski typedef void* oslProfile; 44*b1cdbd2cSJim Jagielski 45*b1cdbd2cSJim Jagielski /** Deprecated API. 46*b1cdbd2cSJim Jagielski Open or create a configuration profile. 47*b1cdbd2cSJim Jagielski @return 0 if the profile could not be created, otherwise a handle to the profile. 48*b1cdbd2cSJim Jagielski @deprecated 49*b1cdbd2cSJim Jagielski */ 50*b1cdbd2cSJim Jagielski oslProfile SAL_CALL osl_openProfile(rtl_uString *strProfileName, oslProfileOption Options); 51*b1cdbd2cSJim Jagielski 52*b1cdbd2cSJim Jagielski /** Deprecated API. 53*b1cdbd2cSJim Jagielski Close the opened profile an flush all data to the disk. 54*b1cdbd2cSJim Jagielski @param Profile handle to a opened profile. 55*b1cdbd2cSJim Jagielski @deprecated 56*b1cdbd2cSJim Jagielski */ 57*b1cdbd2cSJim Jagielski sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile); 58*b1cdbd2cSJim Jagielski 59*b1cdbd2cSJim Jagielski 60*b1cdbd2cSJim Jagielski /** Deprecated API. 61*b1cdbd2cSJim Jagielski @deprecated 62*b1cdbd2cSJim Jagielski */ 63*b1cdbd2cSJim Jagielski sal_Bool SAL_CALL osl_flushProfile(oslProfile Profile); 64*b1cdbd2cSJim Jagielski /** Deprecated API. 65*b1cdbd2cSJim Jagielski @deprecated 66*b1cdbd2cSJim Jagielski */ 67*b1cdbd2cSJim Jagielski sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, 68*b1cdbd2cSJim Jagielski const sal_Char* pszSection, const sal_Char* pszEntry, 69*b1cdbd2cSJim Jagielski sal_Char* pszString, sal_uInt32 MaxLen, 70*b1cdbd2cSJim Jagielski const sal_Char* pszDefault); 71*b1cdbd2cSJim Jagielski /** Deprecated API. 72*b1cdbd2cSJim Jagielski @deprecated 73*b1cdbd2cSJim Jagielski */ 74*b1cdbd2cSJim Jagielski sal_Bool SAL_CALL osl_readProfileBool(oslProfile Profile, 75*b1cdbd2cSJim Jagielski const sal_Char* pszSection, const sal_Char* pszEntry, 76*b1cdbd2cSJim Jagielski sal_Bool Default); 77*b1cdbd2cSJim Jagielski /** Deprecated API. 78*b1cdbd2cSJim Jagielski @deprecated 79*b1cdbd2cSJim Jagielski */ 80*b1cdbd2cSJim Jagielski sal_uInt32 SAL_CALL osl_readProfileIdent(oslProfile Profile, 81*b1cdbd2cSJim Jagielski const sal_Char* pszSection, const sal_Char* pszEntry, 82*b1cdbd2cSJim Jagielski sal_uInt32 FirstId, const sal_Char* Strings[], 83*b1cdbd2cSJim Jagielski sal_uInt32 Default); 84*b1cdbd2cSJim Jagielski 85*b1cdbd2cSJim Jagielski /** Deprecated API. 86*b1cdbd2cSJim Jagielski @deprecated 87*b1cdbd2cSJim Jagielski */ 88*b1cdbd2cSJim Jagielski sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, 89*b1cdbd2cSJim Jagielski const sal_Char* pszSection, const sal_Char* pszEntry, 90*b1cdbd2cSJim Jagielski const sal_Char* pszString); 91*b1cdbd2cSJim Jagielski /** Deprecated API. 92*b1cdbd2cSJim Jagielski @deprecated 93*b1cdbd2cSJim Jagielski */ 94*b1cdbd2cSJim Jagielski sal_Bool SAL_CALL osl_writeProfileBool(oslProfile Profile, 95*b1cdbd2cSJim Jagielski const sal_Char* pszSection, const sal_Char* pszEntry, 96*b1cdbd2cSJim Jagielski sal_Bool Value); 97*b1cdbd2cSJim Jagielski /** Deprecated API. 98*b1cdbd2cSJim Jagielski @deprecated 99*b1cdbd2cSJim Jagielski */ 100*b1cdbd2cSJim Jagielski sal_Bool SAL_CALL osl_writeProfileIdent(oslProfile Profile, 101*b1cdbd2cSJim Jagielski const sal_Char* pszSection, const sal_Char* pszEntry, 102*b1cdbd2cSJim Jagielski sal_uInt32 FirstId, const sal_Char* Strings[], 103*b1cdbd2cSJim Jagielski sal_uInt32 Value); 104*b1cdbd2cSJim Jagielski 105*b1cdbd2cSJim Jagielski /** Deprecated API. 106*b1cdbd2cSJim Jagielski Acquire the mutex, block if already acquired by another thread. 107*b1cdbd2cSJim Jagielski @param Profile handle to a opened profile. 108*b1cdbd2cSJim Jagielski @return False if section or entry could not be found. 109*b1cdbd2cSJim Jagielski @deprecated 110*b1cdbd2cSJim Jagielski */ 111*b1cdbd2cSJim Jagielski sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile, 112*b1cdbd2cSJim Jagielski const sal_Char *pszSection, const sal_Char *pszEntry); 113*b1cdbd2cSJim Jagielski 114*b1cdbd2cSJim Jagielski /** Deprecated API. 115*b1cdbd2cSJim Jagielski Get all entries belonging to the specified section. 116*b1cdbd2cSJim Jagielski @param Profile handle to a opened profile. 117*b1cdbd2cSJim Jagielski @return Pointer to a array of pointers. 118*b1cdbd2cSJim Jagielski @deprecated 119*b1cdbd2cSJim Jagielski */ 120*b1cdbd2cSJim Jagielski sal_uInt32 SAL_CALL osl_getProfileSectionEntries(oslProfile Profile, const sal_Char *pszSection, 121*b1cdbd2cSJim Jagielski sal_Char* pszBuffer, sal_uInt32 MaxLen); 122*b1cdbd2cSJim Jagielski 123*b1cdbd2cSJim Jagielski /** Deprecated API. 124*b1cdbd2cSJim Jagielski Get all section entries 125*b1cdbd2cSJim Jagielski @param Profile handle to a opened profile. 126*b1cdbd2cSJim Jagielski @return Pointer to a array of pointers. 127*b1cdbd2cSJim Jagielski @deprecated 128*b1cdbd2cSJim Jagielski */ 129*b1cdbd2cSJim Jagielski sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, sal_Char* pszBuffer, sal_uInt32 MaxLen); 130*b1cdbd2cSJim Jagielski 131*b1cdbd2cSJim Jagielski #ifdef __cplusplus 132*b1cdbd2cSJim Jagielski } 133*b1cdbd2cSJim Jagielski #endif 134*b1cdbd2cSJim Jagielski 135*b1cdbd2cSJim Jagielski #endif /* _OSL_PROFILE_H_ */ 136*b1cdbd2cSJim Jagielski 137