1 | /* $Id: check3d.cpp 62530 2016-07-22 19:25:14Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * X11 guest client - 3D pass-through check.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2011-2016 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #include "VBoxClient.h"
|
---|
19 |
|
---|
20 | #include <VBox/VBoxGuestLib.h>
|
---|
21 |
|
---|
22 | #include <stdlib.h>
|
---|
23 |
|
---|
24 | static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised)
|
---|
25 | {
|
---|
26 | int rc;
|
---|
27 | HGCMCLIENTID cClientID;
|
---|
28 | LogFlowFunc(("\n"));
|
---|
29 |
|
---|
30 | NOREF(ppInterface);
|
---|
31 | NOREF(fDaemonised);
|
---|
32 | /* Initialise the guest library. */
|
---|
33 | rc = VbglR3InitUser();
|
---|
34 | if (RT_FAILURE(rc))
|
---|
35 | exit(1);
|
---|
36 | rc = VbglR3HGCMConnect("VBoxSharedCrOpenGL", &cClientID);
|
---|
37 | if (RT_FAILURE(rc))
|
---|
38 | exit(1);
|
---|
39 | VbglR3HGCMDisconnect(cClientID);
|
---|
40 | VbglR3Term();
|
---|
41 | LogFlowFunc(("returning %Rrc\n", rc));
|
---|
42 | return rc;
|
---|
43 | }
|
---|
44 |
|
---|
45 | static struct VBCLSERVICE g_vbclCheck3DInterface =
|
---|
46 | {
|
---|
47 | NULL,
|
---|
48 | VBClServiceDefaultHandler, /* init */
|
---|
49 | run,
|
---|
50 | VBClServiceDefaultCleanup
|
---|
51 | };
|
---|
52 | static struct VBCLSERVICE *g_pvbclCheck3DInterface = &g_vbclCheck3DInterface;
|
---|
53 |
|
---|
54 | /* Static factory */
|
---|
55 | struct VBCLSERVICE **VBClCheck3DService()
|
---|
56 | {
|
---|
57 | return &g_pvbclCheck3DInterface;
|
---|
58 | }
|
---|
59 |
|
---|