Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Tie libcouch to specific version of binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
daleharvey committed Aug 13, 2011
1 parent 20d9d68 commit 720b797
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
Binary file added assets/couchbase-1.0-dp-be9fe2f.tgz.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/release-0.1.tgz.jpg
Binary file not shown.
6 changes: 5 additions & 1 deletion src/com/couchbase/libcouch/CouchDB.java
Expand Up @@ -9,6 +9,7 @@

public class CouchDB {

private final static String defaultRelease = "couchbase-1.0-dp-be9fe2f";
private static String releaseName;

private static ICouchService couchService;
Expand All @@ -35,11 +36,14 @@ public void onServiceDisconnected(ComponentName className) {
}
};

public static ServiceConnection getService(Context ctx, ICouchClient client) {
return getService(ctx, defaultRelease, client);
}

public static ServiceConnection getService(Context ctx, String release, ICouchClient client) {
releaseName = release;
couchClient = client;
ctx.bindService(new Intent(ctx, CouchService.class), mConnection, Context.BIND_AUTO_CREATE);
return mConnection;
}

}
7 changes: 6 additions & 1 deletion src/com/couchbase/libcouch/CouchService.java
@@ -1,5 +1,7 @@
package com.couchbase.libcouch;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.URL;
Expand Down Expand Up @@ -125,7 +127,10 @@ void installCouch(final String pkg) {
public void run() {
try {
CouchInstaller.doInstall(pkg, mHandler, service);
} catch (Exception e) {
} catch (FileNotFoundException e) {
Message.obtain(mHandler, CouchService.ERROR, e).sendToTarget();
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
Expand Down

0 comments on commit 720b797

Please sign in to comment.