graph_{data,def}_json actions: Don't destroy the graph_config_t object.
[collection4.git] / src / common.h
index e08c455..79a83ec 100644 (file)
@@ -1,3 +1,26 @@
+/**
+ * collection4 - common.h
+ * Copyright (C) 2010  Florian octo Forster
+ * 
+ * This program 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.1 of the License, or (at your option) any later version.
+ * 
+ * This program 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 program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA
+ *
+ * Authors:
+ *   Florian octo Forster <ff at octo.it>
+ **/
+
 #ifndef COMMON_H
 #define COMMON_H 1
 
@@ -24,5 +47,14 @@ uint32_t fade_color (uint32_t color);
 char *strtolower (char *str);
 char *strtolower_copy (const char *str);
 
+/*
+ * Parses the time parameters "begin" and "end" and returns the specified time
+ * in epoch in the longs pointed to by "ret_begin" and "ret_end". Returns
+ * non-zero on failure. If the optional "ret_now" pointer is not-NULL, the
+ * current time will be assigned to it.
+ */
+int get_time_args (long *ret_begin, long *ret_end,
+    long *ret_now);
+
 #endif /* COMMON_H */
 /* vim: set sw=2 sts=2 et fdm=marker : */