Warning, file /libraries/libqaccessibilityclient/src/qaccessibilityclient/registrycache_p.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2012 Frederik Gladhorn <gladhorn@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef QACCESSIBILITYCLIENT_REGISTRYCACHE_P_H 0008 #define QACCESSIBILITYCLIENT_REGISTRYCACHE_P_H 0009 0010 namespace QAccessibleClient { 0011 0012 // Private API. May be gone or changed anytime soon. 0013 class QACCESSIBILITYCLIENT_EXPORT RegistryPrivateCacheApi 0014 { 0015 public: 0016 enum CacheType { 0017 NoCache, ///< Disable any caching. 0018 WeakCache, ///< Cache only objects in use and free them as long as no-one holds a reference to them any longer. 0019 }; 0020 0021 explicit RegistryPrivateCacheApi(Registry *registry) : m_registry(registry) {} 0022 0023 CacheType cacheType() const { return static_cast<CacheType>(m_registry->cacheType()); } 0024 void setCacheType(CacheType type) { m_registry->setCacheType(static_cast<Registry::CacheType>(type)); } 0025 0026 AccessibleObject clientCacheObject(const QString &id) const { return m_registry->clientCacheObject(id); } 0027 QStringList clientCacheObjects() const { return m_registry->clientCacheObjects(); } 0028 void clearClientCache() { m_registry->clearClientCache(); } 0029 0030 private: 0031 Registry *m_registry; 0032 }; 0033 0034 } 0035 0036 #endif