camel-url-scanner
3
CAMEL Library

# camel-url-scanner

## Synopsis

                        urlmatch_t;
    gboolean            (*CamelUrlScanFunc)                 (const char *in,
                                                             const char *pos,
                                                             const char *inend,
                                                             urlmatch_t *match);
    gboolean            camel_url_file_start                (const char *in,
                                                             const char *pos,
                                                             const char *inend,
                                                             urlmatch_t *match);
    gboolean            camel_url_file_end                  (const char *in,
                                                             const char *pos,
                                                             const char *inend,
                                                             urlmatch_t *match);
    gboolean            camel_url_web_start                 (const char *in,
                                                             const char *pos,
                                                             const char *inend,
                                                             urlmatch_t *match);
    gboolean            camel_url_web_end                   (const char *in,
                                                             const char *pos,
                                                             const char *inend,
                                                             urlmatch_t *match);
    gboolean            camel_url_addrspec_start            (const char *in,
                                                             const char *pos,
                                                             const char *inend,
                                                             urlmatch_t *match);
    gboolean            camel_url_addrspec_end              (const char *in,
                                                             const char *pos,
                                                             const char *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 char *in,
                                                             size_t inlen,
                                                             urlmatch_t *match);

## Description

## Details

### urlmatch_t

    typedef struct {
    	const char *pattern;
    	const char *prefix;
    	off_t um_so;
    	off_t um_eo;
    } urlmatch_t;

### CamelUrlScanFunc ()

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

`in` :

`pos` :

`inend` :

`match` :

Returns :

### camel_url_file_start ()

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

`in` :

`pos` :

`inend` :

`match` :

Returns :

### camel_url_file_end ()

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

`in` :

`pos` :

`inend` :

`match` :

Returns :

### camel_url_web_start ()

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

`in` :

`pos` :

`inend` :

`match` :

Returns :

### camel_url_web_end ()

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

`in` :

`pos` :

`inend` :

`match` :

Returns :

### camel_url_addrspec_start ()

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

`in` :

`pos` :

`inend` :

`match` :

Returns :

### camel_url_addrspec_end ()

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

`in` :

`pos` :

`inend` :

`match` :

Returns :

### urlpattern_t

    typedef struct {
    	char *pattern;
    	char *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 char *in,
                                                             size_t inlen,
                                                             urlmatch_t *match);

`scanner` :

`in` :

`inlen` :

`match` :

Returns :