4 * @file gmyth/gmyth_util.h
6 * @brief <p> This component provides utility functions
7 * (dealing with dates, time, string formatting, etc.).
9 * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
10 * @author Hallyson Luiz de Morais Melo <hallyson.melo@indt.org.br>
11 * @author Rosfran Borges <rosfran.borges@indt.org.br>
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU Lesser General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
35 #include "gmyth_stringlist.h"
36 #include "gmyth_backendinfo.h"
37 #include "gmyth_programinfo.h"
39 G_BEGIN_DECLS GString *gmyth_util_time_to_isoformat(time_t time_value);
40 GString *gmyth_util_time_to_string(time_t time_value);
41 time_t gmyth_util_string_to_time(GString * time_str);
43 gchar *gmyth_util_time_to_isoformat_from_time_val_fmt(const gchar *
48 GTimeVal *gmyth_util_string_to_time_val_fmt(const gchar * fmt_string,
49 const gchar * time_str);
51 GTimeVal *gmyth_util_string_to_time_val(const gchar * time_str);
53 gchar *gmyth_util_time_to_isoformat_from_time_val(const GTimeVal * time);
54 gchar *gmyth_util_time_to_mythformat_from_time_val(const GTimeVal * time);
56 gchar *gmyth_util_time_to_string_only_date(const GTimeVal * time);
58 gchar *gmyth_util_time_to_string_only_time(const GTimeVal * time);
60 gchar *gmyth_util_time_to_string_from_time_val(const GTimeVal * time_val);
62 struct tm *gmyth_util_time_val_to_date(const GTimeVal * time);
64 gboolean gmyth_util_file_exists(GMythBackendInfo * backend_info,
65 const gchar * filename);
67 gboolean gmyth_util_file_exists_and_get_remote_dir(GMythBackendInfo *
69 const gchar * filename,
70 gchar ** current_dir);
72 gchar *gmyth_util_create_filename(const gint chan_id,
73 const GTimeVal * start_time);
75 GList *gmyth_util_get_channel_list(GMythBackendInfo * backend_info);
77 GSList *gmyth_util_get_all_recordings(GMythBackendInfo * backend_info);
79 GMythProgramInfo *gmyth_util_get_recording_from_channel(GMythBackendInfo *
85 #endif /*GMYTH_UTIL_H_ */