tstLinuxC.c revision 1535d40f060d08b2b999d3921de32081928da83b
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* $Revision$ */
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Demonstrator program to illustrate use of C bindings of Main API.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Linux only at the moment due to shared library magic in the Makefile.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Copyright (C) 2009 Sun Microsystems, Inc.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
45e9809aff7304721fddb95654901b32195c9c7avboxsync * available from http://www.virtualbox.org. This file is free software;
45e9809aff7304721fddb95654901b32195c9c7avboxsync * you can redistribute it and/or modify it under the terms of the GNU
45e9809aff7304721fddb95654901b32195c9c7avboxsync * General Public License (GPL) as published by the Free Software
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
45e9809aff7304721fddb95654901b32195c9c7avboxsync * additional information or have any questions.
45e9809aff7304721fddb95654901b32195c9c7avboxsyncstatic void listVMs(IVirtualBox *virtualBox, ISession *session);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncstatic void startVM(IVirtualBox *virtualBox, ISession *session, nsID *id);
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Helper function to convert an nsID into a human readable string.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * @returns result string, allocated. Has to be freed using free()
45e9809aff7304721fddb95654901b32195c9c7avboxsync * @param guid Pointer to nsID that will be converted.
return res;
PRUint32 i;
unsigned start_id;
(unsigned)rc);
if (machineCnt == 0)
for (i = 0; i < machineCnt; ++i)
if (!machine)
if (isAccessible)
char *machineName;
char *uuidString;
if (isAccessible)
char *osName;
if (machine)
for (i = 0; i < machineCnt; ++i)
if (machine)
id,
env,
char *text;
return EXIT_FAILURE;
return EXIT_FAILURE;