branches/gmyth-0.1b/src/gmyth_util.h
author rosfran
Fri Feb 02 22:45:47 2007 +0000 (2007-02-02)
branchtrunk
changeset 324 a14a97093306
permissions -rw-r--r--
[svn r326] Moved part of LiveTV FileTransfer instance from the LiveTV core setup.
renatofilho@320
     1
/**
renatofilho@320
     2
* GMyth Library
renatofilho@320
     3
*
renatofilho@320
     4
* @file gmyth/gmyth_util.h
renatofilho@320
     5
* 
renatofilho@320
     6
* @brief <p> This component provides utility functions.
renatofilho@320
     7
* 
renatofilho@320
     8
* Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
renatofilho@320
     9
* @author Hallyson Luiz de Morais Melo <hallyson.melo@indt.org.br>
renatofilho@320
    10
*
renatofilho@320
    11
*//*
renatofilho@320
    12
* 
renatofilho@320
    13
* This program is free software; you can redistribute it and/or modify
renatofilho@320
    14
* it under the terms of the GNU Lesser General Public License as published by
renatofilho@320
    15
* the Free Software Foundation; either version 2 of the License, or
renatofilho@320
    16
* (at your option) any later version.
renatofilho@320
    17
*
renatofilho@320
    18
* This program is distributed in the hope that it will be useful,
renatofilho@320
    19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
renatofilho@320
    20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
renatofilho@320
    21
* GNU General Public License for more details.
renatofilho@320
    22
*
renatofilho@320
    23
* You should have received a copy of the GNU Lesser General Public License
renatofilho@320
    24
* along with this program; if not, write to the Free Software
renatofilho@320
    25
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
renatofilho@320
    26
*/
renatofilho@320
    27
renatofilho@320
    28
#ifndef GMYTH_UTIL_H_
renatofilho@320
    29
#define GMYTH_UTIL_H_
renatofilho@320
    30
renatofilho@320
    31
#include <time.h>
renatofilho@320
    32
#include <glib.h>
renatofilho@320
    33
renatofilho@320
    34
#include "gmyth_stringlist.h"
renatofilho@320
    35
#include "gmyth_backendinfo.h"
renatofilho@320
    36
renatofilho@320
    37
G_BEGIN_DECLS
renatofilho@320
    38
renatofilho@320
    39
GString 		*gmyth_util_time_to_isoformat(time_t time_value);
renatofilho@320
    40
GString 		*gmyth_util_time_to_string   (time_t time_value);
renatofilho@320
    41
time_t      gmyth_util_string_to_time   (GString* time_str);
renatofilho@320
    42
gint64     	gmyth_util_decode_long_long (GMythStringList *strlist, 
renatofilho@320
    43
                                         guint offset);
renatofilho@320
    44
renatofilho@320
    45
gchar* 			gmyth_util_time_to_isoformat_from_time_val_fmt ( const gchar *fmt_string, const GTimeVal* time_val );
renatofilho@320
    46
renatofilho@320
    47
GTimeVal		*gmyth_util_string_to_time_val_fmt ( const gchar *fmt_string, const gchar* time_str );
renatofilho@320
    48
renatofilho@320
    49
GTimeVal		*gmyth_util_string_to_time_val ( const gchar* time_str );
renatofilho@320
    50
renatofilho@320
    51
gchar 			*gmyth_util_time_to_isoformat_from_time_val( const GTimeVal *time);
renatofilho@320
    52
gchar			*gmyth_util_time_to_mythformat_from_time_val ( const GTimeVal* time );
renatofilho@320
    53
renatofilho@320
    54
gchar				*gmyth_util_time_to_string_only_date ( const GTimeVal* time );
renatofilho@320
    55
renatofilho@320
    56
gchar				*gmyth_util_time_to_string_only_time ( const GTimeVal* time );
renatofilho@320
    57
renatofilho@320
    58
gchar				*gmyth_util_time_to_string_from_time_val ( const GTimeVal *time_val );
renatofilho@320
    59
renatofilho@320
    60
struct tm		*gmyth_util_time_val_to_date ( const GTimeVal* time );
renatofilho@320
    61
renatofilho@320
    62
gboolean 		gmyth_util_file_exists (GMythBackendInfo *backend_info, const gchar* filename);
renatofilho@320
    63
renatofilho@320
    64
G_END_DECLS
renatofilho@320
    65
	
renatofilho@320
    66
#endif /*GMYTH_UTIL_H_*/