Index: trunk/src/VBox/Main/cbinding/Makefile.kmk
===================================================================
--- trunk/src/VBox/Main/cbinding/Makefile.kmk	(revision 16454)
+++ trunk/src/VBox/Main/cbinding/Makefile.kmk	(revision 16483)
@@ -34,5 +34,5 @@
 XpComCSamples_SOURCES = \
 	tstLinuxC.c \
-	tstLinuxC.h \
+	cbinding.h \
 	makefile.tstLinuxC=>Makefile
 
Index: trunk/src/VBox/Main/cbinding/cbinding.h
===================================================================
--- trunk/src/VBox/Main/cbinding/cbinding.h	(revision 16483)
+++ trunk/src/VBox/Main/cbinding/cbinding.h	(revision 16483)
@@ -0,0 +1,60 @@
+/** @file cbinding.h
+ *
+ * C binding for XPCOM.
+ *
+ * $Id$
+ */
+
+#ifndef __cbinding_h__
+#define __cbinding_h__
+
+/*
+ * Copyright (C) 2009 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.
+ */
+
+#ifdef __cplusplus
+# include "VirtualBox_XPCOM.h"
+#else
+# include "VirtualBox_CXPCOM.h"
+#endif
+
+#ifdef IN_VBOXXPCOMC
+# define VBOXXPCOMC_DECL(type)  PR_EXPORT(type)
+#else
+# define VBOXXPCOMC_DECL(type)  PR_IMPORT(type)
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+VBOXXPCOMC_DECL(void) VBoxComInitialize(IVirtualBox **virtualBox, ISession **session);
+VBOXXPCOMC_DECL(void) VBoxComUninitialize(void);
+VBOXXPCOMC_DECL(void) VBoxComUnallocStr(PRUnichar *str_dealloc);
+VBOXXPCOMC_DECL(void) VBoxComUnallocIID(nsIID *iid);
+VBOXXPCOMC_DECL(const char *) VBoxConvertPRUnichartoAscii(PRUnichar *src);
+VBOXXPCOMC_DECL(const PRUnichar *) VBoxConvertAsciitoPRUnichar(char *src);
+VBOXXPCOMC_DECL(const PRUnichar *) VBoxConvertUTF8toPRUnichar(char *src);
+VBOXXPCOMC_DECL(const char *) VBoxConvertPRUnichartoUTF8(PRUnichar *src);
+VBOXXPCOMC_DECL(int)  VBoxStrToUtf16(const char *pszString, PRUnichar **ppwszString);
+VBOXXPCOMC_DECL(int)  VBoxUtf16ToUtf8(const PRUnichar *pszString, char **ppwszString);
+VBOXXPCOMC_DECL(void) VBoxUtf16Free(PRUnichar *pwszString);
+VBOXXPCOMC_DECL(void) VBoxStrFree(char *pszString);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __cbinding_h__ */
Index: trunk/src/VBox/Main/cbinding/libXPCOMtoC.cpp
===================================================================
--- trunk/src/VBox/Main/cbinding/libXPCOMtoC.cpp	(revision 16454)
+++ trunk/src/VBox/Main/cbinding/libXPCOMtoC.cpp	(revision 16483)
@@ -1,2 +1,25 @@
+/** @file libXPCOMtoC.cpp
+ *
+ * Utility functions to use with the C binding for XPCOM.
+ *
+ * $Id$
+ */
+
+/*
+ * Copyright (C) 2009 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.
+ */
+
 #include <iostream>
 #include <iomanip>
@@ -10,5 +33,5 @@
 
 #include "VirtualBox_XPCOM.h"
-#include "tstLinuxC.h"
+#include "cbinding.h"
 
 using namespace std;
Index: trunk/src/VBox/Main/cbinding/makefile.tstLinuxC
===================================================================
--- trunk/src/VBox/Main/cbinding/makefile.tstLinuxC	(revision 16454)
+++ trunk/src/VBox/Main/cbinding/makefile.tstLinuxC	(revision 16483)
@@ -1,3 +1,23 @@
 # $Id: Makefile 42209 2009-01-29 12:22:10Z jens $
+#
+## @file makefile.tstLinuxC
+#
+# Makefile for sample program illustrating use of C binding for XPCOM.
+
+#
+# Copyright (C) 2009 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.
+#
 
 PATH_XPCOM = ../..
@@ -24,5 +44,5 @@
 	$(CC) -o $@ $^ -Xlinker -rpath -Xlinker $(PATH_BIN) $(PATH_BIN)/VBoxXPCOMC.so
 
-tstLinuxC.o: tstLinuxC.c tstLinuxC.h
+tstLinuxC.o: tstLinuxC.c cbinding.h
 	$(CC) $(CFLAGS) -DRT_OS_LINUX -DMOZ_UNICODE $(INCS_XPCOM) -o $@ -c $<
 
Index: trunk/src/VBox/Main/cbinding/tstLinuxC.c
===================================================================
--- trunk/src/VBox/Main/cbinding/tstLinuxC.c	(revision 16454)
+++ trunk/src/VBox/Main/cbinding/tstLinuxC.c	(revision 16483)
@@ -5,4 +5,20 @@
  *
  * $Id$
+ */
+
+/*
+ * Copyright (C) 2009 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.
  */
 
@@ -11,5 +27,5 @@
 #include <stdlib.h>
 #include <iconv.h>
-#include "tstLinuxC.h"
+#include "cbinding.h"
 
 static char *nsIDToString(nsID *guid);
Index: trunk/src/VBox/Main/cbinding/tstLinuxC.h
===================================================================
--- trunk/src/VBox/Main/cbinding/tstLinuxC.h	(revision 16454)
+++ 	(revision )
@@ -1,37 +1,0 @@
-#ifndef __tstLinuxC_h__
-#define __tstLinuxC_h__
-
-#ifdef __cplusplus
-# include "VirtualBox_XPCOM.h"
-#else
-# include "VirtualBox_CXPCOM.h"
-#endif
-
-#ifdef IN_VBOXXPCOMC
-# define VBOXXPCOMC_DECL(type)  PR_EXPORT(type)
-#else
-# define VBOXXPCOMC_DECL(type)  PR_IMPORT(type)
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-VBOXXPCOMC_DECL(void) VBoxComInitialize(IVirtualBox **virtualBox, ISession **session);
-VBOXXPCOMC_DECL(void) VBoxComUninitialize(void);
-VBOXXPCOMC_DECL(void) VBoxComUnallocStr(PRUnichar *str_dealloc);
-VBOXXPCOMC_DECL(void) VBoxComUnallocIID(nsIID *iid);
-VBOXXPCOMC_DECL(const char *) VBoxConvertPRUnichartoAscii(PRUnichar *src);
-VBOXXPCOMC_DECL(const PRUnichar *) VBoxConvertAsciitoPRUnichar(char *src);
-VBOXXPCOMC_DECL(const PRUnichar *) VBoxConvertUTF8toPRUnichar(char *src);
-VBOXXPCOMC_DECL(const char *) VBoxConvertPRUnichartoUTF8(PRUnichar *src);
-VBOXXPCOMC_DECL(int)  VBoxStrToUtf16(const char *pszString, PRUnichar **ppwszString);
-VBOXXPCOMC_DECL(int)  VBoxUtf16ToUtf8(const PRUnichar *pszString, char **ppwszString);
-VBOXXPCOMC_DECL(void) VBoxUtf16Free(PRUnichar *pwszString);
-VBOXXPCOMC_DECL(void) VBoxStrFree(char *pszString);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __tstLinuxC_h__ */
