helper.c File Reference

#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>
#include <string.h>
#include <curl/curl.h>
#include <unistd.h>
#include <cybergarage/http/chttp.h>
#include <cybergarage/net/curl.h>
#include <cybergarage/net/curi.h>
#include <cybergarage/util/cstring.h>
#include "helper.h"
#include "interface.h"
#include "browser.h"
#include "resource_selection.h"

Data Structures

struct  _DownloadFile

Typedefs

typedef _DownloadFile DownloadFile

Functions

gchar * extract_host_from_uri (gchar *uri)
gchar * extract_port_from_uri (gchar *uri)
gchar * extract_rel_uri_from_uri (gchar *uri)
gchar * extract_filename_from_uri (gchar *uri)
gboolean download_idle (gpointer user_data)
gboolean save_data_to_file ()
gboolean find_device_from_model (GtkTreeModel *model, char *udn, int udn_col, GtkTreeIter *iter)
long track_duration_to_long (gchar *duration)
gchar * long_to_track_duration (long duration)

Variables

UPnPBrowserWidgetswidgets

Typedef Documentation

typedef struct _DownloadFile DownloadFile
 

Struct that is used to pass the uri and FILE* for the file downloader


Function Documentation

gboolean download_idle gpointer  user_data  ) 
 

File downloader function

gchar* extract_filename_from_uri gchar *  uri  ) 
 

Extract the file name from the given absolute URI.

Parameters:
uri The absolute URI to extract from

gchar* extract_host_from_uri gchar *  uri  ) 
 

Extract host from the given absolute URI.

Parameters:
uri The absolute URI to extract from

gchar* extract_port_from_uri gchar *  uri  ) 
 

Extract port from the given absolute URI.

Parameters:
uri The absolute URI to extract from

gchar* extract_rel_uri_from_uri gchar *  uri  ) 
 

Extract the relative URI from the given absolute URI.

Parameters:
uri The absolute URI to extract from

gboolean find_device_from_model GtkTreeModel *  model,
char *  udn,
int  udn_col,
GtkTreeIter *  iter
 

Find a device from the tree model by the device's UDN.

Parameters:
model The Tree model to search from
udn The UDN to search for
udn_col The column where to get the UDN from
iter The GtkTreeIter that points to the device node
Returns:
TRUE if the device was found; otherwise FALSE

gchar* long_to_track_duration long  duration  ) 
 

Convert a long int to CurrentTrackDuration data type (seconds) Doesn't care about fractions (.F+ or .F0/F1).

Parameters:
duration A CurrentTrackDuration string (H+:MM:SS)
Returns:
A newly-created string containing the duration

gboolean save_data_to_file  ) 
 

Save data to a file

long track_duration_to_long gchar *  duration  ) 
 

Convert a CurrentTrackDuration data type to long int (seconds). Doesn't care about fractions (.F+ or .F0/F1).

Parameters:
duration A CurrentTrackDuration string (H+:MM:SS)
Returns:
duration as a long int (0 if an error occurs)


Variable Documentation

UPnPBrowserWidgets* widgets
 

Global struct that holds the application widgets


Generated on Mon Aug 14 10:23:33 2006 for CyberLinkC-AV by  doxygen 1.4.6