69f637874da945a5ba17d8bda67e4c283704be6e
[YkNeoCR.git] / src / org / average / nfcauthcr / CheckConnector.java
1 package org.average.nfcauthcr;
2
3 import android.content.Context;
4 import android.os.Binder;
5 import android.util.Log;
6
7 import org.average.nfcauthcr.Enroll;
8 import org.average.nfcauthcr.Check;
9
10 public class CheckConnector extends Binder {
11
12         private final String TAG = getClass().getName();
13
14         private Enroll caller;
15         private Check service;
16
17         public void setCaller(Enroll caller) {
18                 this.caller = caller;
19         }
20
21         public void setService(Check service) {
22                 this.service = service;
23         }
24
25         public void runEnroll(int slot, byte[] challenge) {
26                 Log.v(TAG, "runEnroll");
27                 service.runEnroll(slot, challenge);
28         }
29
30         public void runCallback(int rc, byte[] response) {
31                 Log.v(TAG, "runCallback");
32                 caller.runCallback(rc, response);
33         }
34 }