office-gobmx/registry/source/keyimpl.hxx

154 lines
5.1 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 09:18:43 -05:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 09:18:43 -05:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 09:18:43 -05:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 09:18:43 -05:00
*
* This file is part of OpenOffice.org.
2000-09-18 09:18:43 -05:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 09:18:43 -05:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 09:18:43 -05:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 09:18:43 -05:00
*
************************************************************************/
#ifndef _KEYIMPL_HXX_
#define _KEYIMPL_HXX_
#include <registry/registry.h>
#include "regimpl.hxx"
#include <rtl/ustring.hxx>
2000-09-18 09:18:43 -05:00
class ORegKey
{
public:
ORegKey(const rtl::OUString& keyName, ORegistry* pReg);
~ORegKey();
2000-09-18 09:18:43 -05:00
sal_uInt32 acquire()
{ return ++m_refCount; }
sal_uInt32 release()
{ return --m_refCount; }
RegError acquireKey(RegKeyHandle hKey);
RegError releaseKey(RegKeyHandle hKey);
RegError createKey(const rtl::OUString& keyName, RegKeyHandle* phNewKey);
2000-09-18 09:18:43 -05:00
RegError openKey(const rtl::OUString& keyName, RegKeyHandle* phOpenKey);
2000-09-18 09:18:43 -05:00
RegError openSubKeys(const rtl::OUString& keyName,
2000-09-18 09:18:43 -05:00
RegKeyHandle** phOpenSubKeys,
sal_uInt32* pnSubKeys);
RegError getKeyNames(const rtl::OUString& keyName,
2000-09-18 09:18:43 -05:00
rtl_uString*** pSubKeyNames,
sal_uInt32* pnSubKeys);
RegError closeKey(RegKeyHandle hKey);
RegError deleteKey(const rtl::OUString& keyName);
2000-09-18 09:18:43 -05:00
RegError getValueInfo(const rtl::OUString& valueName,
2000-09-18 09:18:43 -05:00
RegValueType* pValueTye,
sal_uInt32* pValueSize) const;
RegError setValue(const rtl::OUString& valueName,
2000-09-18 09:18:43 -05:00
RegValueType vType,
RegValue value,
sal_uInt32 vSize);
RegError setLongListValue(const rtl::OUString& valueName,
2000-09-18 09:18:43 -05:00
sal_Int32* pValueList,
sal_uInt32 len);
RegError setStringListValue(const rtl::OUString& valueName,
2000-09-18 09:18:43 -05:00
sal_Char** pValueList,
sal_uInt32 len);
RegError setUnicodeListValue(const rtl::OUString& valueName,
2000-09-18 09:18:43 -05:00
sal_Unicode** pValueList,
sal_uInt32 len);
RegError getValue(const rtl::OUString& valueName, RegValue value) const;
2000-09-18 09:18:43 -05:00
RegError getLongListValue(const rtl::OUString& valueName,
2000-09-18 09:18:43 -05:00
sal_Int32** pValueList,
sal_uInt32* pLen) const;
RegError getStringListValue(const rtl::OUString& valueName,
2000-09-18 09:18:43 -05:00
sal_Char*** pValueList,
sal_uInt32* pLen) const;
RegError getUnicodeListValue(const rtl::OUString& valueName,
2000-09-18 09:18:43 -05:00
sal_Unicode*** pValueList,
sal_uInt32* pLen) const;
RegError getKeyType(const rtl::OUString& name,
2000-09-18 09:18:43 -05:00
RegKeyType* pKeyType) const;
RegError getResolvedKeyName(const rtl::OUString& keyName,
rtl::OUString& resolvedName);
bool isDeleted() const
{ return m_bDeleted != 0; }
2000-09-18 09:18:43 -05:00
void setDeleted (sal_Bool bKeyDeleted)
{ m_bDeleted = bKeyDeleted ? 1 : 0; }
2000-09-18 09:18:43 -05:00
bool isModified() const
{ return m_bModified != 0; }
void setModified (bool bModified = true)
{ m_bModified = bModified ? 1 : 0; }
2000-09-18 09:18:43 -05:00
sal_Bool isReadOnly() const
{ return m_pRegistry->isReadOnly(); }
sal_uInt32 countSubKeys();
ORegistry* getRegistry() const
{ return m_pRegistry; }
const store::OStoreFile& getStoreFile() const
CWS-TOOLING: integrate CWS sb103 2009-01-15 15:28:08 +0100 sb r266375 : #i97629# set UNO_PATH in python start program and use it in bootstrap function in officehelper.py (and do not erroneously encode a vnd.sun.star.pathname URE_BOOTSTRAP value in tools::extendApplicationEnvironment) 2009-01-15 10:40:17 +0100 sb r266338 : #i97424# explicit shut down of ImplImageTree singleton in DeInitVCL still required 2009-01-14 12:07:15 +0100 sb r266276 : CWS-TOOLING: rebase CWS sb103 to trunk@265758 (milestone: DEV300:m38) 2009-01-14 08:53:02 +0100 sb r266266 : #i96284# remove implementation of unused (but expensive) link feature; plus some general cleanup 2009-01-08 14:42:59 +0100 sb r266010 : #i96683# enable dlclose for GCC 3 (based on a patch by cmc) 2009-01-06 14:18:23 +0100 sb r265920 : #i97424# spurious unreferenced local variables 2008-12-19 15:33:39 +0100 sb r265727 : #i57359# no need for a special glibc 2.2.4 based libgcc_s.so.1 for URE any more as the general one used for OOo is guaranteed to be based on at least glibc 2.2.4, anyway 2008-12-19 13:54:37 +0100 sb r265724 : #i97424# clean up and speed up vcl ImplImageTree 2008-12-18 14:28:10 +0100 sb r265690 : #i97132# spread usage of the rtl::Static pattern (patch by cmc) 2008-12-15 14:33:00 +0100 sb r265499 : #i90492# generate UTF-8 encoded output (patch by tora) 2008-12-15 11:45:05 +0100 sb r265469 : #i95593# -Djava.library.path to find libtest_javauno_any.so 2008-12-15 11:23:14 +0100 sb r265468 : #i93769# it appears that Java nowadays expects file URIs in UTF-8, so ExternalUriReferenceTranslator.toExternal must not be called 2008-12-10 12:02:50 +0100 sb r265164 : #i93219# use (corrected) signal handling instead of forking again (to avoid unintended generation of core files)
2009-02-12 03:18:09 -06:00
{ return m_pRegistry->getStoreFile(); }
2000-09-18 09:18:43 -05:00
store::OStoreDirectory getStoreDir();
2000-09-18 09:18:43 -05:00
const rtl::OUString& getName() const
2000-09-18 09:18:43 -05:00
{ return m_name; }
sal_uInt32 getRefCount() const
{ return m_refCount; }
rtl::OUString getFullPath(rtl::OUString const & path) const;
2000-09-18 09:18:43 -05:00
CWS-TOOLING: integrate CWS sb103 2009-01-15 15:28:08 +0100 sb r266375 : #i97629# set UNO_PATH in python start program and use it in bootstrap function in officehelper.py (and do not erroneously encode a vnd.sun.star.pathname URE_BOOTSTRAP value in tools::extendApplicationEnvironment) 2009-01-15 10:40:17 +0100 sb r266338 : #i97424# explicit shut down of ImplImageTree singleton in DeInitVCL still required 2009-01-14 12:07:15 +0100 sb r266276 : CWS-TOOLING: rebase CWS sb103 to trunk@265758 (milestone: DEV300:m38) 2009-01-14 08:53:02 +0100 sb r266266 : #i96284# remove implementation of unused (but expensive) link feature; plus some general cleanup 2009-01-08 14:42:59 +0100 sb r266010 : #i96683# enable dlclose for GCC 3 (based on a patch by cmc) 2009-01-06 14:18:23 +0100 sb r265920 : #i97424# spurious unreferenced local variables 2008-12-19 15:33:39 +0100 sb r265727 : #i57359# no need for a special glibc 2.2.4 based libgcc_s.so.1 for URE any more as the general one used for OOo is guaranteed to be based on at least glibc 2.2.4, anyway 2008-12-19 13:54:37 +0100 sb r265724 : #i97424# clean up and speed up vcl ImplImageTree 2008-12-18 14:28:10 +0100 sb r265690 : #i97132# spread usage of the rtl::Static pattern (patch by cmc) 2008-12-15 14:33:00 +0100 sb r265499 : #i90492# generate UTF-8 encoded output (patch by tora) 2008-12-15 11:45:05 +0100 sb r265469 : #i95593# -Djava.library.path to find libtest_javauno_any.so 2008-12-15 11:23:14 +0100 sb r265468 : #i93769# it appears that Java nowadays expects file URIs in UTF-8, so ExternalUriReferenceTranslator.toExternal must not be called 2008-12-10 12:02:50 +0100 sb r265164 : #i93219# use (corrected) signal handling instead of forking again (to avoid unintended generation of core files)
2009-02-12 03:18:09 -06:00
private:
2000-09-18 09:18:43 -05:00
sal_uInt32 m_refCount;
rtl::OUString m_name;
int m_bDeleted:1;
int m_bModified:1;
2000-09-18 09:18:43 -05:00
ORegistry* m_pRegistry;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */