The cl-mimeparse Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-mimeparse Reference Manual

This is the cl-mimeparse Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Thu Sep 15 03:58:03 2022 GMT+0.

Table of Contents


1 Introduction

cl-mimeparse

Library for parsing MIME types, in the spirit of http://code.google.com/p/mimeparse/, with a Common Lisp flavor.

License

MIT


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-mimeparse

Library for parsing MIME types, in the spirit of http://code.google.com/p/mimeparse/, with a Common Lisp flavor.

Author

Nathan Froyd <froydnj@gmail.com>

Home Page

https://github.com/mmontone/cl-mimeparse

License

MIT

Version

0.0.1

Dependencies
  • cl-ppcre (system).
  • parse-number (system).
Source

cl-mimeparse.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.1 cl-mimeparse/cl-mimeparse.asd

Source

cl-mimeparse.asd.

Parent Component

cl-mimeparse (system).

ASDF Systems

cl-mimeparse.


3.1.2 cl-mimeparse/package.lisp

Source

cl-mimeparse.asd.

Parent Component

cl-mimeparse (system).

Packages

mimeparse.


3.1.3 cl-mimeparse/mimeparse.lisp

Dependency

package.lisp (file).

Source

cl-mimeparse.asd.

Parent Component

cl-mimeparse (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 mimeparse

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


5.1.1 Ordinary functions

Function: best-match (supported header)

Return the best match for all media-ranges in HEADER. SUPPORTED is a list of supported MIME types. The value of HEADER must be a string that conforms to the format of the HTTP Accept: header.

Package

mimeparse.

Source

mimeparse.lisp.

Function: parse-media-range (media-range-string)

Parses MEDIA-RANGE-STRING and returns a media-range object. The returned media-range always has a value for the ‘q’ parameter; a proper default is suppplied if one is not provided in MEDIA-RANGE-STRING.

Package

mimeparse.

Source

mimeparse.lisp.


5.1.2 Generic functions

Generic Function: quality (mime-type ranges)

Returns the quality ‘q’ of MIME-TYPE when compared
against the media-ranges in RANGES. RANGES can be either a list or a string. If RANGES is a list, it should be a list of media-ranges as returned by PARSE-MEDIA-RANGE. If RANGES is a string, it should be a string that conforms to the format of the HTTP Accept: header.

Package

mimeparse.

Source

mimeparse.lisp.

Methods
Method: quality (mime-type (ranges string))
Method: quality (mime-type (ranges list))

5.1.3 Standalone methods

Method: initialize-instance :after ((range media-range) &rest initargs &key type subtype params &allow-other-keys)
Source

mimeparse.lisp.

Method: print-object ((range media-range) stream)
Source

mimeparse.lisp.


5.1.4 Classes

Class: media-range
Package

mimeparse.

Source

mimeparse.lisp.

Direct methods
Direct slots
Slot: type
Package

common-lisp.

Initargs

:type

Readers

media-type.

Writers

This slot is read-only.

Slot: subtype
Initargs

:subtype

Readers

media-subtype.

Writers

This slot is read-only.

Slot: params
Initargs

:params

Readers

media-params.

Writers

(setf media-params).


5.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.1 Ordinary functions

Function: fitness-and-quality-parsed (mime-type parsed-ranges)

Find the best match for MIME-TYPE against PARSED-RANGES, which is a list of media-ranges that have already been parsed as if by PARSE-MEDIA-RANGE. Returns two values: the fitness value and the value of the ‘q’ quality parameter of the best match. -1 and 0 are returned if no match was found.

Package

mimeparse.

Source

mimeparse.lisp.

Function: getparam (p params)
Package

mimeparse.

Source

mimeparse.lisp.

Function: split-accept-header (header)
Package

mimeparse.

Source

mimeparse.lisp.

Function: strip (string)
Package

mimeparse.

Source

mimeparse.lisp.


5.2.2 Generic functions

Generic Reader: media-params (object)
Package

mimeparse.

Methods
Reader Method: media-params ((media-range media-range))

automatically generated reader method

Source

mimeparse.lisp.

Target Slot

params.

Generic Writer: (setf media-params) (object)
Package

mimeparse.

Methods
Writer Method: (setf media-params) ((media-range media-range))

automatically generated writer method

Source

mimeparse.lisp.

Target Slot

params.

Generic Reader: media-subtype (object)
Package

mimeparse.

Methods
Reader Method: media-subtype ((media-range media-range))

automatically generated reader method

Source

mimeparse.lisp.

Target Slot

subtype.

Generic Reader: media-type (object)
Package

mimeparse.

Methods
Reader Method: media-type ((media-range media-range))

automatically generated reader method

Source

mimeparse.lisp.

Target Slot

type.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
B   F   G   I   M   P   Q   S  
Index Entry  Section

(
(setf media-params): Private generic functions
(setf media-params): Private generic functions

B
best-match: Public ordinary functions

F
fitness-and-quality-parsed: Private ordinary functions
Function, best-match: Public ordinary functions
Function, fitness-and-quality-parsed: Private ordinary functions
Function, getparam: Private ordinary functions
Function, parse-media-range: Public ordinary functions
Function, split-accept-header: Private ordinary functions
Function, strip: Private ordinary functions

G
Generic Function, (setf media-params): Private generic functions
Generic Function, media-params: Private generic functions
Generic Function, media-subtype: Private generic functions
Generic Function, media-type: Private generic functions
Generic Function, quality: Public generic functions
getparam: Private ordinary functions

I
initialize-instance: Public standalone methods

M
media-params: Private generic functions
media-params: Private generic functions
media-subtype: Private generic functions
media-subtype: Private generic functions
media-type: Private generic functions
media-type: Private generic functions
Method, (setf media-params): Private generic functions
Method, initialize-instance: Public standalone methods
Method, media-params: Private generic functions
Method, media-subtype: Private generic functions
Method, media-type: Private generic functions
Method, print-object: Public standalone methods
Method, quality: Public generic functions
Method, quality: Public generic functions

P
parse-media-range: Public ordinary functions
print-object: Public standalone methods

Q
quality: Public generic functions
quality: Public generic functions
quality: Public generic functions

S
split-accept-header: Private ordinary functions
strip: Private ordinary functions

Jump to:   (  
B   F   G   I   M   P   Q   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   P   S   T  
Index Entry  Section

P
params: Public classes

S
Slot, params: Public classes
Slot, subtype: Public classes
Slot, type: Public classes
subtype: Public classes

T
type: Public classes

Jump to:   P   S   T