## camel-url-scanner

camel-url-scanner

## Synopsis

                        urlmatch_t;
    gboolean            (*CamelUrlScanFunc)                 (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);
    gboolean            camel_url_file_start                (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);
    gboolean            camel_url_file_end                  (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);
    gboolean            camel_url_web_start                 (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);
    gboolean            camel_url_web_end                   (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);
    gboolean            camel_url_addrspec_start            (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);
    gboolean            camel_url_addrspec_end              (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);
                        urlpattern_t;
                        CamelUrlScanner;
    CamelUrlScanner *   camel_url_scanner_new               (void);
    void                camel_url_scanner_free              (CamelUrlScanner *scanner);
    void                camel_url_scanner_add               (CamelUrlScanner *scanner,
                                                             urlpattern_t *pattern);
    gboolean            camel_url_scanner_scan              (CamelUrlScanner *scanner,
                                                             const gchar *in,
                                                             gsize inlen,
                                                             urlmatch_t *match);

## Description

## Details

### urlmatch_t

    typedef struct {
    	const gchar *pattern;
    	const gchar *prefix;
    	goffset um_so;
    	goffset um_eo;
    } urlmatch_t;

### CamelUrlScanFunc ()

    gboolean            (*CamelUrlScanFunc)                 (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);

`in` : |
`pos` : |
`inend` : |
`match` : |
Returns : |

### camel_url_file_start ()

    gboolean            camel_url_file_start                (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);

`in` : |
`pos` : |
`inend` : |
`match` : |
Returns : |

### camel_url_file_end ()

    gboolean            camel_url_file_end                  (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);

`in` : |
`pos` : |
`inend` : |
`match` : |
Returns : |

### camel_url_web_start ()

    gboolean            camel_url_web_start                 (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);

`in` : |
`pos` : |
`inend` : |
`match` : |
Returns : |

### camel_url_web_end ()

    gboolean            camel_url_web_end                   (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);

`in` : |
`pos` : |
`inend` : |
`match` : |
Returns : |

### camel_url_addrspec_start ()

    gboolean            camel_url_addrspec_start            (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);

`in` : |
`pos` : |
`inend` : |
`match` : |
Returns : |

### camel_url_addrspec_end ()

    gboolean            camel_url_addrspec_end              (const gchar *in,
                                                             const gchar *pos,
                                                             const gchar *inend,
                                                             urlmatch_t *match);

`in` : |
`pos` : |
`inend` : |
`match` : |
Returns : |

### urlpattern_t

    typedef struct {
    	const gchar *pattern;
    	const gchar *prefix;
    	CamelUrlScanFunc start;
    	CamelUrlScanFunc end;
    } urlpattern_t;

### CamelUrlScanner

    typedef struct _CamelUrlScanner CamelUrlScanner;

### camel_url_scanner_new ()

    CamelUrlScanner *   camel_url_scanner_new               (void);

Returns : |

### camel_url_scanner_free ()

    void                camel_url_scanner_free              (CamelUrlScanner *scanner);

`scanner` : |

### camel_url_scanner_add ()

    void                camel_url_scanner_add               (CamelUrlScanner *scanner,
                                                             urlpattern_t *pattern);

`scanner` : |
`pattern` : |

### camel_url_scanner_scan ()

    gboolean            camel_url_scanner_scan              (CamelUrlScanner *scanner,
                                                             const gchar *in,
                                                             gsize inlen,
                                                             urlmatch_t *match);

`scanner` : |
`in` : |
`inlen` : |
`match` : |
Returns : |