VirtualBox

source: vbox/trunk/src/VBox/Main/cbinding/cbinding.h@ 16524

Last change on this file since 16524 was 16497, checked in by vboxsync, 16 years ago

Fixed the String Conversion Functions and removed the ones
not necessary. Renamed the cpp file to match naming
convention in the Main. Handle the condition when no VM's
are present.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1/* $Revision: 16497 $ */
2/** @file cbinding.h
3 * C binding for XPCOM.
4 */
5
6#ifndef ___cbinding_h
7#define ___cbinding_h
8
9/*
10 * Copyright (C) 2009 Sun Microsystems, Inc.
11 *
12 * This file is part of VirtualBox Open Source Edition (OSE), as
13 * available from http://www.virtualbox.org. This file is free software;
14 * you can redistribute it and/or modify it under the terms of the GNU
15 * General Public License (GPL) as published by the Free Software
16 * Foundation, in version 2 as it comes in the "COPYING" file of the
17 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
18 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
19 *
20 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
21 * Clara, CA 95054 USA or visit http://www.sun.com if you need
22 * additional information or have any questions.
23 */
24
25#ifdef __cplusplus
26# include "VirtualBox_XPCOM.h"
27#else
28# include "VirtualBox_CXPCOM.h"
29#endif
30
31#ifdef IN_VBOXXPCOMC
32# define VBOXXPCOMC_DECL(type) PR_EXPORT(type)
33#else
34# define VBOXXPCOMC_DECL(type) PR_IMPORT(type)
35#endif
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41/* Initialize/Uninitialize XPCOM. */
42VBOXXPCOMC_DECL(void) VBoxComInitialize(IVirtualBox **virtualBox, ISession **session);
43VBOXXPCOMC_DECL(void) VBoxComUninitialize(void);
44
45/* Deallocation functions. */
46VBOXXPCOMC_DECL(void) VBoxComUnallocMem(void *ptr);
47VBOXXPCOMC_DECL(void) VBoxUtf16Free(PRUnichar *pwszString);
48VBOXXPCOMC_DECL(void) VBoxUtf8Free(char *pszString);
49
50/* Converting to and from ASCII. */
51VBOXXPCOMC_DECL(const char *) VBoxConvertPRUnichartoAscii(PRUnichar *src);
52VBOXXPCOMC_DECL(const PRUnichar *) VBoxConvertAsciitoPRUnichar(char *src);
53
54/* Converting to and from UTF-8 and UTF-16. */
55VBOXXPCOMC_DECL(int) VBoxUtf16ToUtf8(const PRUnichar *pwszString, char **ppszString);
56VBOXXPCOMC_DECL(int) VBoxUtf8ToUtf16(const char *pszString, PRUnichar **ppwszString);
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif /* !___cbinding_h */
63
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette