leo_sobral@1
|
1 |
/**
|
rosfran@420
|
2 |
* GMyth Library
|
rosfran@420
|
3 |
*
|
rosfran@420
|
4 |
* @file gmyth/gmyth_util.h
|
rosfran@420
|
5 |
*
|
rosfran@420
|
6 |
* @brief <p> This component provides utility functions
|
rosfran@420
|
7 |
* (dealing with dates, time, string formatting, etc.).
|
rosfran@420
|
8 |
*
|
rosfran@420
|
9 |
* Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
|
rosfran@420
|
10 |
* @author Hallyson Luiz de Morais Melo <hallyson.melo@indt.org.br>
|
rosfran@420
|
11 |
* @author Rosfran Borges <rosfran.borges@indt.org.br>
|
rosfran@420
|
12 |
*
|
rosfran@701
|
13 |
*
|
rosfran@701
|
14 |
* This program is free software; you can redistribute it and/or modify
|
rosfran@701
|
15 |
* it under the terms of the GNU Lesser General Public License as published by
|
rosfran@701
|
16 |
* the Free Software Foundation; either version 2 of the License, or
|
rosfran@701
|
17 |
* (at your option) any later version.
|
rosfran@701
|
18 |
*
|
rosfran@701
|
19 |
* This program is distributed in the hope that it will be useful,
|
rosfran@701
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
rosfran@701
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
rosfran@701
|
22 |
* GNU General Public License for more details.
|
rosfran@701
|
23 |
*
|
rosfran@701
|
24 |
* You should have received a copy of the GNU Lesser General Public License
|
rosfran@701
|
25 |
* along with this program; if not, write to the Free Software
|
rosfran@701
|
26 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
rosfran@701
|
27 |
*/
|
leo_sobral@1
|
28 |
|
leo_sobral@1
|
29 |
#ifndef GMYTH_UTIL_H_
|
leo_sobral@1
|
30 |
#define GMYTH_UTIL_H_
|
leo_sobral@1
|
31 |
|
leo_sobral@1
|
32 |
#include <time.h>
|
leo_sobral@1
|
33 |
#include <glib.h>
|
leo_sobral@1
|
34 |
|
leo_sobral@1
|
35 |
#include "gmyth_stringlist.h"
|
melunko@125
|
36 |
#include "gmyth_backendinfo.h"
|
rosfran@568
|
37 |
#include "gmyth_programinfo.h"
|
leo_sobral@1
|
38 |
|
renatofilho@750
|
39 |
G_BEGIN_DECLS GString *gmyth_util_time_to_isoformat(time_t time_value);
|
renatofilho@750
|
40 |
GString *gmyth_util_time_to_string(time_t time_value);
|
renatofilho@750
|
41 |
time_t gmyth_util_string_to_time(GString * time_str);
|
leo_sobral@6
|
42 |
|
renatofilho@750
|
43 |
gchar *gmyth_util_time_to_isoformat_from_time_val_fmt(const gchar *
|
renatofilho@750
|
44 |
fmt_string,
|
renatofilho@750
|
45 |
const GTimeVal *
|
renatofilho@750
|
46 |
time_val);
|
rosfran@223
|
47 |
|
renatofilho@750
|
48 |
GTimeVal *gmyth_util_string_to_time_val_fmt(const gchar * fmt_string,
|
renatofilho@750
|
49 |
const gchar * time_str);
|
rosfran@223
|
50 |
|
renatofilho@750
|
51 |
GTimeVal *gmyth_util_string_to_time_val(const gchar * time_str);
|
morphbr@306
|
52 |
|
renatofilho@750
|
53 |
gchar *gmyth_util_time_to_isoformat_from_time_val(const GTimeVal * time);
|
renatofilho@750
|
54 |
gchar *gmyth_util_time_to_mythformat_from_time_val(const GTimeVal * time);
|
melunko@125
|
55 |
|
renatofilho@750
|
56 |
gchar *gmyth_util_time_to_string_only_date(const GTimeVal * time);
|
rosfran@214
|
57 |
|
renatofilho@750
|
58 |
gchar *gmyth_util_time_to_string_only_time(const GTimeVal * time);
|
rosfran@214
|
59 |
|
renatofilho@750
|
60 |
gchar *gmyth_util_time_to_string_from_time_val(const GTimeVal * time_val);
|
rosfran@214
|
61 |
|
renatofilho@750
|
62 |
struct tm *gmyth_util_time_val_to_date(const GTimeVal * time);
|
rosfran@214
|
63 |
|
renatofilho@750
|
64 |
gboolean gmyth_util_file_exists(GMythBackendInfo * backend_info,
|
renatofilho@750
|
65 |
const gchar * filename);
|
rosfran@214
|
66 |
|
renatofilho@750
|
67 |
gboolean gmyth_util_file_exists_and_get_remote_dir(GMythBackendInfo *
|
renatofilho@750
|
68 |
backend_info,
|
renatofilho@750
|
69 |
const gchar * filename,
|
renatofilho@750
|
70 |
gchar ** current_dir);
|
melunko@125
|
71 |
|
renatofilho@750
|
72 |
gchar *gmyth_util_create_filename(const gint chan_id,
|
renatofilho@750
|
73 |
const GTimeVal * start_time);
|
rosfran@384
|
74 |
|
renatofilho@750
|
75 |
GList *gmyth_util_get_channel_list(GMythBackendInfo * backend_info);
|
rosfran@384
|
76 |
|
renatofilho@750
|
77 |
GSList *gmyth_util_get_all_recordings(GMythBackendInfo * backend_info);
|
rosfran@479
|
78 |
|
renatofilho@750
|
79 |
GMythProgramInfo *gmyth_util_get_recording_from_channel(GMythBackendInfo *
|
renatofilho@750
|
80 |
backend_info,
|
renatofilho@750
|
81 |
const gchar *
|
renatofilho@750
|
82 |
channel);
|
rosfran@568
|
83 |
|
leo_sobral@6
|
84 |
G_END_DECLS
|
rosfran@698
|
85 |
#endif /*GMYTH_UTIL_H_ */
|