# Class e.p.d.d.DaapParser(object):

Part of elisa.plugins.daap.daap_parser View In Hierarchy

A DaapParser provides different ways to parse the response you get on daap request.

Line # | Kind | Name | Docs
--- | --- | --- | ---
57 | Method | __init__ | Undocumented
65 | Method | parse_chunk | unpack one chunk of data and decode the value, if it is not a container.
89 | Method | simple_parse | Parse the full data simple into a dictionary with key:value. This is
108 | Method | parse_mdcl | parse *one* mdcl entry and return the three values (decoded)
125 | Method | parse_to_model | Undocumented

def __init__(self):
Undocumented
def parse_chunk(self, data):
unpack one chunk of data and decode the value, if it is not a container.

Parameters | data | the data to read (type: `str` )
Returns | the code_name, the (decoded) value and the rest of the data (type: `tuple` containing 3 strings )
Raises | NotEnoughData | if the size for value is longer than the rest of the data that is left

def simple_parse(self, data):
Parse the full data simple into a dictionary with key:value. This is usefull for simple answers (as the login or the server info).

Parameters | data | the full data to read (type: `str` )
Returns | code mapped to the value (type: `dict` )

def parse_mdcl(self, data):
parse *one* mdcl entry and return the three values (decoded)

Returns | mcna, mcnm, mcty (type: `tuple` )

def parse_to_model(self, data, model):
Undocumented