1 | /** @file cbinding.h
|
---|
2 | *
|
---|
3 | * C binding for XPCOM.
|
---|
4 | *
|
---|
5 | * $Id: cbinding.h 16483 2009-02-03 10:52:11Z vboxsync $
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef __cbinding_h__
|
---|
9 | #define __cbinding_h__
|
---|
10 |
|
---|
11 | /*
|
---|
12 | * Copyright (C) 2009 Sun Microsystems, Inc.
|
---|
13 | *
|
---|
14 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
15 | * available from http://www.virtualbox.org. This file is free software;
|
---|
16 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
17 | * General Public License (GPL) as published by the Free Software
|
---|
18 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
19 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
20 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
21 | *
|
---|
22 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
23 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
24 | * additional information or have any questions.
|
---|
25 | */
|
---|
26 |
|
---|
27 | #ifdef __cplusplus
|
---|
28 | # include "VirtualBox_XPCOM.h"
|
---|
29 | #else
|
---|
30 | # include "VirtualBox_CXPCOM.h"
|
---|
31 | #endif
|
---|
32 |
|
---|
33 | #ifdef IN_VBOXXPCOMC
|
---|
34 | # define VBOXXPCOMC_DECL(type) PR_EXPORT(type)
|
---|
35 | #else
|
---|
36 | # define VBOXXPCOMC_DECL(type) PR_IMPORT(type)
|
---|
37 | #endif
|
---|
38 |
|
---|
39 | #ifdef __cplusplus
|
---|
40 | extern "C" {
|
---|
41 | #endif
|
---|
42 |
|
---|
43 | VBOXXPCOMC_DECL(void) VBoxComInitialize(IVirtualBox **virtualBox, ISession **session);
|
---|
44 | VBOXXPCOMC_DECL(void) VBoxComUninitialize(void);
|
---|
45 | VBOXXPCOMC_DECL(void) VBoxComUnallocStr(PRUnichar *str_dealloc);
|
---|
46 | VBOXXPCOMC_DECL(void) VBoxComUnallocIID(nsIID *iid);
|
---|
47 | VBOXXPCOMC_DECL(const char *) VBoxConvertPRUnichartoAscii(PRUnichar *src);
|
---|
48 | VBOXXPCOMC_DECL(const PRUnichar *) VBoxConvertAsciitoPRUnichar(char *src);
|
---|
49 | VBOXXPCOMC_DECL(const PRUnichar *) VBoxConvertUTF8toPRUnichar(char *src);
|
---|
50 | VBOXXPCOMC_DECL(const char *) VBoxConvertPRUnichartoUTF8(PRUnichar *src);
|
---|
51 | VBOXXPCOMC_DECL(int) VBoxStrToUtf16(const char *pszString, PRUnichar **ppwszString);
|
---|
52 | VBOXXPCOMC_DECL(int) VBoxUtf16ToUtf8(const PRUnichar *pszString, char **ppwszString);
|
---|
53 | VBOXXPCOMC_DECL(void) VBoxUtf16Free(PRUnichar *pwszString);
|
---|
54 | VBOXXPCOMC_DECL(void) VBoxStrFree(char *pszString);
|
---|
55 |
|
---|
56 | #ifdef __cplusplus
|
---|
57 | }
|
---|
58 | #endif
|
---|
59 |
|
---|
60 | #endif /* __cbinding_h__ */
|
---|