summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-date-utils-private.h
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2020-10-16 17:05:54 +0100
committerPhilip Withnall <pwithnall@endlessos.org>2020-10-22 21:03:34 +0100
commit0974a7faf174988c93832e0b4693a11e3a42821e (patch)
tree8cdda788904c4fbcd8ab2da2befa618931ab7438 /src/libostree/ostree-date-utils-private.h
parent92215025aa0eb65f575700d0f3c286d594397e4f (diff)
downloadostree-0974a7faf174988c93832e0b4693a11e3a42821e.tar.gz
tests: Split RFC 2616 date parsing code out and add tests
This makes it testable, and increases its test coverage too 100% of lines, as measured by `make coverage`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Diffstat (limited to 'src/libostree/ostree-date-utils-private.h')
-rw-r--r--src/libostree/ostree-date-utils-private.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/libostree/ostree-date-utils-private.h b/src/libostree/ostree-date-utils-private.h
new file mode 100644
index 00000000..f9b8b3e0
--- /dev/null
+++ b/src/libostree/ostree-date-utils-private.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright © 2020 Endless OS Foundation LLC
+ *
+ * SPDX-License-Identifier: LGPL-2.0+
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * - Philip Withnall <pwithnall@endlessos.org>
+ */
+
+#pragma once
+
+#ifndef __GI_SCANNER__
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+GDateTime *_ostree_parse_rfc2616_date_time (const char *buf,
+ size_t len);
+
+G_END_DECLS
+
+#endif