views:

69

answers:

1

I am trying to read out some values from response headers from a Shoutcast stream.

In the following code, what datatypes should my variables be when reading the values?

*datatype* header = CFReadStreamCopyProperty(stream, kCFStreamPropertyHTTPResponseHeader);   

*datatype* varname = CFHTTPMessageCopyAllHeaderFields(header);

EDIT:

Using Jacob Relkin's answer, I get the following warning on the first line

initialization discards qualifiers from pointer target type

and the following warnings from the second line

passing argument 1 of 'CFHTTPMessageCopyAllHeaderFields' from incompatible pointer type

+1  A: 

CFHTTPMessageRef and CFDictionary * (which is toll-free bridged to NSDictionary)

Jacob Relkin
Why am I getting an error about CFDictionary being undeclared?
Moshe
@Moshe, I don't know. Try casting it to an `NSDictionary`.
Jacob Relkin
@Jacob Relkin - that works, but now I get some warnings.
Moshe