check

check — Manage some common work relative on links check.

Synopsis

#define             UC_CHECK_PARSER_WHILE_CONDITION
#define             UC_CHECK_ABORT_IF_CONDITION
enum                UCHTTPCheckReturn;
gboolean            uc_check_content_type_w3c_accepted  (const gchar *type,
                                                         gchar *path,
                                                         gchar *content_type);
guint32             uc_check_get_main_page_id           (void);
gboolean            uc_check_is_w3c_alert               (const UCLinkProperties *prop);
void                uc_check_run_w3c_checks             (UCLinkProperties *prop);
void                uc_check_run_security_checks        (UCLinkProperties *prop);
void                uc_check_refresh_report             (void);
void                uc_check_set_depth                  (GList *list,
                                                         const guint depth);
UCLinkProperties *  uc_check_copy_node                  (UCLinkProperties *src,
                                                         UCLinkProperties *dst);
gboolean            uc_check_is_main_page               (const UCLinkProperties *prop);
gchar *             uc_check_get_link_type_icon_path    (const UCLinkType link_type,
                                                         const gchar *proto);
gchar *             uc_check_get_link_type_label        (const UCLinkType type);
void                uc_check_refresh_link               (const guint32 id);
void                uc_check_refresh_link_real          (UCLinkProperties *prop);
gboolean            uc_check_refresh_link_get_value     (void);
void                uc_check_refresh_link_set_value     (const gboolean value);
gchar *             uc_check_get_link_type_for_icon     (const gchar *proto);
GdkPixbuf *         uc_check_get_link_type_icon         (const UCLinkType link_type,
                                                         const gchar *proto);
void                uc_check_currentitem_init           (UCLinkProperties *parent,
                                                         gchar *current_host,
                                                         UCHTMLTag *tag,
                                                         gchar *url,
                                                         gboolean is_first);
void                uc_check_wait                       (void);
gboolean            uc_check_link_already_checked_with_insert
                                                        (UCLinkProperties *prop,
                                                         gchar *url);
gpointer            uc_check_register_link              (const gchar *normalized_url,
                                                         UCLinkProperties *lp);
UCLinkProperties *  uc_check_link_get_properties        (const guint depth,
                                                         gchar *current_host,
                                                         gchar *current_path,
                                                         UCHTMLTag *tag,
                                                         UCLinkProperties *old_prop,
                                                         gboolean *accept,
                                                         guint retry);
UCLinkProperties *  uc_check_link_properties_node_new   (void);
void                uc_check_mx_is_valid                (void);
gboolean            uc_check_status_is_ignored          (const gchar *status);
gboolean            uc_check_status_is_good             (const gchar *status);
gboolean            uc_check_status_is_bad              (const gchar *status);
gboolean            uc_check_status_is_malformed        (const gchar *status);
gboolean            uc_check_status_is_timeout          (const gchar *status);
gboolean            uc_check_status_is_email            (const gchar *status);
void                uc_check_suspend_continue           (void);
gboolean            uc_check_cancel_get_value           (void);
gboolean            uc_check_suspend_get_value          (void);
gboolean            uc_check_ignore_item_get_value      (void);
gint32              uc_check_treeview_get_selected_row_id
                                                        (void);
void                uc_check_web_begin                  (void);
void                uc_check_bookmarks_begin            (void);
void                uc_check_cancel_set_value           (const gboolean value);
void                uc_check_ignore_item_set_value      (const gboolean value);
void                uc_check_display_items_active_all   (void);
void                uc_check_display_list               (GList *list,
                                                         gchar *path,
                                                         GtkTreeIter iter);
void                uc_check_reset                      (void);
void                uc_check_alarm_callback             (const int dum);
void                uc_check_link_view_source           (void);

Description

Details

UC_CHECK_PARSER_WHILE_CONDITION

#define             UC_CHECK_PARSER_WHILE_CONDITION


UC_CHECK_ABORT_IF_CONDITION

#define             UC_CHECK_ABORT_IF_CONDITION


enum UCHTTPCheckReturn

typedef enum
{
  UC_HTTP_CHECK_RETURN_SAME,
  UC_HTTP_CHECK_RETURN_OK,
  UC_HTTP_CHECK_RETURN_BAD,
  UC_HTTP_CHECK_RETURN_REDIR,
  UC_HTTP_CHECK_RETURN_IGNORE,
  UC_HTTP_CHECK_RETURN_FAKED_URL,
  UC_HTTP_CHECK_RETURN_TIMEOUT,
  UC_HTTP_CHECK_RETURN_MALFORMED
}
UCHTTPCheckReturn;


uc_check_content_type_w3c_accepted ()

gboolean            uc_check_content_type_w3c_accepted  (const gchar *type,
                                                         gchar *path,
                                                         gchar *content_type);

type :

path :

content_type :

Returns :


uc_check_get_main_page_id ()

guint32             uc_check_get_main_page_id           (void);

Returns :


uc_check_is_w3c_alert ()

gboolean            uc_check_is_w3c_alert               (const UCLinkProperties *prop);

prop :

Returns :


uc_check_run_w3c_checks ()

void                uc_check_run_w3c_checks             (UCLinkProperties *prop);

Run all w3c checks on the given node.

prop :

Current node.

uc_check_run_security_checks ()

void                uc_check_run_security_checks        (UCLinkProperties *prop);

Run all security checks on the given node.

prop :

Current node.

uc_check_refresh_report ()

void                uc_check_refresh_report             (void);


uc_check_set_depth ()

void                uc_check_set_depth                  (GList *list,
                                                         const guint depth);

list :

depth :


uc_check_copy_node ()

UCLinkProperties *  uc_check_copy_node                  (UCLinkProperties *src,
                                                         UCLinkProperties *dst);

src :

dst :

Returns :


uc_check_is_main_page ()

gboolean            uc_check_is_main_page               (const UCLinkProperties *prop);

prop :

Returns :


uc_check_get_link_type_icon_path ()

gchar *             uc_check_get_link_type_icon_path    (const UCLinkType link_type,
                                                         const gchar *proto);

Associate a icon path with a given link type.

See: uc_check_get_link_type_for_icon(), uc_check_get_link_type_icon()

link_type :

link type.

proto :

protocol of the link.

Returns :

The icon path corresponding to the given link type.

uc_check_get_link_type_label ()

gchar *             uc_check_get_link_type_label        (const UCLinkType type);

Associate a label with a given link type.

type :

link type.

Returns :

The label corresponding to the given link type.

uc_check_refresh_link ()

void                uc_check_refresh_link               (const guint32 id);

id :


uc_check_refresh_link_real ()

void                uc_check_refresh_link_real          (UCLinkProperties *prop);

prop :


uc_check_refresh_link_get_value ()

gboolean            uc_check_refresh_link_get_value     (void);

Returns :


uc_check_refresh_link_set_value ()

void                uc_check_refresh_link_set_value     (const gboolean value);

value :


uc_check_get_link_type_for_icon ()

gchar *             uc_check_get_link_type_for_icon     (const gchar *proto);

Check if we are dealing with a SSL protocol (HTTPS) or a FTP protocol.

proto :

protocol.

Returns :

The protocol we are dealing with.

uc_check_get_link_type_icon ()

GdkPixbuf *         uc_check_get_link_type_icon         (const UCLinkType link_type,
                                                         const gchar *proto);

Associate a icon with a given link type.

See: uc_check_get_link_type_for_icon(), uc_check_get_link_type_icon_path()

link_type :

link type.

proto :

protocol of the link.

Returns :

A GdkPixbuf object corresponding to the given link type.

uc_check_currentitem_init ()

void                uc_check_currentitem_init           (UCLinkProperties *parent,
                                                         gchar *current_host,
                                                         UCHTMLTag *tag,
                                                         gchar *url,
                                                         gboolean is_first);

parent :

current_host :

tag :

url :

is_first :


uc_check_wait ()

void                uc_check_wait                       (void);


uc_check_link_already_checked_with_insert ()

gboolean            uc_check_link_already_checked_with_insert
                                                        (UCLinkProperties *prop,
                                                         gchar *url);

Check if a given url already has been checked. If not, it insert it in the already checked urls list.

See: uc_check_link_already_checked-), uc_check_register_link(), uc_lists_already_checked_links_append()

prop :

the UCLinkPropertie node of the link to insert.

url :

the url to insert.

Returns :

TRUE if the given url was already been checked.

uc_check_register_link ()

gpointer            uc_check_register_link              (const gchar *normalized_url,
                                                         UCLinkProperties *lp);

Register a link in the checked urls list and update the check report.

normalized_url :

the url of the link.

lp :

the UCLinkProperties of the link.

Returns :

a gpointer on the new item.

uc_check_link_get_properties ()

UCLinkProperties *  uc_check_link_get_properties        (const guint depth,
                                                         gchar *current_host,
                                                         gchar *current_path,
                                                         UCHTMLTag *tag,
                                                         UCLinkProperties *old_prop,
                                                         gboolean *accept,
                                                         guint retry);

depth :

current_host :

current_path :

tag :

old_prop :

accept :

retry :

Returns :


uc_check_link_properties_node_new ()

UCLinkProperties *  uc_check_link_properties_node_new   (void);

Returns :


uc_check_mx_is_valid ()

void                uc_check_mx_is_valid                (void);

Test if the MX of the selected E-Mail link is valid. launch a popup to inform the user of its state


uc_check_status_is_ignored ()

gboolean            uc_check_status_is_ignored          (const gchar *status);

Test a given status code to see if it come from a ignored link.

status :

status code to test.

Returns :

TRUE if the link has been ignored by the user.

uc_check_status_is_good ()

gboolean            uc_check_status_is_good             (const gchar *status);

Test a given status code to see if it come from a good link.

status :

status code to test.

Returns :

TRUE if we consider that the given status code is good.

uc_check_status_is_bad ()

gboolean            uc_check_status_is_bad              (const gchar *status);

Test a given status code to see if it come from a bad link.

status :

status code to test.

Returns :

TRUE if we consider that the given status code is bad.

uc_check_status_is_malformed ()

gboolean            uc_check_status_is_malformed        (const gchar *status);

Test a given status code to see if it come from a malformed link.

status :

status code to test.

Returns :

TRUE if the link is malformed.

uc_check_status_is_timeout ()

gboolean            uc_check_status_is_timeout          (const gchar *status);

Test a given status code to see if it come from a timedouted link.

status :

status code to test.

Returns :

TRUE if we consider that the given status code is timeout.

uc_check_status_is_email ()

gboolean            uc_check_status_is_email            (const gchar *status);

Test a given status code to see if it come from a E-Mail link.

status :

status code to test.

Returns :

TRUE if the given status is the status of a E-Mail link.

uc_check_suspend_continue ()

void                uc_check_suspend_continue           (void);

Wait until the check can be alive again.


uc_check_cancel_get_value ()

gboolean            uc_check_cancel_get_value           (void);

Returns :


uc_check_suspend_get_value ()

gboolean            uc_check_suspend_get_value          (void);

Returns :


uc_check_ignore_item_get_value ()

gboolean            uc_check_ignore_item_get_value      (void);

Returns :


uc_check_treeview_get_selected_row_id ()

gint32              uc_check_treeview_get_selected_row_id
                                                        (void);

Get the current selected row in the main tree view.

Returns :

The id of the current selected row in the url treeview.

uc_check_web_begin ()

void                uc_check_web_begin                  (void);


uc_check_bookmarks_begin ()

void                uc_check_bookmarks_begin            (void);


uc_check_cancel_set_value ()

void                uc_check_cancel_set_value           (const gboolean value);

value :


uc_check_ignore_item_set_value ()

void                uc_check_ignore_item_set_value      (const gboolean value);

value :


uc_check_display_items_active_all ()

void                uc_check_display_items_active_all   (void);


uc_check_display_list ()

void                uc_check_display_list               (GList *list,
                                                         gchar *path,
                                                         GtkTreeIter iter);

Display recursively urls in the treeview.

list :

GList of the links to display.

path :

value to build tree view path.

iter :

A GtkTreeIter variable.

uc_check_reset ()

void                uc_check_reset                      (void);


uc_check_alarm_callback ()

void                uc_check_alarm_callback             (const int dum);

dum :


uc_check_link_view_source ()

void                uc_check_link_view_source           (void);