Giter VIP home page Giter VIP logo

dmap-parser's Introduction

DMAP Parser

A parser in C for the Digital Media Access Protocol and its derivatives as used by iTunes and iPhoto. This includes support for the following protocols:

  • Digital Media Access Protocol (DMAP)
    • Digital Audio Access Protocol (DAAP)
    • Digital Photo Access Protocol (DPAP)
  • Digital Media Control Protocol (DMCP)
    • Digital Audio Control Protocol (DACP)

Usage

Populate a dmap_settings structure with the callbacks you're interested in and call dmap_parse. The parser maintains no state and expects to receive a complete message. Each callback returns both the four character code included in the message and a more human readable name for fields the parser is aware of.

Forward Compatibility

The DMAP protocol does not encode any type information, requiring clients to know what type is used for each field ID and to skip unknown fields. However, through examination of the field data the parser is able to make a reasonable guess at the type. This is useful when examining new fields or messages.

dmapprint

The dmapprint utility accepts DMAP input from stdin or a file and outputs a human readable representation of the message. For example:

> curl --silent --header "Viewer-Only-Client: 1" http://127.0.0.1:3689/content-codes | dmapprint
dmap.contentcodesresponse:
  dmap.status: 200
  dmap.dictionary:
    dmap.contentcodesnumber: miid
    dmap.contentcodesname: dmap.itemid
    dmap.contentcodestype: 5
  dmap.dictionary:
    dmap.contentcodesnumber: minm
    dmap.contentcodesname: dmap.itemname
    dmap.contentcodestype: 9
    ...

dmap-parser's People

Contributors

mattstevens avatar

Watchers

James Cloos avatar Esa Vuolas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.