On Tuesday 05 August 2008 20:45, batosai at freenetproject.org wrote:
> Author: batosai
> Date: 2008-08-05 19:45:37 +0000 (Tue, 05 Aug 2008)
> New Revision: 21626
>
> Modified:
> trunk/apps/WoT/src/plugins/WoT/WoTplugin.java
> Log:
> File fetching doesn't work yet, but I have to go.
> If someone sees what's wrong before I come back (friday), please tell me.
It's possible there's a bug in my code... but I don't see where. Let me know
how you get on, I may need to debug it...
>
> Modified: trunk/apps/WoT/src/plugins/WoT/WoTplugin.java
> ===================================================================
> --- trunk/apps/WoT/src/plugins/WoT/WoTplugin.java 2008-08-05 18:23:32 UTC
(rev 21625)
> +++ trunk/apps/WoT/src/plugins/WoT/WoTplugin.java 2008-08-05 19:45:37 UTC
(rev 21626)
> @@ -15,8 +15,12 @@
>
> import freenet.client.FetchContext;
> import freenet.client.FetchException;
> +import freenet.client.FetchResult;
> import freenet.client.HighLevelSimpleClient;
> +import freenet.client.InsertException;
> +import freenet.client.async.BaseClientPutter;
> import freenet.client.async.ClientCallback;
> +import freenet.client.async.ClientGetter;
> import freenet.clients.http.PageMaker;
> import freenet.config.Config;
> import freenet.config.SubConfig;
> @@ -36,7 +40,7 @@
> * @author Julien Cornuwel (batosai at freenetproject.org)
> *
> */
> -public class WoTplugin implements FredPlugin, FredPluginHTTP,
FredPluginThreadless, FredPluginVersioned {
> +public class WoTplugin implements FredPlugin, FredPluginHTTP,
FredPluginThreadless, FredPluginVersioned, ClientCallback {
>
> public static String SELF_URI = "/plugins/plugins.WoT.WoTplugin";
> private PluginRespirator pr;
> @@ -126,7 +130,7 @@
> FetchContext fetchContext =
> client.getFetchContext();
> fetchContext.maxSplitfileBlockRetries = -1; //
> retry forever
> fetchContext.maxNonSplitfileRetries = -1; //
> retry forever
> - client.fetch(identity, -1, this,
> fetchedTrustList(), fetchContext);
> + client.fetch(identity, -1, this, this,
> fetchContext);
>
> return makeKnownIdentitiesPage();
> }
> @@ -278,10 +282,45 @@
> public String getVersion() {
> return "0.1 r"+Version.getSvnRevision();
> }
> -
> - private ClientCallback fetchedTrustList() {
> - // TODO Auto-generated method stub
> - return null;
> +
> + @Override
> + public void onFailure(FetchException e, ClientGetter state) {
> + System.out.println("onFailure");
> }
>
> + @Override
> + public void onFailure(InsertException e, BaseClientPutter state) {
> + System.out.println("onFailure");
> +
> + }
> +
> + @Override
> + public void onFetchable(BaseClientPutter state) {
> + System.out.println("onFetchable");
> +
> + }
> +
> + @Override
> + public void onGeneratedURI(FreenetURI uri, BaseClientPutter state) {
> + System.out.println("onGeneratedURI");
> +
> + }
> +
> + @Override
> + public void onMajorProgress() {
> + System.out.println("onMajorProgress");
> +
> + }
> +
> + @Override
> + public void onSuccess(FetchResult result, ClientGetter state) {
> + System.out.println("onSuccess");
> +
> + }
> +
> + @Override
> + public void onSuccess(BaseClientPutter state) {
> + System.out.println("onSuccess");
> +
> + }
> }
>
> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20080805/9a684b6f/attachment.pgp>