mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
vbox: Introduce vboxUniformedPFN::GetException()
The GetException() method can be used to obtain the latest exception that occurred in VirtualBox. Calling the method does not reset the exception though. For that we'll need to call another method (introduced in following commit). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
2a690fc172
commit
52aefc9d31
@ -109,6 +109,7 @@ typedef unsigned long PRUword;
|
||||
|
||||
#define nsnull 0
|
||||
typedef PRUint32 nsresult;
|
||||
#define HRESULT nsresult
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ > 2)
|
||||
# define NS_LIKELY(x) (__builtin_expect((x), 1))
|
||||
@ -362,6 +363,7 @@ typedef nsISupports IHostNetworkInterface;
|
||||
typedef nsISupports IDHCPServer;
|
||||
typedef nsISupports IKeyboard;
|
||||
typedef nsISupports IVirtualBoxErrorInfo;
|
||||
typedef struct nsIException nsIException;
|
||||
|
||||
/* Macros for all vbox drivers. */
|
||||
|
||||
|
@ -481,6 +481,11 @@ static int _pfnUtf8ToUtf16(PCVBOXXPCOM pFuncs, const char *pszString, PRUnichar
|
||||
return pFuncs->pfnUtf8ToUtf16(pszString, ppwszString);
|
||||
}
|
||||
|
||||
static HRESULT _pfnGetException(PCVBOXXPCOM pFuncs, IErrorInfo **ppException)
|
||||
{
|
||||
return pFuncs->pfnGetException(ppException);
|
||||
}
|
||||
|
||||
static void _vboxIIDInitialize(vboxIID *iid)
|
||||
{
|
||||
memset(iid, 0, sizeof(vboxIID));
|
||||
@ -2218,6 +2223,7 @@ static vboxUniformedPFN _UPFN = {
|
||||
.Utf8Free = _pfnUtf8Free,
|
||||
.Utf16ToUtf8 = _pfnUtf16ToUtf8,
|
||||
.Utf8ToUtf16 = _pfnUtf8ToUtf16,
|
||||
.GetException = _pfnGetException,
|
||||
};
|
||||
|
||||
static vboxUniformedIID _UIID = {
|
||||
|
@ -109,6 +109,7 @@ typedef struct {
|
||||
void (*Utf8Free)(PCVBOXXPCOM pFuncs, char *pszString);
|
||||
int (*Utf16ToUtf8)(PCVBOXXPCOM pFuncs, const PRUnichar *pwszString, char **ppszString);
|
||||
int (*Utf8ToUtf16)(PCVBOXXPCOM pFuncs, const char *pszString, PRUnichar **ppwszString);
|
||||
HRESULT (*GetException)(PCVBOXXPCOM pFuncs, nsIException **ppException);
|
||||
} vboxUniformedPFN;
|
||||
|
||||
/* Functions for vboxIID */
|
||||
|
Loading…
Reference in New Issue
Block a user