VBoxGuestR3LibGuestProp.cpp revision b8f36a8f77f0140f48170d5b3cd9ee9ea1c14294
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync * VBoxGuestR3Lib - Ring-3 Support Library for VirtualBox guest additions, guest properties.
c7814cf6e1240a519cbec0441e033d0e2470ed00vboxsync * Copyright (C) 2007 Sun Microsystems, Inc.
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync * available from http://www.virtualbox.org. This file is free software;
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync * you can redistribute it and/or modify it under the terms of the GNU
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync * General Public License (GPL) as published by the Free Software
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
aba0e602e244ae7c4f11b50fc6d2440f5a762038vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
aba0e602e244ae7c4f11b50fc6d2440f5a762038vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
aba0e602e244ae7c4f11b50fc6d2440f5a762038vboxsync * additional information or have any questions.
aba0e602e244ae7c4f11b50fc6d2440f5a762038vboxsync/*******************************************************************************
aba0e602e244ae7c4f11b50fc6d2440f5a762038vboxsync* Header Files *
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync*******************************************************************************/
bc830c4bf23fbfb4373b949a1d408b4a1c67017dvboxsync/*******************************************************************************
bc830c4bf23fbfb4373b949a1d408b4a1c67017dvboxsync* Structures and Typedefs *
bc830c4bf23fbfb4373b949a1d408b4a1c67017dvboxsync*******************************************************************************/
bc830c4bf23fbfb4373b949a1d408b4a1c67017dvboxsync * Structure containing information needed to enumerate through guest
bc830c4bf23fbfb4373b949a1d408b4a1c67017dvboxsync * properties.
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync * @remarks typedef in VBoxGuestLib.h.
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync /** @todo add a magic and validate the handle. */
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync /** The buffer containing the raw enumeration data */
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync /** The end of the buffer */
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync /** Pointer to the next entry to enumerate inside the buffer */
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsyncusing namespace guestProp;
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync * Connects to the guest property service.
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync * @returns VBox status code
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync * @param pu32ClientId Where to put the client id on success. The client id
bc830c4bf23fbfb4373b949a1d408b4a1c67017dvboxsync * must be passed to all the other calls to the service.
bc830c4bf23fbfb4373b949a1d408b4a1c67017dvboxsyncVBGLR3DECL(int) VbglR3GuestPropConnect(uint32_t *pu32ClientId)
bc830c4bf23fbfb4373b949a1d408b4a1c67017dvboxsync strcpy(Info.Loc.u.host.achName, "VBoxGuestPropSvc");
083dd76e9fd7a829b1ed67ffc9003276643e7db1vboxsync Info.u32ClientID = UINT32_MAX; /* try make valgrid shut up. */
4e54ef30d55406d3cdda81fdf1e74b567c378425vboxsync int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CONNECT, &Info, sizeof(Info));
return rc;
return rc;
VBGLR3DECL(int) VbglR3GuestPropWrite(uint32_t u32ClientId, const char *pszName, const char *pszValue, const char *pszFlags)
int rc;
return rc;
VBGLR3DECL(int) VbglR3GuestPropWriteValue(uint32_t u32ClientId, const char *pszName, const char *pszValue)
int rc;
return rc;
VBGLR3DECL(int) VbglR3GuestPropWriteValueV(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, va_list va)
char *pszValue;
return rc;
VBGLR3DECL(int) VbglR3GuestPropWriteValueF(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, ...)
return rc;
char **ppszFlags,
return rc;
if (ppszValue)
if (ppszFlags)
return VINF_SUCCESS;
const char *pszName,
char **ppszValue)
if (pvTmpBuf)
return rc;
return rc;
const char *pszzPatterns,
char *pcBuf,
++cchPatterns;
if ( pcbBufActual
return rc;
char const * const *papszPatterns,
char const **ppszName,
char const **ppszValue,
char const **ppszFlags)
if (!Handle)
return VERR_NO_MEMORY;
const char *pszNameTmp;
if (!ppszName)
return rc;
char const **ppszName,
char const **ppszValue,
char const **ppszFlags)
u64Timestamp = 0;
if (ppszName)
if (ppszValue)
if (pu64Timestamp)
if (ppszFlags)
return VINF_SUCCESS;
const char * const *papszPatterns,
&pHandle,
&pszName,
&pszValue,
&pszFlags);
&pszName,
&pszValue,
&pszFlags);
return rc;
const char *pszPatterns,
return rc;
if (ppszName)
if (ppszValue)
if (ppszFlags)
return VINF_SUCCESS;