VirtualBox

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

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

cbinding: Added the functions to get and set the environment variables.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1/* $Revision: 16684 $ */
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/* Getting and Setting the Enviornment Variables */
59VBOXXPCOMC_DECL(const char*) VBoxGetEnv(const char *pszVar);
60VBOXXPCOMC_DECL(int) VBoxSetEnv(const char *pszVar, const char *pszValue);
61
62#ifdef __cplusplus
63}
64#endif
65
66#endif /* !___cbinding_h */
67
Note: See TracBrowser for help on using the repository browser.

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