Blame include/cdio/udf_time.h

Packit dd8086
/*
Packit dd8086
    Copyright (C) 2005, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
Packit dd8086
Packit dd8086
    This program is free software: you can redistribute it and/or modify
Packit dd8086
    it under the terms of the GNU General Public License as published by
Packit dd8086
    the Free Software Foundation, either version 3 of the License, or
Packit dd8086
    (at your option) any later version.
Packit dd8086
Packit dd8086
    This program is distributed in the hope that it will be useful,
Packit dd8086
    but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit dd8086
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit dd8086
    GNU General Public License for more details.
Packit dd8086
Packit dd8086
    You should have received a copy of the GNU General Public License
Packit dd8086
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit dd8086
*/
Packit dd8086
Packit dd8086
/*!
Packit dd8086
 * \file udf_time.h
Packit dd8086
 *
Packit dd8086
 * \brief UDF time conversion and access files.
Packit dd8086
 *
Packit dd8086
*/
Packit dd8086
Packit dd8086
#ifndef UDF_TIME_H
Packit dd8086
#define UDF_TIME_H
Packit dd8086
Packit dd8086
#include <time.h>
Packit dd8086
Packit dd8086
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) && !defined(__struct_timespec_defined)
Packit dd8086
struct timespec {
Packit dd8086
  time_t  tv_sec;   /* Seconds */
Packit dd8086
  long    tv_nsec;  /* Nanoseconds */
Packit dd8086
};
Packit dd8086
#endif
Packit dd8086
Packit dd8086
#ifdef __cplusplus
Packit dd8086
extern "C" {
Packit dd8086
#endif /* __cplusplus */
Packit dd8086
Packit dd8086
  /*!
Packit dd8086
    Return the access time of the file.
Packit dd8086
  */
Packit dd8086
  time_t udf_get_access_time(const udf_dirent_t *p_udf_dirent);
Packit dd8086
Packit dd8086
  /*!
Packit dd8086
    Return the attribute (most recent create or access) time of the file
Packit dd8086
  */
Packit dd8086
  time_t udf_get_attribute_time(const udf_dirent_t *p_udf_dirent);
Packit dd8086
Packit dd8086
  /*!
Packit dd8086
    Return the modification time of the file.
Packit dd8086
  */
Packit dd8086
  time_t udf_get_modification_time(const udf_dirent_t *p_udf_dirent);
Packit dd8086
Packit dd8086
  /*!
Packit dd8086
    Return the access timestamp of the file
Packit dd8086
  */
Packit dd8086
  udf_timestamp_t *udf_get_access_timestamp(const udf_dirent_t *p_udf_dirent);
Packit dd8086
Packit dd8086
  /*!
Packit dd8086
    Return the modification timestamp of the file
Packit dd8086
  */
Packit dd8086
  udf_timestamp_t *udf_get_modification_timestamp(const udf_dirent_t
Packit dd8086
						  *p_udf_dirent);
Packit dd8086
Packit dd8086
  /*!
Packit dd8086
    Return the attr timestamp of the file
Packit dd8086
  */
Packit dd8086
  udf_timestamp_t *udf_get_attr_timestamp(const udf_dirent_t *p_udf_dirent);
Packit dd8086
Packit dd8086
  /*!
Packit dd8086
    Convert a UDF timestamp to a time_t. If microseconds are desired,
Packit dd8086
    use dest_usec. The return value is the same as dest. */
Packit dd8086
  time_t *udf_stamp_to_time(time_t *dest, long int *dest_usec,
Packit dd8086
			  const udf_timestamp_t src);
Packit dd8086
Packit dd8086
  udf_timestamp_t *udf_timespec_to_stamp(const struct timespec ts,
Packit dd8086
					 udf_timestamp_t *dest);
Packit dd8086
Packit dd8086
#ifdef __cplusplus
Packit dd8086
}
Packit dd8086
#endif /* __cplusplus */
Packit dd8086
Packit dd8086
#endif /*UDF_TIME_H*/