vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1 | /*- |
| 2 | * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved. |
| 3 | * Redistribution and modifications are permitted subject to BSD license. |
| 4 | */ |
| 5 | #ifndef _UTCTime_H_ |
| 6 | #define _UTCTime_H_ |
| 7 | |
| 8 | #include <constr_TYPE.h> |
| 9 | #include <OCTET_STRING.h> |
| 10 | |
| 11 | typedef OCTET_STRING_t UTCTime_t; /* Implemented using OCTET STRING */ |
| 12 | |
| 13 | extern asn1_TYPE_descriptor_t asn1_DEF_UTCTime; |
| 14 | |
| 15 | asn_constr_check_f UTCTime_constraint; |
| 16 | asn_struct_print_f UTCTime_print; |
| 17 | |
| 18 | /*********************** |
| 19 | * Some handy helpers. * |
| 20 | ***********************/ |
| 21 | |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 22 | struct tm; /* <time.h> */ |
vlm | d0c608e | 2004-08-07 03:51:43 +0000 | [diff] [blame] | 23 | |
| 24 | /* See asn_GT2time() in GeneralizedTime.h */ |
| 25 | time_t asn_UT2time(const UTCTime_t *, struct tm *_optional_tm4fill, int as_gmt); |
| 26 | |
| 27 | /* See asn_time2GT() in GeneralizedTime.h */ |
| 28 | UTCTime_t *asn_time2UT(UTCTime_t *__opt_ut, const struct tm *, int force_gmt); |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 29 | |
| 30 | #endif /* _UTCTime_H_ */ |