Index: trunk/include/VBox/HostServices/GuestPropertySvc.h
===================================================================
--- trunk/include/VBox/HostServices/GuestPropertySvc.h	(revision 10797)
+++ trunk/include/VBox/HostServices/GuestPropertySvc.h	(revision 10797)
@@ -0,0 +1,217 @@
+/** @file
+ * Guest property service:
+ * Common header for host service and guest clients.
+ */
+
+/*
+ * Copyright (C) 2006-2007 Sun Microsystems, Inc.
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
+ * Clara, CA 95054 USA or visit http://www.sun.com if you need
+ * additional information or have any questions.
+ */
+
+#ifndef ___VBox_HostService_GuestPropertyService_h
+#define ___VBox_HostService_GuestPropertyService_h
+
+#include <VBox/types.h>
+#include <VBox/VBoxGuest.h>
+#include <VBox/hgcmsvc.h>
+
+/** Everything defined in this file lives in this namespace. */
+namespace guestProp {
+
+/*
+ * The service functions which are callable by host.
+ */
+enum eHostFn
+{
+    /** Pass the address of the cfgm node used by the service as a database. */
+    SET_CFGM_NODE = 1,
+    /** 
+     * Get the value attached to a configuration property key
+     * The parameter format matches that of GET_CONFIG_KEY. 
+     */
+    GET_CONFIG_KEY_HOST = 2,
+    /** 
+     * Set the value attached to a configuration property key
+     * The parameter format matches that of SET_CONFIG_KEY.
+     */
+    SET_CONFIG_KEY_HOST = 3,
+    /** 
+     * Remove the value attached to a configuration property key
+     * The parameter format matches that of DEL_CONFIG_KEY.
+     */
+    DEL_CONFIG_KEY_HOST = 4
+};
+
+/**
+ * The service functions which are called by guest.  The numbers may not change,
+ * so we hardcode them.
+ */
+enum eGuestFn
+{
+    /** Get a guest property */
+    GET_PROP = 1,
+    /** Set a guest property */
+    SET_PROP = 2,
+    /** Set just the value of a guest property */
+    SET_PROP_VALUE = 3,
+    /** Delete a guest property */
+    DEL_PROP = 4,
+    /** Enumerate guest properties */
+    ENUM_PROPS = 5
+};
+
+/** Prefix for extra data keys used by the get and set key value functions */
+#define VBOX_SHARED_INFO_KEY_PREFIX          "Guest/"
+/** Helper macro for the length of the prefix VBOX_SHARED_INFO_KEY_PREFIX */
+#define VBOX_SHARED_INFO_PREFIX_LEN          (sizeof(VBOX_SHARED_INFO_KEY_PREFIX) - 1)
+/** Maximum length for property names */
+enum { MAX_NAME_LEN = 64 };
+/** Maximum length for property values */
+enum { MAX_VALUE_LEN = 128 };
+/** Maximum length for extra data key values used by the get and set key value functions */
+enum { MAX_FLAGS_LEN = 128 };
+/** Maximum number of properties per guest */
+enum { MAX_KEYS = 256 };
+
+/**
+ * HGCM parameter structures.  Packing is explicitly defined as this is a wire format.
+ */
+#pragma pack (1)
+/** The guest is requesting the value of a property */
+typedef struct _GetProperty
+{
+    VBoxGuestHGCMCallInfo hdr;
+
+    /**
+     * The property name (IN pointer)
+     * This must fit to a number of criteria, namely
+     *  - Only Utf8 strings are allowed
+     *  - Less than or equal to MAX_NAME_LEN bytes in length
+     *  - Zero terminated
+     */
+    HGCMFunctionParameter name;
+
+    /**
+     * The returned string data will be placed here.  (OUT pointer)
+     * This call returns two null-terminated strings which will be placed one
+     * after another: value and flags.
+     */
+    HGCMFunctionParameter buffer;
+
+    /**
+     * The property timestamp.  (OUT uint64_t)
+     */
+
+    HGCMFunctionParameter timestamp;
+
+    /**
+     * If the buffer provided was large enough this will contain the size of
+     * the returned data.  Otherwise it will contain the size of the buffer
+     * needed to hold the data and VERR_BUFFER_OVERFLOW will be returned.
+     * (OUT uint32_t)
+     */
+    HGCMFunctionParameter size;
+} GetProperty;
+
+/** The guest is requesting to change a property */
+typedef struct _SetProperty
+{
+    VBoxGuestHGCMCallInfo hdr;
+
+    /**
+     * The property key.  (IN pointer)
+     * This must fit to a number of criteria, namely
+     *  - Only Utf8 strings are allowed
+     *  - Less than or equal to MAX_NAME_LEN bytes in length
+     *  - Zero terminated
+     */
+    HGCMFunctionParameter name;
+
+    /**
+     * The value of the property (IN pointer)
+     * Criteria as for the key parameter, but with length less than or equal to
+     * MAX_VALUE_LEN.  
+     */
+    HGCMFunctionParameter value;
+
+    /**
+     * The property flags (IN pointer)
+     * This is a comma-separated list of the format flag=value
+     * The length must be less than or equal to MAX_FLAGS_LEN and only
+     * known flag names and values will be accepted.
+     */
+    HGCMFunctionParameter flags;
+} SetProperty;
+
+/** The guest is requesting to change the value of a property */
+typedef struct _SetPropertyValue
+{
+    VBoxGuestHGCMCallInfo hdr;
+
+    /**
+     * The property key.  (IN pointer)
+     * This must fit to a number of criteria, namely
+     *  - Only Utf8 strings are allowed
+     *  - Less than or equal to MAX_NAME_LEN bytes in length
+     *  - Zero terminated
+     */
+    HGCMFunctionParameter name;
+
+    /**
+     * The value of the property (IN pointer)
+     * Criteria as for the key parameter, but with length less than or equal to
+     * MAX_VALUE_LEN.  
+     */
+    HGCMFunctionParameter value;
+} SetPropertyValue;
+
+/** The guest is requesting to remove a property */
+typedef struct _DelProperty
+{
+    VBoxGuestHGCMCallInfo hdr;
+
+    /**
+     * The property name.  This must fit to a number of criteria, namely
+     *  - Only Utf8 strings are allowed
+     *  - Less than or equal to MAX_NAME_LEN bytes in length
+     *  - Zero terminated
+     */
+    HGCMFunctionParameter name;
+} DelProperty;
+
+/** The guest is requesting to enumerate properties */
+typedef struct _EnumProperties
+{
+    VBoxGuestHGCMCallInfo hdr;
+
+    /**
+     * Null-separated array of patterns to match the properties against.
+     * (IN pointer)
+     * If no patterns are given then return all.
+     */
+    HGCMFunctionParameter patterns;
+    /**
+     * Null-separated array of strings in which the properties are returned.
+     * (OUT pointer)
+     * The number of strings in the array is always a multiple of four,
+     * and in sequences of name, value, timestamp (hexadecimal string) and the
+     * flags as a comma-separated list in the format "name=value"
+     */
+    HGCMFunctionParameter strings;
+} EnumProperties;
+#pragma pack ()
+
+} /* namespace guestProp */
+
+#endif  /* ___VBox_HostService_GuestPropertySvc_h defined */
Index: trunk/include/VBox/HostServices/VBoxInfoSvc.h
===================================================================
--- trunk/include/VBox/HostServices/VBoxInfoSvc.h	(revision 10788)
+++ 	(revision )
@@ -1,152 +1,0 @@
-/** @file
- * Shared information services:
- * Common header for host service and guest clients.
- */
-
-/*
- * Copyright (C) 2006-2007 Sun Microsystems, Inc.
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
- * Clara, CA 95054 USA or visit http://www.sun.com if you need
- * additional information or have any questions.
- */
-
-#ifndef ___VBox_HostService_VBoxSharedInfoSvc_h
-#define ___VBox_HostService_VBoxSharedInfoSvc_h
-
-#include <VBox/types.h>
-#include <VBox/VBoxGuest.h>
-#include <VBox/hgcmsvc.h>
-
-/** Everything defined in this file lives in this namespace. */
-namespace svcInfo {
-
-/*
- * The service functions which are callable by host.
- */
-enum eHostFn
-{
-    /** Pass the address of the console object from Main to the service */
-    SET_CFGM_NODE = 1,
-    /** 
-     * Get the value attached to a configuration property key
-     * The parameter format matches that of GET_CONFIG_KEY. 
-     */
-    GET_CONFIG_KEY_HOST = 2,
-    /** 
-     * Set the value attached to a configuration property key
-     * The parameter format matches that of SET_CONFIG_KEY.
-     */
-    SET_CONFIG_KEY_HOST = 3,
-    /** 
-     * Remove the value attached to a configuration property key
-     * The parameter format matches that of DEL_CONFIG_KEY.
-     */
-    DEL_CONFIG_KEY_HOST = 4
-};
-
-/**
- * The service functions which are called by guest.  The numbers may not change,
- * so we hardcode them.
- */
-enum eGuestFn
-{
-    /** Get the value attached to a configuration property key */
-    GET_CONFIG_KEY = 1,
-    /** Set the value attached to a configuration property key */
-    SET_CONFIG_KEY = 2,
-    /** Remove the value attached to a configuration property key */
-    DEL_CONFIG_KEY = 3
-};
-
-/** Prefix for extra data keys used by the get and set key value functions */
-#define VBOX_SHARED_INFO_KEY_PREFIX          "Guest/"
-/** Helper macro for the length of the prefix VBOX_SHARED_INFO_KEY_PREFIX */
-#define VBOX_SHARED_INFO_PREFIX_LEN          (sizeof(VBOX_SHARED_INFO_KEY_PREFIX) - 1)
-/** Maximum length for extra data keys used by the get and set key value functions */
-enum { KEY_MAX_LEN = 64 };
-/** Maximum length for extra data key values used by the get and set key value functions */
-enum { KEY_MAX_VALUE_LEN = 128 };
-/** Maximum number of extra data keys per guest */
-enum { KEY_MAX_KEYS = 256 };
-
-/**
- * HGCM parameter structures.  Packing is explicitly defined as this is a wire format.
- */
-#pragma pack (1)
-/** The guest is requesting the value of a configuration key */
-typedef struct _GetConfigKey
-{
-    VBoxGuestHGCMCallInfo hdr;
-
-    /**
-     * The key to look up (IN pointer)
-     * This must fit to a number of criteria, namely
-     *  - Only ASCII characters with no spaces
-     *  - Less than or equal to VBOX_SHARED_INFO_KEY_MAX_LEN bytes in length
-     *  - Zero terminated
-     */
-    HGCMFunctionParameter key;
-
-    /**
-     * The value of the key (OUT pointer)
-     */
-    HGCMFunctionParameter value;
-
-    /**
-     * The size of the value.  If this is greater than the size of the array
-     * supplied in the second parameter then no data was transferred and the
-     * call must be repeated.  If it is zero then no value was found.
-     * (OUT uint32_t)
-     */
-    HGCMFunctionParameter size;
-} GetConfigKey;
-
-/** The guest is requesting to change the value of a configuration key */
-typedef struct _SetConfigKey
-{
-    VBoxGuestHGCMCallInfo hdr;
-
-    /**
-     * The key to change up.  This must fit to a number of criteria, namely
-     *  - Only ASCII characters with no spaces
-     *  - Less than or equal to VBOX_SHARED_INFO_KEY_MAX_LEN bytes in length
-     *  - Zero terminated
-     */
-    HGCMFunctionParameter key;
-
-    /**
-     * The value of the key (IN pointer)
-     * Criteria as for the key parameter, but with length less that or equal to
-     * VBOX_SHARED_INFO_KEY_MAX_VALUE_LEN.  A null pointer causes the value to
-     * be removed from the database.
-     */
-    HGCMFunctionParameter value;
-} SetConfigKey;
-
-/** The guest is requesting to remove a configuration key */
-typedef struct _DelConfigKey
-{
-    VBoxGuestHGCMCallInfo hdr;
-
-    /**
-     * The key to change up.  This must fit to a number of criteria, namely
-     *  - Only ASCII characters with no spaces
-     *  - Less than or equal to VBOX_SHARED_INFO_KEY_MAX_LEN bytes in length
-     *  - Zero terminated
-     */
-    HGCMFunctionParameter key;
-} DelConfigKey;
-#pragma pack ()
-
-} /* namespace svcInfo */
-
-#endif  /* ___VBox_HostService_VBoxSharedInfoSvc_h defined */
Index: trunk/include/VBox/VBoxGuest.h
===================================================================
--- trunk/include/VBox/VBoxGuest.h	(revision 10788)
+++ trunk/include/VBox/VBoxGuest.h	(revision 10797)
@@ -1528,13 +1528,17 @@
 /** @}  */
 
-#ifdef VBOX_WITH_INFO_SVC
-/** @name Information Services
+#ifdef VBOX_WITH_GUEST_PROPS
+/** @name Guest properties
  * @{ */
-VBGLR3DECL(int)     VbglR3InfoSvcConnect(uint32_t *pu32ClientId);
-VBGLR3DECL(int)     VbglR3InfoSvcDisconnect(uint32_t u32ClientId);
-VBGLR3DECL(int)     VbglR3InfoSvcWriteKey(uint32_t u32ClientId, char *pszKey, char *pszValue);
-VBGLR3DECL(int)     VbglR3InfoSvcReadKey(uint32_t u32ClientId, char *pszKey, char *pszValue, uint32_t cbValue, uint32_t *pcbActual);
+VBGLR3DECL(int)     VbglR3GuestPropConnect(uint32_t *pu32ClientId);
+VBGLR3DECL(int)     VbglR3GuestPropDisconnect(uint32_t u32ClientId);
+VBGLR3DECL(int)     VbglR3GuestPropWrite(uint32_t u32ClientId, char *pszName, char *pszValue, char *pszFlags);
+VBGLR3DECL(int)     VbglR3GuestPropWriteValue(uint32_t u32ClientId, char *pszName, char *pszValue);
+VBGLR3DECL(int)     VbglR3GuestPropRead(uint32_t u32ClientId, const char *pszName, void *pvBuf, uint32_t cbBuf, char **ppszValue, uint64_t *pu64Timestamp, char **ppszFlags, uint32_t *pcbBufActual);
+VBGLR3DECL(int)     VbglR3GuestPropReadValue(uint32_t ClientId, const char *pszName, char *pszValue, uint32_t cchValue, uint32_t *pcchValueActual);
+VBGLR3DECL(int)     VbglR3GuestPropReadValueAlloc(uint32_t u32ClientId, const char *pszName, char **ppszValue);
+VBGLR3DECL(void)    VbglR3GuestPropReadValueFree(char *pszValue);
 /** @}  */
-#endif /* VBOX_WITH_INFO_SVC defined */
+#endif /* VBOX_WITH_GUEST_PROPS defined */
 
 
