From 3082e8da09e36e40c8f2f9ae238b489ccf2479c5 Mon Sep 17 00:00:00 2001 From: PHO Date: Mon, 11 Oct 2010 06:49:41 +0900 Subject: [PATCH] UTCUtils.h --- Bindings/CoreServices/CarbonCore/Aliases.hsc | 114 ++++++++++++++++++ Bindings/CoreServices/CarbonCore/UTCUtils.hsc | 35 ++++++ bindings-carbon-core.cabal | 2 + 3 files changed, 151 insertions(+) create mode 100644 Bindings/CoreServices/CarbonCore/Aliases.hsc create mode 100644 Bindings/CoreServices/CarbonCore/UTCUtils.hsc diff --git a/Bindings/CoreServices/CarbonCore/Aliases.hsc b/Bindings/CoreServices/CarbonCore/Aliases.hsc new file mode 100644 index 0000000..8a0676a --- /dev/null +++ b/Bindings/CoreServices/CarbonCore/Aliases.hsc @@ -0,0 +1,114 @@ +#include +#include + +module Bindings.CoreServices.CarbonCore.Aliases where +#strict_import +import Bindings.CoreServices.CarbonCore.MacTypes +import Bindings.CoreServices.CarbonCore.UTCUtils + +#synonym_t FSAliasInfoBitmap, +#num kFSAliasInfoNone +#num kFSAliasInfoVolumeCreateDate +#num kFSAliasInfoTargetCreateDate +#num kFSAliasInfoFinderInfo +#num kFSAliasInfoIsDirectory +#num kFSAliasInfoIDs +#num kFSAliasInfoFSInfo +#num kFSAliasInfoVolumeFlags + +#num rAliasType + +#num kARMMountVol +#num kARMNoUI +#num kARMMultVols +#num kARMSearch +#num kARMSearchMore +#num kARMSearchRelFirst +#num kARMTryFileIDFirst + +#num asiZoneName +#num asiServerName +#num asiVolumeName +#num asiAliasName +#num asiParentName + +#num kResolveAliasFileNoUI +#num kResolveAliasTryFileIDFirst + +#if __AL_USE_OPAQUE_RECORD__ +# starttype struct AliasRecord +# array_field hidden, +# stoptype +#else +# starttype struct AliasRecord +# field userType , +# field aliasSize, CUShort +# stoptype +#endif +#synonym_t AliasPtr , Ptr +#synonym_t AliasHandle, Ptr + +#starttype struct FSAliasInfo +# field volumeCreateDate, +# field targetCreateDate, +# field fileType , +# field fileCreator , +# field parentDirID , +# field nodeID , +# field filesystemID , +# field signature , +# field volumeIsBootVolume , +# field volumeIsAutomounted, +# field volumeIsEjectable , +# field volumeHasPersistentFileIDs, +# field isDirectory , +#stoptype +#synonym_t FSAliasInfoPtr, Ptr +#integral_t AliasInfoType + +#if !__LP64__ +# callback AlisFilterProcPtr, -> Ptr -> -> IO +# synonym_t AlisFilterUPP , +#endif + +#callback FSAliasFilterProcPtr, Ptr -> Ptr -> -> IO + +#ccall FSNewAlias , Ptr -> Ptr -> Ptr -> IO +#ccall FSNewAliasMinimal , Ptr -> Ptr -> IO +#ccall FSIsAliasFile , Ptr -> Ptr -> Ptr -> IO +#ccall FSResolveAliasWithMountFlags, Ptr -> -> Ptr -> Ptr -> CULong -> IO +#ccall FSResolveAlias , Ptr -> -> Ptr -> Ptr -> IO +#ccall FSResolveAliasFileWithMountFlags, Ptr -> -> Ptr -> Ptr -> CULong -> IO +#ccall FSResolveAliasFile , Ptr -> -> Ptr -> Ptr -> IO +#ccall FSFollowFinderAlias, Ptr -> -> -> Ptr -> Ptr -> IO +#ccall FSUpdateAlias , Ptr -> Ptr -> -> Ptr -> IO +#ccall FSNewAliasUnicode , Ptr -> Ptr -> -> Ptr -> Ptr -> Ptr -> IO +#ccall FSNewAliasMinimalUnicode, Ptr -> -> Ptr -> Ptr -> Ptr -> IO +#ccall FSNewAliasFromPath , Ptr CChar -> Ptr CChar -> -> Ptr -> Ptr -> IO +#ccall FSMatchAliasBulk , Ptr -> CULong -> -> Ptr CShort -> Ptr -> Ptr -> -> Ptr () -> IO +#ccall FSCopyAliasInfo , -> Ptr -> Ptr -> Ptr -> Ptr -> Ptr -> IO +#ccall GetAliasSize , -> IO +#ccall GetAliasUserType , -> IO +#ccall SetAliasUserType , -> -> IO () +#ccall GetAliasSizeFromPtr, Ptr -> IO +#ccall GetAliasUserTypeFromPtr, Ptr -> IO +#ccall SetAliasUserTypeWithPtr, -> -> IO () + +#if !__LP64__ +# ccall FSMatchAlias , Ptr -> CULong -> -> Ptr CShort -> Ptr -> Ptr -> -> Ptr () -> IO +# ccall FSMatchAliasNoUI , Ptr -> CULong -> -> Ptr CShort -> Ptr -> Ptr -> -> Ptr () -> IO +# ccall NewAlias , Ptr -> Ptr -> Ptr -> IO +# ccall NewAliasMinimal , Ptr -> Ptr -> IO +# ccall NewAliasMinimalFromFullPath, CShort -> Ptr () -> -> -> Ptr -> IO +# ccall ResolveAlias , Ptr -> -> Ptr -> Ptr -> IO +# ccall GetAliasInfo , -> -> -> IO +# ccall IsAliasFile , Ptr -> Ptr -> Ptr -> IO +# ccall ResolveAliasWithMountFlags, Ptr -> -> Ptr -> Ptr -> CULong -> IO +# ccall ResolveAliasFile , Ptr -> -> Ptr -> Ptr -> IO +# ccall ResolveAliasFileWithMountFlags, Ptr -> -> Ptr -> Ptr -> CULong -> IO +# ccall FollowFinderAlias, Ptr -> -> -> Ptr -> Ptr -> IO +# ccall UpdateAlias , Ptr -> Ptr -> -> Ptr -> IO +# ccall MatchAlias , Ptr -> CULong -> -> Ptr CShort -> -> Ptr -> -> Ptr () -> IO +# ccall ResolveAliasFileWithMountFlagsNoUI, Ptr -> -> Ptr -> Ptr -> CLong -> IO +# ccall MatchAliasNoUI , Ptr -> CULong -> -> Ptr CShort -> -> Ptr -> -> Ptr () -> IO +#endif \ No newline at end of file diff --git a/Bindings/CoreServices/CarbonCore/UTCUtils.hsc b/Bindings/CoreServices/CarbonCore/UTCUtils.hsc new file mode 100644 index 0000000..0115a52 --- /dev/null +++ b/Bindings/CoreServices/CarbonCore/UTCUtils.hsc @@ -0,0 +1,35 @@ +#include +#include + +module Bindings.CoreServices.CarbonCore.UTCUtils where +#strict_import +import Bindings.CoreServices.CarbonCore.MacTypes + +#num kUTCDefaultOptions + +#starttype struct UTCDateTime +# field highSeconds, +# field lowSeconds , +# field fraction , +#stoptype +#synonym_t UTCDateTimePtr , Ptr +#synonym_t UTCDateTimeHandle, Ptr + +#starttype struct LocalDateTime +# field highSeconds, +# field lowSeconds , +# field fraction , +#stoptype +#synonym_t LocalDateTimePtr , Ptr +#synonym_t LocalDateTimeHandle, Ptr + +#if !__LP64__ +# ccall ConvertLocalTimeToUTC , -> Ptr -> IO +# ccall ConvertUTCToLocalTime , -> Ptr -> IO +# ccall ConvertUTCToLocalDateTime, Ptr -> Ptr -> IO +# ccall ConvertLocalToUTCDateTime, Ptr -> Ptr -> IO +# ccall GetUTCDateTime , Ptr -> -> IO +# ccall SetUTCDateTime , Ptr -> -> IO +# ccall GetLocalDateTime , Ptr -> -> IO +# ccall SetLocalDateTime , Ptr -> -> IO +#endif \ No newline at end of file diff --git a/bindings-carbon-core.cabal b/bindings-carbon-core.cabal index 90e7dd5..3143a72 100644 --- a/bindings-carbon-core.cabal +++ b/bindings-carbon-core.cabal @@ -31,7 +31,9 @@ Library Exposed-Modules: Bindings.CoreServices.CarbonCore.AIFF Bindings.CoreServices.CarbonCore.AVLTree + Bindings.CoreServices.CarbonCore.Aliases Bindings.CoreServices.CarbonCore.MacTypes + Bindings.CoreServices.CarbonCore.UTCUtils C-Sources: cbits/helper_aiff.c -- 2.40.0