1 /*-
2  * Copyright (c) 2003-2017 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 "asn1/asn1c/OCTET_STRING.h"
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 typedef OCTET_STRING_t UTCTime_t;  /* Implemented via OCTET STRING */
15 
16 extern asn_TYPE_descriptor_t asn_DEF_UTCTime;
17 extern asn_TYPE_operation_t asn_OP_UTCTime;
18 
19 asn_struct_print_f UTCTime_print;
20 asn_struct_compare_f UTCTime_compare;
21 asn_constr_check_f UTCTime_constraint;
22 xer_type_encoder_f UTCTime_encode_xer;
23 asn_random_fill_f  UTCTime_random_fill;
24 
25 #define UTCTime_free         OCTET_STRING_free
26 #define UTCTime_decode_ber   OCTET_STRING_decode_ber
27 #define UTCTime_encode_der   OCTET_STRING_encode_der
28 #define UTCTime_decode_xer   OCTET_STRING_decode_xer_utf8
29 #define UTCTime_decode_uper  OCTET_STRING_decode_uper
30 #define UTCTime_encode_uper  OCTET_STRING_encode_uper
31 
32 /***********************
33  * Some handy helpers. *
34  ***********************/
35 
36 struct tm;	/* <time.h> */
37 
38 /* See asn_GT2time() in GeneralizedTime.h */
39 time_t asn_UT2time(const UTCTime_t *, struct tm *_optional_tm4fill, int as_gmt);
40 
41 /* See asn_time2GT() in GeneralizedTime.h */
42 UTCTime_t *asn_time2UT(UTCTime_t *__opt_ut, const struct tm *, int force_gmt);
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif	/* _UTCTime_H_ */
49