Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest version of IVID / OMAPI wrapper layer #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib.omw.android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>net.vx4</groupId>
<artifactId>lib.omw</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.1.0</version>
</parent>
<artifactId>lib.omw.android</artifactId>
</project>
4 changes: 4 additions & 0 deletions lib.omw.android/src/main/java/android/content/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
* @author ckahlo
*/
public class Context {
public static final java.lang.String TELEPHONY_SERVICE = "phone";

public Object getSystemService(String name) {
return null;
};
}
11 changes: 11 additions & 0 deletions lib.omw.android/src/main/java/android/nfc/NfcAdapter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package android.nfc;

import android.content.Context;

public class NfcAdapter {
public static NfcAdapter getDefaultAdapter(Context context) {
return null;
}


}
36 changes: 36 additions & 0 deletions lib.omw.android/src/main/java/android/se/omapi/Channel.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package android.se.omapi;

public class Channel {
public void close() {
}


public Session getSession() {
return null;
}


public boolean isBasicChannel() {
return false;
}


public boolean isOpen() {
return false;
}


public boolean selectNext() {
return false;
}


public byte[] transmit(final byte[] command) {
return null;
}


public byte[] getSelectResponse() {
return null;
}
}
33 changes: 33 additions & 0 deletions lib.omw.android/src/main/java/android/se/omapi/Reader.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package android.se.omapi;

import java.io.IOException;


public class Reader {
Reader(final String name, final SEService service) {
}


public String getName() {
return null;
}


public Session openSession() throws IOException {
return null;
}


public boolean isSecureElementPresent() {
return false;
}


public SEService getSEService() {
return null;
}


public void closeSessions() {
}
}
40 changes: 40 additions & 0 deletions lib.omw.android/src/main/java/android/se/omapi/SEService.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package android.se.omapi;

import java.util.concurrent.Executor;

import android.content.Context;


public class SEService {
public SEService(final Context context, final Executor executor, final SEService.OnConnectedListener listener) {
}


public Reader[] getReaders() {
return null;
}


public Reader getUiccReader(final int slotNumber) throws IllegalArgumentException {
return null;
}


public String getVersion() {
return "VX4 OMAPI mock";
}


public boolean isConnected() {
return true;
}


public void shutdown() {
}


public static interface OnConnectedListener {
abstract void onConnected();
}
}
46 changes: 46 additions & 0 deletions lib.omw.android/src/main/java/android/se/omapi/Session.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package android.se.omapi;

public class Session {
public void close() {
}


public void closeChannels() {
}


public byte[] getATR() {
return null;
}


public Reader getReader() {
return null;
}


public boolean isClosed() {
return false;
}


public Channel openBasicChannel(final byte[] aid) {
return null;
}


public Channel openLogicalChannel(final byte[] aid) {
return null;
}


public Channel openBasicChannel(final byte[] aid, final byte p2) {
return null;
}


public Channel openLogicalChannel(final byte[] aid, final byte p2) {
return null;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package android.telephony;

public class IccOpenLogicalChannelResponse {
public static int STATUS_NO_ERROR = 1;

public int getStatus() {
return -1;
}

public int getChannel() {
return 0;
}

public byte[] getSelectResponse() {
return null;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package android.telephony;

public class TelephonyManager {
public boolean hasCarrierPrivileges() {
return false;
}

public boolean hasIccCard() {
return false;
}

public IccOpenLogicalChannelResponse iccOpenLogicalChannel(String AID) {
return null;
}

public boolean iccCloseLogicalChannel(int channel) {
return false;
}

public String iccTransmitApduLogicalChannel(int channel, int cla, int instruction, int p1, int p2, int p3, String data) {
return null;
}
}
18 changes: 18 additions & 0 deletions lib.omw.android/src/main/java/android/util/Log.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package android.util;

public class Log {
public static int d(String tag, String msg) {
System.out.println("D/" + tag + ": " + msg);
return 0;
};

public static int e(String tag, String msg) {
System.out.println("E/" + tag + ": " + msg);
return 0;
};

public static int i(String tag, String msg) {
System.out.println("I/" + tag + ": " + msg);
return 0;
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright (C) 2011, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.android.nfc_extras;

import java.io.IOException;

public class EeIOException extends IOException {
public EeIOException() {
super();
}

public EeIOException(String message) {
super(message);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.android.nfc_extras;

import android.nfc.NfcAdapter;

public class NfcAdapterExtras {
public static NfcAdapterExtras get(NfcAdapter adapter) {
return null;
}

public String getDriverName() {
return null;
}

public NfcExecutionEnvironment getEmbeddedExecutionEnvironment() {
return null;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/

package com.android.nfc_extras;

import java.io.IOException;

public class NfcExecutionEnvironment {
public void open() throws EeIOException {
}

public void close() throws IOException {
}

public byte[] transceive(final byte[] in) throws IOException {
return null;
}

public NfcExecutionEnvironment() {
}
}
14 changes: 7 additions & 7 deletions lib.omw.ivid/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>net.vx4</groupId>
<artifactId>lib.omw</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.1.1</version>
</parent>
<artifactId>lib.omw.ivid</artifactId>

Expand All @@ -14,17 +14,17 @@
</properties>

<dependencies>
<dependency>
<groupId>net.vx4</groupId>
<artifactId>lib.omw.omapi</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.vx4</groupId>
<artifactId>lib.omw.android</artifactId>
<version>0.1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
* <http://www.gnu.org/licenses/>.
*/

package net.vx4.lib.omapi;
package net.vx4.lib.ivid;

/**
* <p>
Expand Down
Loading