VBoxServicePropCache.h revision 95d1f592541226f7399a2dd4d39e53cc84195b03
430474e5ec398f769830a548d818d75ff37d5113vboxsync/* $Id: */
430474e5ec398f769830a548d818d75ff37d5113vboxsync/** @file
5638779fc90f0e0e702176680e16b1888ce23580vboxsync * VBoxServicePropCache - Guest property cache.
5638779fc90f0e0e702176680e16b1888ce23580vboxsync */
430474e5ec398f769830a548d818d75ff37d5113vboxsync
430474e5ec398f769830a548d818d75ff37d5113vboxsync/*
430474e5ec398f769830a548d818d75ff37d5113vboxsync * Copyright (C) 2010 Oracle Corporation
430474e5ec398f769830a548d818d75ff37d5113vboxsync *
430474e5ec398f769830a548d818d75ff37d5113vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
459e93059a8be95d20eda3d1dad52187595a688cvboxsync * available from http://www.virtualbox.org. This file is free software;
430474e5ec398f769830a548d818d75ff37d5113vboxsync * you can redistribute it and/or modify it under the terms of the GNU
430474e5ec398f769830a548d818d75ff37d5113vboxsync * General Public License (GPL) as published by the Free Software
430474e5ec398f769830a548d818d75ff37d5113vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
430474e5ec398f769830a548d818d75ff37d5113vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
430474e5ec398f769830a548d818d75ff37d5113vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
430474e5ec398f769830a548d818d75ff37d5113vboxsync */
430474e5ec398f769830a548d818d75ff37d5113vboxsync
430474e5ec398f769830a548d818d75ff37d5113vboxsync#ifndef ___VBoxServicePropCache_h
459e93059a8be95d20eda3d1dad52187595a688cvboxsync#define ___VBoxServicePropCache_h
459e93059a8be95d20eda3d1dad52187595a688cvboxsync
459e93059a8be95d20eda3d1dad52187595a688cvboxsync#include "VBoxServiceInternal.h"
459e93059a8be95d20eda3d1dad52187595a688cvboxsync
459e93059a8be95d20eda3d1dad52187595a688cvboxsync# ifdef VBOX_WITH_GUEST_PROPS
459e93059a8be95d20eda3d1dad52187595a688cvboxsync
459e93059a8be95d20eda3d1dad52187595a688cvboxsync/** Indicates wheter a guest property is temporary and either should
459e93059a8be95d20eda3d1dad52187595a688cvboxsync * - a) get a "reset" value assigned (via VBoxServicePropCacheUpdateEntry)
459e93059a8be95d20eda3d1dad52187595a688cvboxsync * as soon as the property cache gets destroyed, or
459e93059a8be95d20eda3d1dad52187595a688cvboxsync * - b) get deleted when no reset value is specified.
459e93059a8be95d20eda3d1dad52187595a688cvboxsync */
459e93059a8be95d20eda3d1dad52187595a688cvboxsync#define VBOXSERVICEPROPCACHEFLAG_TEMPORARY RT_BIT(1)
430474e5ec398f769830a548d818d75ff37d5113vboxsync/** Indicates whether a property every time needs to be updated, regardless
459e93059a8be95d20eda3d1dad52187595a688cvboxsync * if its real value changed or not. */
430474e5ec398f769830a548d818d75ff37d5113vboxsync#define VBOXSERVICEPROPCACHEFLAG_ALWAYS_UPDATE RT_BIT(2)
430474e5ec398f769830a548d818d75ff37d5113vboxsync/** The guest property gets deleted when
430474e5ec398f769830a548d818d75ff37d5113vboxsync * - a) the property cache gets destroyed, or
db1c9ad0b435a86568c061ece8645572612e95d9vboxsync * - b) the VM gets reset / shutdown / destroyed.
459e93059a8be95d20eda3d1dad52187595a688cvboxsync */
09e687c875fbff315b512d787309fdda6063fd14vboxsync#define VBOXSERVICEPROPCACHEFLAG_TRANSIENT RT_BIT(3)
1691e8323a9db1b4f6a09d614d78142f2927ebaavboxsync
430474e5ec398f769830a548d818d75ff37d5113vboxsyncint VBoxServicePropCacheCreate(PVBOXSERVICEVEPROPCACHE pCache, uint32_t uClientId);
430474e5ec398f769830a548d818d75ff37d5113vboxsyncint VBoxServicePropCacheUpdateEntry(PVBOXSERVICEVEPROPCACHE pCache, const char *pszName, uint32_t fFlags, const char *pszValueReset);
459e93059a8be95d20eda3d1dad52187595a688cvboxsyncint VBoxServicePropCacheUpdate(PVBOXSERVICEVEPROPCACHE pCache, const char *pszName, const char *pszValueFormat, ...);
459e93059a8be95d20eda3d1dad52187595a688cvboxsyncint VBoxServicePropCacheUpdateByPath(PVBOXSERVICEVEPROPCACHE pCache, const char *pszValue, uint32_t fFlags, const char *pszPathFormat, ...);
459e93059a8be95d20eda3d1dad52187595a688cvboxsyncint VBoxServicePropCacheFlush(PVBOXSERVICEVEPROPCACHE pCache);
459e93059a8be95d20eda3d1dad52187595a688cvboxsyncvoid VBoxServicePropCacheDestroy(PVBOXSERVICEVEPROPCACHE pCache);
c8db1db099a06ef2a418a24d38d233e3402c8c66vboxsync# endif /* VBOX_WITH_GUEST_PROPS */
ecc10afb2afaaa25e9261aafa05512e13cc2fb75vboxsync
430474e5ec398f769830a548d818d75ff37d5113vboxsync#endif /* ___VBoxServicePropCache_h */
63b160c24e7bb0b9f49a64c29d1ee77a02284034vboxsync
459e93059a8be95d20eda3d1dad52187595a688cvboxsync