VBoxServicePropCache.h revision f2905347646a43ad687e0ceb9f4689f2bf76c4c2
208651a016b098f4fa1f6279559f104d70f1632dtakashi/* $Id: */
75429b361faff4e3109d7e5962f70d2d65271f60yoshiki/** @file
75429b361faff4e3109d7e5962f70d2d65271f60yoshiki * VBoxServicePropCache - Guest property cache.
0a336dd9ddab495062363310a4a4d8a0fb69c495nd */
acc36ab93565d2880447d535da6ca6e5feac7a70nd
acc36ab93565d2880447d535da6ca6e5feac7a70nd/*
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding * Copyright (C) 2010 Oracle Corporation
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding *
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding * This file is part of VirtualBox Open Source Edition (OSE), as
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding * available from http://www.virtualbox.org. This file is free software;
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding * you can redistribute it and/or modify it under the terms of the GNU
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding * General Public License (GPL) as published by the Free Software
acc36ab93565d2880447d535da6ca6e5feac7a70nd * Foundation, in version 2 as it comes in the "COPYING" file of the
acc36ab93565d2880447d535da6ca6e5feac7a70nd * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
acc36ab93565d2880447d535da6ca6e5feac7a70nd * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
acc36ab93565d2880447d535da6ca6e5feac7a70nd */
acc36ab93565d2880447d535da6ca6e5feac7a70nd
acc36ab93565d2880447d535da6ca6e5feac7a70nd#ifndef ___VBoxServicePropCache_h
acc36ab93565d2880447d535da6ca6e5feac7a70nd#define ___VBoxServicePropCache_h
acc36ab93565d2880447d535da6ca6e5feac7a70nd
acc36ab93565d2880447d535da6ca6e5feac7a70nd#include "VBoxServiceInternal.h"
acc36ab93565d2880447d535da6ca6e5feac7a70nd
7db9f691a00ead175b03335457ca296a33ddf31bnd# ifdef VBOX_WITH_GUEST_PROPS
75429b361faff4e3109d7e5962f70d2d65271f60yoshiki
208651a016b098f4fa1f6279559f104d70f1632dtakashi/** Indicates wheter a guest property is temporary and either should
75429b361faff4e3109d7e5962f70d2d65271f60yoshiki * get deleted when
75429b361faff4e3109d7e5962f70d2d65271f60yoshiki * - a) the property cache gets destroyed, or
75429b361faff4e3109d7e5962f70d2d65271f60yoshiki * - b) the VM gets a hard reset / shutdown
208651a016b098f4fa1f6279559f104d70f1632dtakashi * or gets a default "reset" value (if specified via VBoxServicePropCacheUpdateEntry)
208651a016b098f4fa1f6279559f104d70f1632dtakashi * when the property cache gets properly destroyed.
208651a016b098f4fa1f6279559f104d70f1632dtakashi */
75429b361faff4e3109d7e5962f70d2d65271f60yoshiki#define VBOXSERVICEPROPCACHEFLAG_TEMPORARY RT_BIT(1)
208651a016b098f4fa1f6279559f104d70f1632dtakashi/** Indicates whether a property every time needs to be updated, regardless
208651a016b098f4fa1f6279559f104d70f1632dtakashi * if its real value changed or not. */
208651a016b098f4fa1f6279559f104d70f1632dtakashi#define VBOXSERVICEPROPCACHEFLAG_ALWAYS_UPDATE RT_BIT(2)
75429b361faff4e3109d7e5962f70d2d65271f60yoshiki
208651a016b098f4fa1f6279559f104d70f1632dtakashiint VBoxServicePropCacheCreate(PVBOXSERVICEVEPROPCACHE pCache, uint32_t uClientId);
208651a016b098f4fa1f6279559f104d70f1632dtakashiint VBoxServicePropCacheUpdateEntry(PVBOXSERVICEVEPROPCACHE pCache, const char *pszName, uint32_t fFlags, const char *pszValueReset);
208651a016b098f4fa1f6279559f104d70f1632dtakashiint VBoxServicePropCacheUpdate(PVBOXSERVICEVEPROPCACHE pCache, const char *pszName, const char *pszValueFormat, ...);
75429b361faff4e3109d7e5962f70d2d65271f60yoshikiint VBoxServicePropCacheUpdateByPath(PVBOXSERVICEVEPROPCACHE pCache, const char *pszValue, uint32_t fFlags, const char *pszPathFormat, ...);
208651a016b098f4fa1f6279559f104d70f1632dtakashiint VBoxServicePropCacheFlush(PVBOXSERVICEVEPROPCACHE pCache);
208651a016b098f4fa1f6279559f104d70f1632dtakashivoid VBoxServicePropCacheDestroy(PVBOXSERVICEVEPROPCACHE pCache);
208651a016b098f4fa1f6279559f104d70f1632dtakashi# endif /* VBOX_WITH_GUEST_PROPS */
57fbfdce466d9a43dd4c161c901360f8f2ad2757yoshiki
75429b361faff4e3109d7e5962f70d2d65271f60yoshiki#endif /* ___VBoxServicePropCache_h */
75429b361faff4e3109d7e5962f70d2d65271f60yoshiki
208651a016b098f4fa1f6279559f104d70f1632dtakashi