summaryrefslogtreecommitdiff
path: root/common/quicktime_win32/UTCUtils.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /common/quicktime_win32/UTCUtils.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'common/quicktime_win32/UTCUtils.h')
-rw-r--r--common/quicktime_win32/UTCUtils.h207
1 files changed, 207 insertions, 0 deletions
diff --git a/common/quicktime_win32/UTCUtils.h b/common/quicktime_win32/UTCUtils.h
new file mode 100644
index 0000000..f2f9c2b
--- /dev/null
+++ b/common/quicktime_win32/UTCUtils.h
@@ -0,0 +1,207 @@
+/*
+ File: UTCUtils.h
+
+ Contains: Interface for UTC to Local Time conversion and 64 Bit Clock routines
+
+ Version: QuickTime 7.3
+
+ Copyright: (c) 2007 (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __UTCUTILS__
+#define __UTCUTILS__
+
+#ifndef __MACTYPES__
+#include <MacTypes.h>
+#endif
+
+#ifndef __MACERRORS__
+#include <MacErrors.h>
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Options for Set & Get DateTime Routines */
+enum {
+ kUTCDefaultOptions = 0
+};
+
+/* 64 Bit Clock Typedefs */
+struct UTCDateTime {
+ UInt16 highSeconds;
+ UInt32 lowSeconds;
+ UInt16 fraction;
+};
+typedef struct UTCDateTime UTCDateTime;
+typedef UTCDateTime * UTCDateTimePtr;
+typedef UTCDateTimePtr * UTCDateTimeHandle;
+struct LocalDateTime {
+ UInt16 highSeconds;
+ UInt32 lowSeconds;
+ UInt16 fraction;
+};
+typedef struct LocalDateTime LocalDateTime;
+typedef LocalDateTime * LocalDateTimePtr;
+typedef LocalDateTimePtr * LocalDateTimeHandle;
+/* Classic 32 bit clock conversion routines */
+/*
+ * ConvertLocalTimeToUTC()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ */
+EXTERN_API_C( OSStatus )
+ConvertLocalTimeToUTC(
+ UInt32 localSeconds,
+ UInt32 * utcSeconds);
+
+
+/*
+ * ConvertUTCToLocalTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ */
+EXTERN_API_C( OSStatus )
+ConvertUTCToLocalTime(
+ UInt32 utcSeconds,
+ UInt32 * localSeconds);
+
+
+/* 64 bit clock conversion routines */
+/*
+ * ConvertUTCToLocalDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ */
+EXTERN_API_C( OSStatus )
+ConvertUTCToLocalDateTime(
+ const UTCDateTime * utcDateTime,
+ LocalDateTime * localDateTime);
+
+
+/*
+ * ConvertLocalToUTCDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ */
+EXTERN_API_C( OSStatus )
+ConvertLocalToUTCDateTime(
+ const LocalDateTime * localDateTime,
+ UTCDateTime * utcDateTime);
+
+
+/* Getter and Setter Clock routines using 64 Bit values */
+/*
+ * GetUTCDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ */
+EXTERN_API_C( OSStatus )
+GetUTCDateTime(
+ UTCDateTime * utcDateTime,
+ OptionBits options);
+
+
+/*
+ * SetUTCDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ */
+EXTERN_API_C( OSStatus )
+SetUTCDateTime(
+ const UTCDateTime * utcDateTime,
+ OptionBits options);
+
+
+/*
+ * GetLocalDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ */
+EXTERN_API_C( OSStatus )
+GetLocalDateTime(
+ LocalDateTime * localDateTime,
+ OptionBits options);
+
+
+/*
+ * SetLocalDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ */
+EXTERN_API_C( OSStatus )
+SetLocalDateTime(
+ const LocalDateTime * localDateTime,
+ OptionBits options);
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __UTCUTILS__ */
+