> -----Original Message-----
> Date: Wed, 21 Nov 2001 10:46:08 -0600
> From: thelema <thelema at mh246001.truman.edu>
> To: devl at freenetproject.org
> Subject: Re: [freenet-devl] CFCP
> Organization: Eric Conspiracy Secret Labs
> Reply-To: devl at freenetproject.org
>
> not bad. If there's any annoying protocol issues, I'm the person to
> bother with them, especially in regards to the metadata spec.
Metadata spec is good; unfortunately, the FCP spec hasn't been updated for
the changes to ClientGet (Pending \n URI= ... Success) and the Failed \n
Unreachable= ... EndMessage hasn't been entered either.
> I'd like to know how you handle metadata with redirects. I.e. you can
> have a redirect that has metadata on it (about the document it's
> redirecting you to) and also have a document with metadata. What do you
> return as metadata?
The Request object doesn't return metadata. It extracts certian information
(i.e. MIME type) but ignores everything else. If several MIME types are
found, only the last one is recorded.
If there's a good reason (for instance, if programs start using the metadata
field to store metadata) I'll add support to record arbitrary values
(obj.SaveMeta("Info.Description")); but in the mean-time, I'm implementing
only what I need.
> > Sample code:
> >
> > CFCP engine;
> > CFCP::Request obj(&engine);
> > obj.SetKey("SSK at gpOQ5OUAgJiCferl1DD2n5kMzw4PAgM/delta407//");
> > obj.SetFilename("c:\index.html");
> > if (obj.DoExchange() =3D=3D 0)
> > {
> > // success
> > }
> > else
> > {
> > // failure
> > }
> Looks pretty easy, although is this an insert or a request?
>
> Thelema
See line 2 -- CFCP::Request obj(&engine);
Request (and most of the other messages) are derived from the pure virtual
Exchange class which contains DoExchange() -- that way, any object derived
from Exchange can be passed to ExchangeThread, which calls DoExchange() in a
separate thread. Convenient.
--Will
_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl