camel-url-scanner: Camel Reference Manual

## camel-url-scanner camel-url-scanner |

## Functions

gboolean | (*CamelUrlScanFunc) ()
gboolean | camel_url_file_start ()
gboolean | camel_url_file_end ()
gboolean | camel_url_web_start ()
gboolean | camel_url_web_end ()
gboolean | camel_url_addrspec_start ()
gboolean | camel_url_addrspec_end ()
CamelUrlScanner * | camel_url_scanner_new ()
void | camel_url_scanner_free ()
void | camel_url_scanner_add ()
gboolean | camel_url_scanner_scan ()

## Types and Values

| CamelUrlMatch
| CamelUrlPattern
| CamelUrlScanner

## Description

## Functions

### CamelUrlScanFunc ()

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

### camel_url_file_start ()

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

### camel_url_file_end ()

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

### camel_url_web_start ()

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

### camel_url_web_end ()

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

### camel_url_addrspec_start ()

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

### camel_url_addrspec_end ()

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

### camel_url_scanner_new ()

    CamelUrlScanner *
    camel_url_scanner_new (void);

[skip]

#### Returns

Creates a new CamelUrlScanner.

[transfer full]

### camel_url_scanner_free ()

    void
    camel_url_scanner_free (CamelUrlScanner *scanner);

Frees the `scanner` .

[skip]

#### Parameters

scanner | a CamelUrlScanner |

### camel_url_scanner_add ()

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

Adds a new `pattern` into the scanner

[skip]

#### Parameters

scanner | a CamelUrlScanner |
pattern | a CamelUrlPattern to add |

### camel_url_scanner_scan ()

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

Scan the `in` string with the `match` criterias.

[skip]

#### Parameters

scanner | a CamelUrlScanner object. |
in | the url to scan. | [array length=inlen][type gchar]
inlen | length of the in array. |
match | the CamelUrlMatch structure containing the criterias. |

#### Returns

`TRUE` if there is a result.

## Types and Values

### CamelUrlMatch

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

### CamelUrlPattern

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

### CamelUrlScanner

    typedef struct _CamelUrlScanner CamelUrlScanner;