libcdio  0.90
udf_time.h
Go to the documentation of this file.
00001 /*  
00002     Copyright (C) 2005, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
00003 
00004     This program is free software: you can redistribute it and/or modify
00005     it under the terms of the GNU General Public License as published by
00006     the Free Software Foundation, either version 3 of the License, or
00007     (at your option) any later version.
00008 
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU General Public License for more details.
00013 
00014     You should have received a copy of the GNU General Public License
00015     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016 */
00017 
00025 #ifndef UDF_TIME_H
00026 #define UDF_TIME_H 
00027 
00028 #include <time.h>
00029 
00030 #if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
00031 struct timespec {
00032   time_t  tv_sec;   /* Seconds */
00033   long    tv_nsec;  /* Nanoseconds */
00034 };
00035 #endif
00036 
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif /* __cplusplus */
00040 
00044   time_t udf_get_access_time(const udf_dirent_t *p_udf_dirent);
00045 
00049   time_t udf_get_attribute_time(const udf_dirent_t *p_udf_dirent);
00050 
00054   time_t udf_get_modification_time(const udf_dirent_t *p_udf_dirent);
00055 
00059   udf_timestamp_t *udf_get_access_timestamp(const udf_dirent_t *p_udf_dirent);
00060 
00064   udf_timestamp_t *udf_get_modification_timestamp(const udf_dirent_t 
00065                                                   *p_udf_dirent);
00066 
00070   udf_timestamp_t *udf_get_attr_timestamp(const udf_dirent_t *p_udf_dirent);
00071 
00075   time_t *udf_stamp_to_time(time_t *dest, long int *dest_usec, 
00076                           const udf_timestamp_t src);
00077 
00078   udf_timestamp_t *udf_timespec_to_stamp(const struct timespec ts,
00079                                          udf_timestamp_t *dest);
00080 
00081 #ifdef __cplusplus
00082 }
00083 #endif /* __cplusplus */
00084 
00085 #endif /*UDF_TIME_H*/