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