![]() |
![]() |
![]() |
gURLChecker Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
void uc_utils_swap_file_proto_option (const gboolean begin); void uc_utils_clear_container (GtkContainer *container); time_t uc_utils_http_atotm (const gchar *time_string); gchar * uc_utils_url_reencode_escapes (const gchar *s); gboolean uc_utils_ftp_code_search (const gchar *buffer, const gchar *code, const gint len); gchar * uc_utils_get_string_from_size (const gsize size); gchar * uc_utils_get_server_from_header_field (gchar *field); void uc_utils_copy (const gchar *src, const gchar *dest); gboolean uc_utils_get_meta_refresh_location (UCLinkProperties *prop, UCHTMLTag *tag); gchar * uc_utils_to_utf8 (const gchar *data); void uc_utils_copy_files (const gchar *src, const gchar *dest); void uc_utils_debug (const gchar *format, ...); void uc_utils_debug_dump_link_properties (const UCLinkProperties *prop); void uc_utils_set_userfriendly_treeview_column (const GtkTreeView *tv, const gint position); gchar * uc_utils_get_file_content (const gchar *path, gsize *length); void uc_utils_split_email (const gchar *email, gchar **user, gchar **domain); gchar * uc_utils_get_mx (const gchar *domain); gboolean uc_utils_get_yesno (const gchar *yesno); gboolean uc_utils_mx_is_valid (const gchar *mx); gchar * uc_utils_get_ip (const gchar *host); UCEmailStatus uc_utils_email_is_valid (const gchar *email, const gboolean check_mx); gchar * uc_utils_string_cut (const gchar *label, const gsize size); gchar * uc_utils_string_format4display (const gchar *label, const gsize size); gchar * uc_utils_replace (const gchar *str, const gchar *old, const gchar *new); gchar * uc_utils_replace1 (gchar *string, const gchar c1, const char c2); gchar * uc_utils_replacelr (gchar *string, const gchar c); gchar * uc_utils_convert_uid2file (const guint32 uid); gboolean uc_utils_disk_free_enough (const guint32 requested_size); void uc_utils_get_gnome_proxy_conf (gchar **host, guint *port); gchar * uc_utils_clean_tag_link_value (gchar *value); gpointer uc_utils_search_string_next (gpointer buf, const gchar *str, const gchar limit_char); gboolean uc_utils_memcasecmp (const gchar *str1, const gchar *str2); void uc_utils_rmfiles (const gchar *path); gboolean uc_utils_mkdirs (const gchar *path, const gboolean create_all); void uc_utils_rmdirs (const gchar *path, const gboolean delete_all); guint32 uc_utils_vector_length (gpointer data); gchar * uc_utils_strpbrk_or_eos (const gchar *str, const gchar *accept); gchar * uc_utils_strdup_delim (const gchar *begin, const gchar *end); gboolean uc_utils_array_is_in (const gchar *item, gpointer array, const guint size); gboolean uc_utils_test_socket_open (const guint sock); gchar * uc_utils_get_gnome_browser_conf (void); gboolean uc_utils_get_auth_fields (GladeXML *g, GtkWidget *w_auth_user, GtkWidget *w_auth_password, gchar **auth_user, gchar **auth_password, gchar **auth_line); gchar * uc_utils_build_auth_line (const gchar *auth_user, const gchar *auth_password);
void uc_utils_swap_file_proto_option (const gboolean begin);
|
time_t uc_utils_http_atotm (const gchar *time_string);
|
|
Returns : |
gchar * uc_utils_url_reencode_escapes (const gchar *s);
|
|
Returns : |
gboolean uc_utils_ftp_code_search (const gchar *buffer, const gchar *code, const gint len);
Search for a given FTP code in a buffer.
|
a buffer containing some FTP output stuff. |
|
the FTP code to search for (string format). |
|
length of the given buffer buffer .
|
Returns : |
TRUE if the given FTP code code has been found
in buffer .
|
gchar * uc_utils_get_string_from_size (const gsize size);
Convert a size in string format (with unit indication (KB, MB...)).
|
size to convert in string |
Returns : |
a string representation of the given size size .
|
gchar * uc_utils_get_server_from_header_field (gchar *field);
Extract server name/type from a HTTP header "Server" field.
|
A string from the "Server" HTTP header field. |
Returns : |
A string with the HTTP server. A new allocated string. |
void uc_utils_copy (const gchar *src, const gchar *dest);
Copy a file from src
to dest
.
|
Source file. |
|
Destination file. |
gboolean uc_utils_get_meta_refresh_location (UCLinkProperties *prop, UCHTMLTag *tag);
If the page contain a refresh meta tag with a value of 0, replace the current page URL with it.
|
A UCLinkProperties node. |
|
A UCHTMLTag tag. |
Returns : |
TRUE if there was a REFRESH META tag. |
gchar * uc_utils_to_utf8 (const gchar *data);
UTF-8 encode a given string.
Adapted from screem "screem_support_charset_convert()
"
function.
|
String to proceed. |
Returns : |
A new allocated UTF-8 encoded string. |
void uc_utils_copy_files (const gchar *src, const gchar *dest);
Copy all the file from a given directorie in another.
|
Source path. |
|
Destination path. |
void uc_utils_debug (const gchar *format, ...);
Display debug informations.
|
The message format. |
|
The parameters to insert into the format string. |
void uc_utils_debug_dump_link_properties (const UCLinkProperties *prop);
Dump the link properties structure to the standard output.
|
A UCLinkProperties node. |
void uc_utils_set_userfriendly_treeview_column (const GtkTreeView *tv, const gint position);
Set a treeview column sortable and resizable.
|
Tree view to work with. |
|
Position of the column to work with. |
gchar * uc_utils_get_file_content (const gchar *path, gsize *length);
Open and read a file to return its content.
|
Path of the file. |
|
Pointer to fill with file length. |
Returns : |
A new allocated string with the content of a the file.
The length argument contain the file length.
|
void uc_utils_split_email (const gchar *email, gchar **user, gchar **domain);
Fill the two parts of a E-Mail address. user
and domain
argument are
filled with new allocated strings.
|
E-Mail to work with. |
|
Pointer for the "user" part of the E-Mail. |
|
Pointer for the "domain" part of the E-Mail. |
gchar * uc_utils_get_mx (const gchar *domain);
Return the prefered MX for a given domain. Function adapted from http://www.sslug.dk/emailarkiv/cprog/1999_10/msg00056.html
|
Domain from which returning the corresponding MX. |
Returns : |
A new allocated string with the corresponding MX. |
gboolean uc_utils_get_yesno (const gchar *yesno);
Proceed a given string to see if it contains "yes" or "no".
|
A string containing "yes" or "no". |
Returns : |
TRUE if the given string is "yes". |
gboolean uc_utils_mx_is_valid (const gchar *mx);
Check if a given MX is valid or not.
|
The MX to check. |
Returns : |
TRUE if the given MX is alive and listen on port 25. |
gchar * uc_utils_get_ip (const gchar *host);
Return the IP of the given host. if arg is already an IP, return it as is.
|
Host to work with. |
Returns : |
A new allocated string with the IP. |
UCEmailStatus uc_utils_email_is_valid (const gchar *email, const gboolean check_mx);
Check E-Mail syntax and MX if required.
|
E-Mail to check. |
|
TRUE if we also must check the MX. |
Returns : |
The UCEmailStatus status of the E-Mail. Return codes are: - 0: bad syntax (UC_EMAIL_SYNTAX_BAD) - 1: syntax ok but MX not respond (UC_EMAIL_SYNTAX_MX_BAD) - 2: syntax ok and MX ok (UC_EMAIL_OK) |
gchar * uc_utils_string_cut (const gchar *label, const gsize size);
Cut a given string to fit with the given length.
See: uc_utils_string_format4display()
|
Label to cut. |
|
Size limit. |
Returns : |
A new allocated string with the cutted label. |
gchar * uc_utils_string_format4display (const gchar *label, const gsize size);
format a given string to be displayed in UI.
See: uc_utils_string_cut()
|
Label to format. |
|
Size limit. |
Returns : |
A new allocated string with the new formated label. |
gchar * uc_utils_replace (const gchar *str, const gchar *old, const gchar *new);
Replace one or more characters in a given string.
See: uc_utils_replace1()
|
String to work with. |
|
String to replace. |
|
New string to replace old with. |
Returns : |
A new allocated string. |
gchar * uc_utils_replace1 (gchar *string, const gchar c1, const char c2);
Replace a caracter by another (but do not allocate new memory for the result string).
See: uc_utils_replace()
|
String to work with. |
|
Character to replace. |
|
Replacement. |
Returns : |
The modified string. |
gchar * uc_utils_replacelr (gchar *string, const gchar c);
Remove all line return in a given string.
|
String to work with. |
|
Character for LR replacement. |
Returns : |
The modified string. |
gchar * uc_utils_convert_uid2file (const guint32 uid);
Convert a cache uid to filename.
|
The uid of a UCLinkProperties node. |
Returns : |
The corresponding path. A new allocated string. |
gboolean uc_utils_disk_free_enough (const guint32 requested_size);
Check if there is enought space on the partition to write on it.
|
The size needed on the partition. |
Returns : |
TRUE if it exist enough space on the parition
of the given path to write on it.
|
void uc_utils_get_gnome_proxy_conf (gchar **host, guint *port);
Fill given args with the gconf values for the gnome network proxy settings.
|
A string to fill for the host. |
|
A integer to fill for the port. |
gchar * uc_utils_clean_tag_link_value (gchar *value);
Clean a link value string.
|
String to clean. |
Returns : |
A cleaned value. A new allocated string. |
gpointer uc_utils_search_string_next (gpointer buf, const gchar *str, const gchar limit_char);
Search for the next char after the searched string.
|
A gpointer to the source buffer. |
|
The string to search. |
|
The char to stop if found. |
Returns : |
If found, retrun a pointer on the next char, else return the original pointer. |
gboolean uc_utils_memcasecmp (const gchar *str1, const gchar *str2);
Comparison between two strings, based on the length of the second string.
|
First string to compare. |
|
Second string to compare. |
Returns : |
TRUE if the beginning of str1 match with str2 .
|
void uc_utils_rmfiles (const gchar *path);
Remove all files in a given directory.
|
The path in witch deleting files. |
gboolean uc_utils_mkdirs (const gchar *path, const gboolean create_all);
Make given path -- create intermediate paths if they don't exist -- and test if we are authorized to write in.
void uc_utils_rmdirs (const gchar *path, const gboolean delete_all);
Remove a given path -- remove intermediate paths too.
|
The path to remove. |
|
If TRUE , remove all intermediar paths.
|
guint32 uc_utils_vector_length (gpointer data);
Calculate the length of the given vector.
|
A vector. |
Returns : |
The length of a given vector. |
gchar * uc_utils_strpbrk_or_eos (const gchar *str, const gchar *accept);
Return a pointer on a given char address or on the end of the passed string.
|
A string. |
|
A string with characters to search for. |
Returns : |
A pointer on the new offset. |
gchar * uc_utils_strdup_delim (const gchar *begin, const gchar *end);
Make a string with 2 given pointers.
|
The source position. |
|
The end position. |
Returns : |
A new allocated string. |
gboolean uc_utils_array_is_in (const gchar *item, gpointer array, const guint size);
Search for the first argument in the second argument vector.
|
Item to search for. |
|
Vector to search in. |
|
Size of the vector. |
Returns : |
TRUE if the first argument is in the second argument vector.
|
gboolean uc_utils_test_socket_open (const guint sock);
Check if a connection if alive or not. -> taken from wget source code
|
The socket to test. |
Returns : |
TRUE if it is alive.
|
gchar * uc_utils_get_gnome_browser_conf (void);
Get the current default gnome web browser or "mozilla" if it does not find it.
Returns : |
The current gnome default web browser |
gboolean uc_utils_get_auth_fields (GladeXML *g, GtkWidget *w_auth_user, GtkWidget *w_auth_password, gchar **auth_user, gchar **auth_password, gchar **auth_line);
Get user/password from a authentication dialog and build the line for basic authentication to pass to HTTP headers.
See: uc_utils_build_auth_line()
gchar * uc_utils_build_auth_line (const gchar *auth_user, const gchar *auth_password);
Build the line for basic authentication to pass to HTTP headers.
See: uc_utils_get_auth_fields()
|
|
|
|
Returns : |
a new memoty allocated string containing basic authentication line. |