[28967] | 1 | /* $Id: */
|
---|
| 2 | /** @file
|
---|
| 3 | * VBoxServicePropCache - Guest property cache.
|
---|
| 4 | */
|
---|
| 5 |
|
---|
| 6 | /*
|
---|
[98103] | 7 | * Copyright (C) 2010-2023 Oracle and/or its affiliates.
|
---|
[28967] | 8 | *
|
---|
[96407] | 9 | * This file is part of VirtualBox base platform packages, as
|
---|
| 10 | * available from https://www.virtualbox.org.
|
---|
| 11 | *
|
---|
| 12 | * This program is free software; you can redistribute it and/or
|
---|
| 13 | * modify it under the terms of the GNU General Public License
|
---|
| 14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
| 15 | * License.
|
---|
| 16 | *
|
---|
| 17 | * This program is distributed in the hope that it will be useful, but
|
---|
| 18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 20 | * General Public License for more details.
|
---|
| 21 | *
|
---|
| 22 | * You should have received a copy of the GNU General Public License
|
---|
| 23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 24 | *
|
---|
| 25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
[28967] | 26 | */
|
---|
| 27 |
|
---|
[76563] | 28 | #ifndef GA_INCLUDED_SRC_common_VBoxService_VBoxServicePropCache_h
|
---|
| 29 | #define GA_INCLUDED_SRC_common_VBoxService_VBoxServicePropCache_h
|
---|
[76533] | 30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
| 31 | # pragma once
|
---|
| 32 | #endif
|
---|
[28967] | 33 |
|
---|
| 34 | #include "VBoxServiceInternal.h"
|
---|
| 35 |
|
---|
[58029] | 36 | #ifdef VBOX_WITH_GUEST_PROPS
|
---|
[28967] | 37 |
|
---|
[58029] | 38 | /** @name VGSVCPROPCACHE_FLAG_XXX - Guest Property Cache Flags.
|
---|
| 39 | * @{ */
|
---|
[36178] | 40 | /** Indicates wheter a guest property is temporary and either should
|
---|
[36249] | 41 | * - a) get a "reset" value assigned (via VBoxServicePropCacheUpdateEntry)
|
---|
| 42 | * as soon as the property cache gets destroyed, or
|
---|
| 43 | * - b) get deleted when no reset value is specified.
|
---|
[36178] | 44 | */
|
---|
[58029] | 45 | # define VGSVCPROPCACHE_FLAGS_TEMPORARY RT_BIT(1)
|
---|
[36178] | 46 | /** Indicates whether a property every time needs to be updated, regardless
|
---|
| 47 | * if its real value changed or not. */
|
---|
[58029] | 48 | # define VGSVCPROPCACHE_FLAGS_ALWAYS_UPDATE RT_BIT(2)
|
---|
[36249] | 49 | /** The guest property gets deleted when
|
---|
| 50 | * - a) the property cache gets destroyed, or
|
---|
| 51 | * - b) the VM gets reset / shutdown / destroyed.
|
---|
| 52 | */
|
---|
[58029] | 53 | # define VGSVCPROPCACHE_FLAGS_TRANSIENT RT_BIT(3)
|
---|
| 54 | /** @} */
|
---|
[28967] | 55 |
|
---|
[58029] | 56 | int VGSvcPropCacheCreate(PVBOXSERVICEVEPROPCACHE pCache, uint32_t uClientId);
|
---|
| 57 | int VGSvcPropCacheUpdateEntry(PVBOXSERVICEVEPROPCACHE pCache, const char *pszName, uint32_t fFlags, const char *pszValueReset);
|
---|
| 58 | int VGSvcPropCacheUpdate(PVBOXSERVICEVEPROPCACHE pCache, const char *pszName, const char *pszValueFormat, ...);
|
---|
| 59 | int VGSvcPropCacheUpdateByPath(PVBOXSERVICEVEPROPCACHE pCache, const char *pszValue, uint32_t fFlags,
|
---|
| 60 | const char *pszPathFormat, ...);
|
---|
| 61 | int VGSvcPropCacheFlush(PVBOXSERVICEVEPROPCACHE pCache);
|
---|
| 62 | void VGSvcPropCacheDestroy(PVBOXSERVICEVEPROPCACHE pCache);
|
---|
| 63 | #endif /* VBOX_WITH_GUEST_PROPS */
|
---|
[28967] | 64 |
|
---|
[76563] | 65 | #endif /* !GA_INCLUDED_SRC_common_VBoxService_VBoxServicePropCache_h */
|
---|
[28967] | 66 |
|
---|