UDK 3.2.7 C/C++ API Reference
osl/profile.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /*************************************************************************
00003  *
00004  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
00005  *
00006  * Copyright 2000, 2010 Oracle and/or its affiliates.
00007  *
00008  * OpenOffice.org - a multi-platform office productivity suite
00009  *
00010  * This file is part of OpenOffice.org.
00011  *
00012  * OpenOffice.org is free software: you can redistribute it and/or modify
00013  * it under the terms of the GNU Lesser General Public License version 3
00014  * only, as published by the Free Software Foundation.
00015  *
00016  * OpenOffice.org is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU Lesser General Public License version 3 for more details
00020  * (a copy is included in the LICENSE file that accompanied this code).
00021  *
00022  * You should have received a copy of the GNU Lesser General Public License
00023  * version 3 along with OpenOffice.org.  If not, see
00024  * <http://www.openoffice.org/license.html>
00025  * for a copy of the LGPLv3 License.
00026  *
00027  ************************************************************************/
00028 
00029 #ifndef _OSL_PROFILE_H_
00030 #define _OSL_PROFILE_H_
00031 
00032 #include <sal/types.h>
00033 #include <rtl/ustring.h>
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00039 typedef sal_uInt32 oslProfileOption;
00040 
00041 #define osl_Profile_DEFAULT     0x0000
00042 #define osl_Profile_SYSTEM      0x0001    /* use system depended functinality */
00043 #define osl_Profile_READLOCK    0x0002    /* lock file for reading            */
00044 #define osl_Profile_WRITELOCK   0x0004    /* lock file for writing            */
00045 #define osl_Profile_FLUSHWRITE  0x0010    /* writing only with flush          */
00046 
00047 
00048 typedef void* oslProfile;
00049 
00055 SAL_DLLPUBLIC oslProfile SAL_CALL osl_openProfile(
00056         rtl_uString *strProfileName, oslProfileOption Options);
00057 
00063 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_closeProfile(
00064         oslProfile Profile);
00065 
00066 
00070 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_flushProfile(
00071         oslProfile Profile);
00075 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_readProfileString(
00076                               oslProfile Profile,
00077                               const sal_Char* pszSection, const sal_Char* pszEntry,
00078                               sal_Char* pszString, sal_uInt32 MaxLen,
00079                               const sal_Char* pszDefault);
00083 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_readProfileBool(
00084                             oslProfile Profile,
00085                             const sal_Char* pszSection, const sal_Char* pszEntry,
00086                             sal_Bool Default);
00090 SAL_DLLPUBLIC sal_uInt32 SAL_CALL osl_readProfileIdent(
00091                               oslProfile Profile,
00092                               const sal_Char* pszSection, const sal_Char* pszEntry,
00093                               sal_uInt32 FirstId, const sal_Char* Strings[],
00094                               sal_uInt32 Default);
00095 
00099 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_writeProfileString(
00100                                oslProfile Profile,
00101                                const sal_Char* pszSection, const sal_Char* pszEntry,
00102                                const sal_Char* pszString);
00106 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_writeProfileBool(
00107                              oslProfile Profile,
00108                              const sal_Char* pszSection, const sal_Char* pszEntry,
00109                              sal_Bool Value);
00113 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_writeProfileIdent(
00114                               oslProfile Profile,
00115                               const sal_Char* pszSection, const sal_Char* pszEntry,
00116                               sal_uInt32 FirstId, const sal_Char* Strings[],
00117                               sal_uInt32 Value);
00118 
00124 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_removeProfileEntry(
00125                            oslProfile Profile,
00126                            const sal_Char *pszSection, const sal_Char *pszEntry);
00127 
00133 SAL_DLLPUBLIC sal_uInt32 SAL_CALL osl_getProfileSectionEntries(
00134                             oslProfile Profile, const sal_Char *pszSection,
00135                             sal_Char* pszBuffer, sal_uInt32 MaxLen);
00136 
00142 SAL_DLLPUBLIC sal_uInt32 SAL_CALL osl_getProfileSections(
00143         oslProfile Profile, sal_Char* pszBuffer, sal_uInt32 MaxLen);
00144 
00145 #ifdef __cplusplus
00146 }
00147 #endif
00148 
00149 #endif  /* _OSL_PROFILE_H_ */
00150 
00151 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines