MarshallingHelpers.h [plain text]
#ifndef MarshallingHelpers_H
#define MarshallingHelpers_H
#include <wtf/Forward.h>
#include <CoreFoundation/CoreFoundation.h>
namespace WebCore {
class IntRect;
class URL;
}
class MarshallingHelpers
{
public:
static WebCore::URL BSTRToKURL(BSTR);
static BSTR URLToBSTR(const WebCore::URL&);
static CFURLRef PathStringToFileCFURLRef(const WTF::String&);
static WTF::String FileCFURLRefToPathString(CFURLRef fileURL);
static CFURLRef BSTRToCFURLRef(BSTR);
static CFStringRef BSTRToCFStringRef(BSTR);
static CFStringRef LPCOLESTRToCFStringRef(LPCOLESTR);
static BSTR CFStringRefToBSTR(CFStringRef);
static int CFNumberRefToInt(CFNumberRef);
static CFNumberRef intToCFNumberRef(int);
static CFAbsoluteTime DATEToCFAbsoluteTime(DATE);
static DATE CFAbsoluteTimeToDATE(CFAbsoluteTime);
static SAFEARRAY* stringArrayToSafeArray(CFArrayRef);
static SAFEARRAY* intArrayToSafeArray(CFArrayRef);
static SAFEARRAY* intRectToSafeArray(const WebCore::IntRect&);
static SAFEARRAY* iunknownArrayToSafeArray(CFArrayRef);
static CFArrayRef safeArrayToStringArray(SAFEARRAY*);
static CFArrayRef safeArrayToIntArray(SAFEARRAY*);
static CFArrayRef safeArrayToIUnknownArray(SAFEARRAY*);
static const void* IUnknownRetainCallback(CFAllocatorRef, const void*);
static void IUnknownReleaseCallback(CFAllocatorRef, const void*);
static CFArrayCallBacks kIUnknownArrayCallBacks;
static CFDictionaryValueCallBacks kIUnknownDictionaryValueCallBacks;
private:
static CFAbsoluteTime MarshallingHelpers::windowsEpochAbsoluteTime();
private:
MarshallingHelpers();
~MarshallingHelpers();
};
#endif