update dev300-m58
[ooovba.git] / registry / source / keyimpl.hxx
blob73e02ca0658b8bf21ef7c9c3c0bb026809b64494
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: keyimpl.hxx,v $
10 * $Revision: 1.4.10.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _KEYIMPL_HXX_
32 #define _KEYIMPL_HXX_
34 #include <registry/registry.h>
35 #include "regimpl.hxx"
36 #include <rtl/string.hxx>
38 using namespace rtl;
39 using namespace store;
41 class ORegKey
43 public:
45 ORegKey(const OUString& keyName, ORegistry* pReg);
47 sal_uInt32 acquire()
48 { return ++m_refCount; }
50 sal_uInt32 release()
51 { return --m_refCount; }
53 RegError createKey(const OUString& keyName, RegKeyHandle* phNewKey);
55 RegError openKey(const OUString& keyName, RegKeyHandle* phOpenKey);
57 RegError openSubKeys(const OUString& keyName,
58 RegKeyHandle** phOpenSubKeys,
59 sal_uInt32* pnSubKeys);
61 RegError getKeyNames(const OUString& keyName,
62 rtl_uString*** pSubKeyNames,
63 sal_uInt32* pnSubKeys);
65 RegError closeKey(RegKeyHandle hKey);
67 RegError deleteKey(const OUString& keyName);
69 RegError getValueInfo(const OUString& valueName,
70 RegValueType* pValueTye,
71 sal_uInt32* pValueSize) const;
73 RegError setValue(const OUString& valueName,
74 RegValueType vType,
75 RegValue value,
76 sal_uInt32 vSize);
78 RegError setLongListValue(const OUString& valueName,
79 sal_Int32* pValueList,
80 sal_uInt32 len);
82 RegError setStringListValue(const OUString& valueName,
83 sal_Char** pValueList,
84 sal_uInt32 len);
86 RegError setUnicodeListValue(const OUString& valueName,
87 sal_Unicode** pValueList,
88 sal_uInt32 len);
90 RegError getValue(const OUString& valueName, RegValue value) const;
92 RegError getLongListValue(const OUString& valueName,
93 sal_Int32** pValueList,
94 sal_uInt32* pLen) const;
96 RegError getStringListValue(const OUString& valueName,
97 sal_Char*** pValueList,
98 sal_uInt32* pLen) const;
100 RegError getUnicodeListValue(const OUString& valueName,
101 sal_Unicode*** pValueList,
102 sal_uInt32* pLen) const;
104 RegError getKeyType(const OUString& name,
105 RegKeyType* pKeyType) const;
107 RegError getResolvedKeyName(const OUString& keyName,
108 OUString& resolvedName);
110 sal_Bool isDeleted() const
111 { return m_bDeleted; }
113 void setDeleted(sal_Bool bKeyDeleted)
114 { m_bDeleted = bKeyDeleted; }
116 sal_Bool isReadOnly() const
117 { return m_pRegistry->isReadOnly(); }
119 sal_uInt32 countSubKeys();
121 ORegistry* getRegistry() const
122 { return m_pRegistry; }
124 const OStoreFile& getStoreFile() const
125 { return m_pRegistry->getStoreFile(); }
127 OStoreDirectory getStoreDir();
129 const OUString& getName() const
130 { return m_name; }
132 sal_uInt32 getRefCount() const
133 { return m_refCount; }
135 OUString getFullPath(OUString const & path) const;
137 private:
138 sal_uInt32 m_refCount;
139 OUString m_name;
140 sal_Bool m_bDeleted;
141 ORegistry* m_pRegistry;
146 #endif