/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
/* * This file is part of LibreOffice published API.
*/
constint Profile_DEFAULT = osl_Profile_DEFAULT; constint Profile_SYSTEM = osl_Profile_SYSTEM; /* use system depended functionality */ constint Profile_READLOCK = osl_Profile_READLOCK; /* lock file for reading */ constint Profile_WRITELOCK = osl_Profile_WRITELOCK; /* lock file for writing */
/** Deprecated API. @deprecated
*/ class Profile {
oslProfile profile;
public: /** Open or create a configuration profile.
Sets a handle to the profile, otherwise if the profile could not be opened then throw an exception.
*/
Profile(const rtl::OUString & strProfileName, oslProfileOption Options = Profile_DEFAULT )
{
profile = osl_openProfile(strProfileName.pData, Options); if( ! profile ) throw std::exception();
}
/** Close the opened profile an flush all data to the disk.
*/
~Profile()
{
osl_closeProfile(profile);
}
/** Remove an entry from a section. @param rSection Name of the section. @param rEntry Name of the entry to remove. @retval False if section or entry could not be found.
*/ bool removeEntry(const rtl::OString& rSection, const rtl::OString& rEntry)
{ return osl_removeProfileEntry(profile, rSection.getStr(), rEntry.getStr());
}
/** Get all entries belonging to the specified section. @param rSection Name of the section. @return Pointer to an array of pointers.
*/
std::list< rtl::OString > getSectionEntries(const rtl::OString& rSection )
{
std::list< rtl::OString > aEntries;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.