I'll leave coding style to those who care about them.
>> CDIndex_Net_CONNECTION CDIndex_Net_CreateConnection(char *
where);
>> void CDIndex_Net_DisposeConnection(CDIndex_NetConnection *);
>> char *CDIndex_Net_GetErrorState(CDIndex_NetConnection *);
>> int CDIndex_Net_SendData(CDIndex_NetConnetion , uint8 *data,
int data_length);
>> int CDIndex_Net_ReadData(CDIndex_NetConnection, uint8 *
buffer, int buff er_length);
>This uses types that represent certain entities, like the connection
(good) but
>on the other hand do use fundamental types (not prefix_url or
prefix_rc) for the
>destination and return values.
I don't really think there's a need to define our own replacements for
the fundamental types. Point granted on rc, mind you. I don't know
what I was thinking when I spec'ed it to return a string.
>Aside from the naming (I prefer open/read/write/close) which is a
matter of taste,
>I want to avoid having the user doing transfers of bytes.
Sorry, my mistake in not making this clear. This would be in the
platform-layer *used* by the library. I.e. platform-independent
networking code. Only the base bits of networking (open/read/write/
close) need be written by platform ports.
>Sony has plans already to fiddle extra stuff like URLs into the
description.
>(see Sony CD Text site)
The "description" I have is a storage mechanism to store an XML
document that is well-formed under the CDIndex DTD. If URLs go into the
DTD/database, they'd go into this structure. The structure should map
one-to-one to a database entry.
>Speaking of the same site that shows enabled players with Japanese
displays,
>of course they will use Kanji and Kana characters for Japanese CDs,
>representing it in some wide character string .. in other words we
should
>have a look at internationalized software at some point to decide
>string representation.
Has the international-character set already been settled on, or is it
still sufficiently open that we could go with UTF-8? It is quite
Internet-native.
>> void CDIndex_DisposeDescription(CDIndex_description *);
>>
>> // Gets a description for the given toc.
>> // If toc==null, use current CD.
>> CDIndex_description *CDIndex_GetDescription(CDIndex_toc *
toc);
>
>This is quite hackish. In fact I find myself looking at your
implementation
>to find out about your design ideas to then comment the
implementation.
I think it would be clearer if I wrote these up into proper headers
with documentation.
>> Issue: The cdindex server currently bounces you around with a
bunch of
>> HTTP redirects when you approach it with the URL given out by the
>
>I suspect you are directly talking with the server (via 'telnet <URL>
http'
>or like) and experience some redirects that might be due to several
hosted
>sites on the server machine.
I was trying to get an idea of what the client would see when it
connects to the server. I think there's 4 redirects. It's annoying
to have to implement redirecting code, but if HTTP carries the cdindex
protocol, that's what has to be done.
-Steve