Overview
libdaap
SourceForge

DAAP - Content Codes Request

This request serves to return the list of content codes in use by the server. This allows the server to be updated to contain new fields and older clients can still connect without trouble. In fact, this also allowed us to decode the entirety of the protocol very easily.

Back to URI List.

Sample Request

GET /content-codes HTTP/1.1
Host: daap.example.com
Client-DAAP-Version: 1.0
User-Agent: iTunes/4.0 (Macintosh; N; PPC)
Accept-Language: en-us, en;q=0.93, [many more]
Accept-Encoding: gzip

Sample Response

HTTP/1.1 200 OK
Date: Thu, 01 May 2003 18:00:29 GMT
DAAP-Server: iTunes/4.0 (Mac OS X)
Content-Type: application/x-dmap-tagged
Content-Length: 1208
Content-Encoding: gzip

Content Codes

The dmap.contentcodesresponse ('mccr') is the root container for the content codes response. It contains a dmap.status ('mstt') field and several dmap.dictionary ('mdcl') chunks that actually contain the information we're after.

Each of the dmap.dictionary chunks contains the following chunks:

name type description
dmap.contentcodesnumber mcnm Four-letter chunk type*
dmap.contentcodesname mcna Name of the type, such as "dmap.status"
dmap.contentcodestype mcty Type of data contained within (see below)

*the content types actually dictate that we show the dmap.contentcodesnumber as a number, but I have delibrately shown it as a string to make it easier to read.

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.dictionary = {
    dmap.contentcodesnumber = "mikd"
    dmap.contentcodesname = "dmap.itemkind"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mper"
    dmap.contentcodesname = "dmap.persistentid"
    dmap.contentcodestype = 7
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mcon"
    dmap.contentcodesname = "dmap.container"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mcti"
    dmap.contentcodesname = "dmap.containeritemid"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mpco"
    dmap.contentcodesname = "dmap.parentcontainerid"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mstt"
    dmap.contentcodesname = "dmap.status"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "msts"
    dmap.contentcodesname = "dmap.statusstring"
    dmap.contentcodestype = 9
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mimc"
    dmap.contentcodesname = "dmap.itemcount"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mctc"
    dmap.contentcodesname = "dmap.containercount"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mrco"
    dmap.contentcodesname = "dmap.returnedcount"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mtco"
    dmap.contentcodesname = "dmap.specifiedtotalcount"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mlcl"
    dmap.contentcodesname = "dmap.listing"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mlit"
    dmap.contentcodesname = "dmap.listingitem"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mbcl"
    dmap.contentcodesname = "dmap.bag"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mdcl"
    dmap.contentcodesname = "dmap.dictionary"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "msrv"
    dmap.contentcodesname = "dmap.serverinforesponse"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "msau"
    dmap.contentcodesname = "dmap.authenticationmethod"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mslr"
    dmap.contentcodesname = "dmap.loginrequired"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mpro"
    dmap.contentcodesname = "dmap.protocolversion"
    dmap.contentcodestype = 11
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "msal"
    dmap.contentcodesname = "dmap.supportsautologout"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "msup"
    dmap.contentcodesname = "dmap.supportsupdate"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mspi"
    dmap.contentcodesname = "dmap.supportspersistentids"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "msex"
    dmap.contentcodesname = "dmap.supportsextensions"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "msbr"
    dmap.contentcodesname = "dmap.supportsbrowse"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "msqy"
    dmap.contentcodesname = "dmap.supportsquery"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "msix"
    dmap.contentcodesname = "dmap.supportsindex"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "msrs"
    dmap.contentcodesname = "dmap.supportsresolve"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mstm"
    dmap.contentcodesname = "dmap.timeoutinterval"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "msdc"
    dmap.contentcodesname = "dmap.databasescount"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mlog"
    dmap.contentcodesname = "dmap.loginresponse"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mlid"
    dmap.contentcodesname = "dmap.sessionid"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mupd"
    dmap.contentcodesname = "dmap.updateresponse"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "musr"
    dmap.contentcodesname = "dmap.serverrevision"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "muty"
    dmap.contentcodesname = "dmap.updatetype"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mudl"
    dmap.contentcodesname = "dmap.deletedidlisting"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mccr"
    dmap.contentcodesname = "dmap.contentcodesresponse"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mcnm"
    dmap.contentcodesname = "dmap.contentcodesnumber"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mcna"
    dmap.contentcodesname = "dmap.contentcodesname"
    dmap.contentcodestype = 9
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "mcty"
    dmap.contentcodesname = "dmap.contentcodestype"
    dmap.contentcodestype = 3
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "apro"
    dmap.contentcodesname = "daap.protocolversion"
    dmap.contentcodestype = 11
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "avdb"
    dmap.contentcodesname = "daap.serverdatabases"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "abro"
    dmap.contentcodesname = "daap.databasebrowse"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "abal"
    dmap.contentcodesname = "daap.browsealbumlisting"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "abar"
    dmap.contentcodesname = "daap.browseartistlisting"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "abcp"
    dmap.contentcodesname = "daap.browsecomposerlisting"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "abgn"
    dmap.contentcodesname = "daap.browsegenrelisting"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "adbs"
    dmap.contentcodesname = "daap.databasesongs"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asal"
    dmap.contentcodesname = "daap.songalbum"
    dmap.contentcodestype = 9
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asar"
    dmap.contentcodesname = "daap.songartist"
    dmap.contentcodestype = 9
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asbt"
    dmap.contentcodesname = "daap.songbeatsperminute"
    dmap.contentcodestype = 3
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asbr"
    dmap.contentcodesname = "daap.songbitrate"
    dmap.contentcodestype = 3
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "ascm"
    dmap.contentcodesname = "daap.songcomment"
    dmap.contentcodestype = 9
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asco"
    dmap.contentcodesname = "daap.songcompilation"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "ascp"
    dmap.contentcodesname = "daap.songcomposer"
    dmap.contentcodestype = 9
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asda"
    dmap.contentcodesname = "daap.songdateadded"
    dmap.contentcodestype = 10
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asdm"
    dmap.contentcodesname = "daap.songdatemodified"
    dmap.contentcodestype = 10
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asdc"
    dmap.contentcodesname = "daap.songdisccount"
    dmap.contentcodestype = 3
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asdn"
    dmap.contentcodesname = "daap.songdiscnumber"
    dmap.contentcodestype = 3
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asdb"
    dmap.contentcodesname = "daap.songdisabled"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "aseq"
    dmap.contentcodesname = "daap.songeqpreset"
    dmap.contentcodestype = 9
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asfm"
    dmap.contentcodesname = "daap.songformat"
    dmap.contentcodestype = 9
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asgn"
    dmap.contentcodesname = "daap.songgenre"
    dmap.contentcodestype = 9
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asdt"
    dmap.contentcodesname = "daap.songdescription"
    dmap.contentcodestype = 9
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asrv"
    dmap.contentcodesname = "daap.songrelativevolume"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "assr"
    dmap.contentcodesname = "daap.songsamplerate"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "assz"
    dmap.contentcodesname = "daap.songsize"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asst"
    dmap.contentcodesname = "daap.songstarttime"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "assp"
    dmap.contentcodesname = "daap.songstoptime"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "astm"
    dmap.contentcodesname = "daap.songtime"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "astc"
    dmap.contentcodesname = "daap.songtrackcount"
    dmap.contentcodestype = 3
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "astn"
    dmap.contentcodesname = "daap.songtracknumber"
    dmap.contentcodestype = 3
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asur"
    dmap.contentcodesname = "daap.songuserrating"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asyr"
    dmap.contentcodesname = "daap.songyear"
    dmap.contentcodestype = 3
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asdk"
    dmap.contentcodesname = "daap.songdatakind"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "asul"
    dmap.contentcodesname = "daap.songdataurl"
    dmap.contentcodestype = 9
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "aply"
    dmap.contentcodesname = "daap.databaseplaylists"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "abpl"
    dmap.contentcodesname = "daap.baseplaylist"
    dmap.contentcodestype = 1
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "apso"
    dmap.contentcodesname = "daap.playlistsongs"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "arsv"
    dmap.contentcodesname = "daap.resolve"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "arif"
    dmap.contentcodesname = "daap.resolveinfo"
    dmap.contentcodestype = 12
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "aeNV"
    dmap.contentcodesname = "com.apple.itunes.norm-volume"
    dmap.contentcodestype = 5
  }
  dmap.dictionary = {
    dmap.contentcodesnumber = "aeSP"
    dmap.contentcodesname = "com.apple.itunes.smart-playlist"
    dmap.contentcodestype = 1
  }
}

Content Types

The following table describes the type numbers as provided in the above:

type name description
1 char 1-byte value, can be used as a boolean (true if the value is present, false if not)
3 short 2-byte integer
5 long 4-byte integer
7 long long 8-byte integer, tends to be represented in hex rather than numerical form
9 string string of characters (UTF-8)
10 date 4-byte integer with seconds since 1970 (standard UNIX time format)
11 version 2-bytes major version, next byte minor version, last byte patchlevel
12 container contains a series of other chunks, one after the other